Month: December 2013

Rotate,resize,drag together

<title>Requirement</title>

<link rel=”stylesheet” type=”text/css” href=”css/jquery.ui.core.css” />
<link rel=”stylesheet” type=”text/css” href=”css/jquery.ui.resizable.css” />

<style>
#draggable-zone {
background: #000 url(images/space.jpg) 0 0 no-repeat;
border: 3px solid #000;

height: 500px;
margin: 2em auto;
overflow: hidden;
width: 600px;}

.ui-wrapper {
overflow: visible !important;}

.ui-resizable-handle {
background: #f5dc58;
border: 1px solid #FFF;

z-index: 2;}

.ui-rotatable-handle {
background: #f5dc58;
border: 1px solid #FFF;
border-radius: 5px;
-moz-border-radius: 5px;
-o-border-radius: 5px;
-webkit-border-radius: 5px;
cursor: pointer;

height: 10px;
left: 50%;
margin: 0 0 0 -5px;
position: absolute;
top: -5px;
width: 10px;}

.ui-rotatable-handle.clone {
visibility: hidden;}
</style>

</head>
<body>

<div id=”draggable-zone”>
<div id=”draggable-wrapper” style=”width: 150px; height: 150px; left: 225px; top: 175px;”>
<div id=”resizable-wrapper”>
<img src=”images/earth.png” width=”150″ height=”150″ alt=”” id=”elem-wrapper” />
</div>
</div>
</div>

<script type=”text/javascript” src=”js/jquery.js”></script>
<script type=”text/javascript” src=”js/ui/jquery.ui.core.js”></script>
<script type=”text/javascript” src=”js/ui/jquery.ui.widget.js”></script>
<script type=”text/javascript” src=”js/ui/jquery.ui.mouse.js”></script>
<script type=”text/javascript” src=”js/ui/jquery.ui.draggable.js”></script>
<script type=”text/javascript” src=”js/ui/jquery.ui.resizable.js”></script>
<script type=”text/javascript” src=”js/ui/jquery.ui.rotatable.js”></script>

<script type=”text/javascript”>
$(document).ready(function() {
var drWr = $(‘#draggable-wrapper’),
rsWr = $(‘#resizable-wrapper’),
elem = $(‘#elem-wrapper’);

elem.resizable({
aspectRatio: true,
handles: ‘ne, nw, se, sw’
});

drWr.draggable();

elem.parent().rotatable();
});
</script>

</body>
</html>

Advertisements

JQuery Rotate,Resize,Drag together on an element

<div class=”dragImg”>
<img class=”img” src=”http://www.thumbshots.com/Portals/0/Images/Feature%20TS%201.jpg”&gt; <span id=”rotate”>Rotate</span>

</img>
</div>
<div id=”dropHere”></div>

$(function () {
//Make every clone image unique.
var counts = [0];
var resizeOpts = {
handles: “all”,
autoHide: true
};
$(“.dragImg”).draggable({
helper: “clone”,
//Create counter
start: function () {
counts[0]++;
}
});

$(“#dropHere”).droppable({
drop: function (e, ui) {
if (ui.draggable.hasClass(“dragImg”)) {
var the_div = $(ui.helper).clone()
$(this).append(the_div);

//Pointing to the dragImg class in dropHere and add new class.
the_div.addClass(“item-” + counts[0]);
the_div.find(‘img’).addClass(“imgSize-” + counts[0]);

the_div.find(‘img’).addClass(“mainTarget-” + counts[0]);
the_div.find(‘span’).attr(“id”, “target-” + counts[0]);
the_div.find(‘img’).attr(“id”, “mainTarget-” + counts[0]);

//Remove the current class (ui-draggable and dragImg)
the_div.find(‘img’).removeClass(“dragImg ui-draggable ui-draggable-dragging”);

$(“.item-” + counts[0]).dblclick(function () {
$(this).remove();
});
make_draggable($(“.item-” + counts[0]));
$(“.imgSize-” + counts[0]).resizable(resizeOpts);
}

$(“#target-” + counts[0]).mousedown(function (e) {
var item_target = $(‘.item-‘ + $(this).attr(‘id’).replace(‘target-‘, ”));
item_target.draggable(‘disable’);
item_target.removeClass(“dragImg ui-draggable ui-draggable-dragging ui-state-disabled”);
});

}

});

var zIndex = 0;

function make_draggable(elements) {
elements.draggable({
containment: ‘parent’,
start: function (e, ui) {
ui.helper.css(‘z-index’, ++zIndex);
},
stop: function (e, ui) {}
});
}

});

//Allow image to be rotated.
var dragging = false;
console.log($(‘[id^=target-]’))
var target = $(‘[id^=target-]’);
var mainTarget = $(‘[id^=mainTarget-]’);
var rotation_target;

$(document).mousemove(function (e) {
if (dragging) {

var mainTarget = $(‘.mainTarget-‘ + rotation_target.attr(‘id’).replace(‘target-‘, ”)).parent();
console.log(mainTarget)
var offset = mainTarget.offset();
var center_x = (offset.left) + (mainTarget.width() / 2);
var center_y = (offset.top) + (mainTarget.height() / 2);
var mouse_x = e.pageX;
var mouse_y = e.pageY;
var radians = Math.atan2(mouse_x – center_x, mouse_y – center_y);
var degree = (radians * (180 / Math.PI) * -1) + 120;
mainTarget.css(‘-moz-transform’, ‘rotate(‘ + degree + ‘deg)’);
mainTarget.css(‘-moz-transform-origin’, ‘50% 50%’);
mainTarget.css(‘-webkit-transform’, ‘rotate(‘ + degree + ‘deg)’);
mainTarget.css(‘-webkit-transform-origin’, ‘50% 50%’);
mainTarget.css(‘-o-transform’, ‘rotate(‘ + degree + ‘deg)’);
mainTarget.css(‘-o-transform-origin’, ‘50% 50%’);
mainTarget.css(‘-ms-transform’, ‘rotate(‘ + degree + ‘deg)’);
mainTarget.css(‘-ms-transform-origin’, ‘50% 50%’);
}
});
$(document).mouseup(function () {
dragging = false
$(“[class^=item]”).draggable(‘enable’);
})
$(document).on(‘mousedown’, ‘[id^=target-]’, function () {
dragging = true
rotation_target = $(this);
})

#dropHere {
width:400px;
height: 400px;
border: dotted 1px black;
}

img, span{
-webkit-user-select: none; /* Chrome/Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+ */

/* Rules below not implemented in browsers yet */
-o-user-select: none;
user-select: none;
}

My Sql queries Select records from till today,today, this week, this month php

Till Today
SELECT * FROM `abc` WHERE `date` DATE_SUB(NOW(), INTERVAL 1 DAY)
This week
SELECT * FROM `abc` WHERE `date` > DATE_SUB(NOW(), INTERVAL 1 WEEK)
This Month
SELECT * FROM `abc` WHERE `date` > DATE_SUB(NOW(), INTERVAL 1 MONTH)

Using Paypal Sdk error: PPAutoloader not found

Here is PPAutoloader.php all you need to do is put the sdk on your server and run the file install.php to get the file below:
‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘adaptivepaymentsservice’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePaymentsService.php’,
‘address’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘addresslist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘attributecontainertestclass’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPMessageTest.php’,
‘attributetestclass’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPMessageTest.php’,
‘authsignature’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPAuth.php’,
‘baseaddress’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘cancelpreapprovalrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘cancelpreapprovalresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘clientdetailstype’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘configuration’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/samples/Configuration.php’,
‘confirmpreapprovalrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘confirmpreapprovalresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘conversionrate’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘convertcurrencyrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘convertcurrencyresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘currencycodelist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘currencyconversion’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘currencyconversionlist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘currencyconversiontable’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘currencylist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘currencytype’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘displayoptions’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘errordata’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘errorlist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘errorparameter’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘executepaymentrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘executepaymentresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘faultmessage’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘feedisclosure’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘formatterfactory’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/formatters/FormatterFactory.php’,
‘fundingconstraint’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘fundingplan’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘fundingplancharge’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘fundingsource’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘fundingtypeinfo’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘fundingtypelist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getallowedfundingsourcesrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getallowedfundingsourcesresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getavailableshippingaddressesrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getavailableshippingaddressesresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getfundingplansrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getfundingplansresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getpaymentoptionsrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getpaymentoptionsresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getprepaymentdisclosurerequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getprepaymentdisclosureresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getshippingaddressesrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getshippingaddressesresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getuserlimitsrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getuserlimitsresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘initiatingentity’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘institutioncustomer’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘invoicedata’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘invoiceitem’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘ippcredential’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/IPPCredential.php’,
‘ippformatter’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/formatters/IPPFormatter.php’,
‘ipphandler’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/handlers/IPPHandler.php’,
‘ippthirdpartyauthorization’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/IPPThirdPartyAuthorization.php’,
‘mockoauthdatastore’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/AuthUtil.php’,
‘oauthconsumer’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPAuth.php’,
‘oauthdatastore’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPAuth.php’,
‘oauthexception’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPAuth.php’,
‘oauthrequest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPAuth.php’,
‘oauthserver’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPAuth.php’,
‘oauthsignaturemethod’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPAuth.php’,
‘oauthsignaturemethod_hmac_sha1’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPAuth.php’,
‘oauthsignaturemethod_plaintext’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPAuth.php’,
‘oauthsignaturemethod_rsa_sha1’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPAuth.php’,
‘oauthtoken’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPAuth.php’,
‘oauthutil’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPAuth.php’,
‘payerror’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘payerrorlist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘paymentdetailsrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘paymentdetailsresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘paymentinfo’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘paymentinfolist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘payrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘payresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘phonenumber’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘phonenumbertype’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘postpaymentdisclosure’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘postpaymentdisclosurelist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘ppapicontext’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/common/PPApiContext.php’,
‘ppapiservice’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPAPIService.php’,
‘ppapiservicetest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPAPIServiceTest.php’,
‘pparrayutil’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/common/PPArrayUtil.php’,
‘ppauthenticationhandler’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/handlers/PPAuthenticationHandler.php’,
‘ppbaseservice’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPBaseService.php’,
‘ppbaseservicetest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPBaseServiceTest.php’,
‘ppcertificateauthhandler’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/handlers/PPCertificateAuthHandler.php’,
‘ppcertificatecredential’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPCertificateCredential.php’,
‘ppcertificatecredentialtest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPCertificateCredentialTest.php’,
‘ppconfigmanager’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPConfigManager.php’,
‘ppconfigmanagertest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPConfigManagerTest.php’,
‘ppconfigurationexception’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/exceptions/PPConfigurationException.php’,
‘ppconfigurationexceptiontest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPConfigurationExceptionTest.php’,
‘ppconnectionexception’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/exceptions/PPConnectionException.php’,
‘ppconnectionexceptiontest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPConnectionExceptionTest.php’,
‘ppconnectionmanager’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPConnectionManager.php’,
‘ppconnectionmanagertest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPConnectionManagerTest.php’,
‘ppconstants’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPConstants.php’,
‘ppcredentialmanager’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPCredentialManager.php’,
‘ppcredentialmanagertest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPCredentialManagerTest.php’,
‘ppgenericservicehandler’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/handlers/PPGenericServiceHandler.php’,
‘pphttpconfig’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPHttpConfig.php’,
‘pphttpconnection’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPHttpConnection.php’,
‘ppinvalidcredentialexception’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/exceptions/PPInvalidCredentialException.php’,
‘ppinvalidcredentialexceptiontest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPInvalidCredentialExceptionTest.php’,
‘ppipnmessage’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/ipn/PPIPNMessage.php’,
‘ppipnmessagetest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPIPNMessageTest.php’,
‘pplogginglevel’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPLoggingManager.php’,
‘pploggingmanager’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPLoggingManager.php’,
‘pploggingmanagertest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPLoggingManagerTest.php’,
‘ppmerchantservicehandler’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/handlers/PPMerchantServiceHandler.php’,
‘ppmessage’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPMessage.php’,
‘ppmessagetest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPMessageTest.php’,
‘ppmissingcredentialexception’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/exceptions/PPMissingCredentialException.php’,
‘ppmissingcredentialexceptiontest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPMissingCredentialExceptionTest.php’,
‘ppmodel’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/common/PPModel.php’,
‘ppnvpformatter’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/formatters/PPNVPFormatter.php’,
‘ppopenidaddress’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/openid/PPOpenIdAddress.php’,
‘ppopenidaddresstest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/openid/PPOpenIdAddressTest.php’,
‘ppopeniderror’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/openid/PPOpenIdError.php’,
‘ppopenidhandler’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/handlers/PPOpenIdHandler.php’,
‘ppopenidsession’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/openid/PPOpenIdSession.php’,
‘ppopenidsessiontest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/openid/PPOpenIdSessionTest.php’,
‘ppopenidtokeninfo’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/openid/PPOpenIdTokeninfo.php’,
‘ppopenidtokeninfotest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/openid/PPOpenIdTokeninfoTest.php’,
‘ppopeniduserinfo’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/openid/PPOpenIdUserinfo.php’,
‘ppopeniduserinfotest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/openid/PPOpenIdUserinfoTest.php’,
‘ppplatformservicehandler’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/handlers/PPPlatformServiceHandler.php’,
‘ppreflectionutil’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/common/PPReflectionUtil.php’,
‘pprequest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPRequest.php’,
‘pprestcall’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/transport/PPRestCall.php’,
‘ppsignatureauthhandler’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/handlers/PPSignatureAuthHandler.php’,
‘ppsignaturecredential’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPSignatureCredential.php’,
‘ppsignaturecredentialtest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPSignatureCredentialTest.php’,
‘ppsoapformatter’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/formatters/PPSOAPFormatter.php’,
‘ppsubjectauthorization’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPSubjectAuthorization.php’,
‘pptokenauthorization’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPTokenAuthorization.php’,
‘pptransformerexception’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/exceptions/PPTransformerException.php’,
‘ppuseragent’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/common/PPUserAgent.php’,
‘pputils’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPUtils.php’,
‘pputilstest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPUtilsTest.php’,
‘ppxmlmessage’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPXmlMessage.php’,
‘preapprovaldetailsrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘preapprovaldetailsresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘preapprovalrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘preapprovalresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘receiver’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘receiverdisclosure’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘receiverdisclosurelist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘receiveridentifier’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘receiverinfo’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘receiverinfolist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘receiverlist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘receiveroptions’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘refundinfo’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘refundinfolist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘refundrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘refundresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘requestenvelope’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘responseenvelope’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘senderdisclosure’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘senderidentifier’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘senderoptions’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘setpaymentoptionsrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘setpaymentoptionsresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘shippingaddressinfo’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘simplecontainertestclass’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPMessageTest.php’,
‘simpletestclass’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPMessageTest.php’,
‘taxiddetails’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘userlimit’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘warningdata’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘warningdatalist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘xmltoarray’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPUtils.php’,
);

public static function loadClass($class) {
$class = strtolower(trim($class, ‘\\’));

if (isset(self::$map[$class])) {
require dirname(__FILE__) . ‘/’ . self::$map[$class];
}
}

public static function register() {
spl_autoload_register(array(__CLASS__, ‘loadClass’), true);
}
}

Calculate price according to checboxes checked jquery

$(document).ready(function(){
var calcu;
$(“#GigTitle”).change(function(){
var val= $(“#GigTitle”).val();
var a=Number(val)+Number(1);
var calcu = a*6;
$(“#euroaa”).html(calcu);
$(“#checkoutrate”).html(calcu);
$(“input:checkbox”).click(function(event) {
var total = 0;
$(“input:checked”).each(function() {
total += parseInt($(this).val());
});

if (total == 0) {
$(“#euroaa”).html(calcu);
$(“#checkoutrate”).html(calcu);
}
else {
total= parseInt(total)+parseInt(calcu);
$(“#euroaa”).html(total);
$(“#checkoutrate”).html(total);
}
});
});

});

and html is

Form->input(‘quantity’,array(‘id’=>’GigTitle’,’options’=>array(range(1,20)))); ?>
Form->input(‘fast’,array(‘type’=>’checkbox’,’value’=>’20’,’id’=>’fast’,’label’=>’I Will Provide Order within 4 days for extra €20 ‘)); ?>
Form->input(‘fast1’,array(‘type’=>’checkbox’,’value’=>’40’,’id’=>’fast1′,’label’=>’I Will Provide Order within 3 days for extra €40 ‘)); ?>
Form->input(‘fast2’,array(‘type’=>’checkbox’,’value’=>’60’,’id’=>’fast2′,’label’=>’I Will Provide Order within 2 days for extra €60 ‘)); ?>
Form->input(‘fast3’,array(‘type’=>’checkbox’,’value’=>’120′,’id’=>’fast2′,’label’=>’I Will Provide Order within 2 days for extra €120 ‘)); ?>
<a href="webroot;?>users/buy”>Order Now (€6)
<a href="webroot;?>users/buy”>Order Now (€6)

Css Bar chart changable according to database output

<?php include_once(‘checksession.php’); ?>
<span style=”color:white;float:right;”><a href=”logout.php”>Logout</a></span>
<?php
$userid = $_SESSION[‘id’];
$conn=mysql_connect(‘netinnovatus.com.mysql’,’netinnovatus_co’,’v4EYFZYC’);
mysql_select_db(‘netinnovatus_co’,$conn);
$result=mysql_query(“select * from ea_results where USER_ID='”.$userid.”‘”);
$res=mysql_fetch_assoc($result);

?>
<style>
.result
{
color:green;
}
.bargraph ul
{
list-style-type:none !important;
margin: 0px !important;
}
.label li {
height:25px !important;
font-size:9px !important;
}
.bargraph
{
width:55% !important;
}
</style>
<link href=’http://pics.cssbakery.com/pics/css/verticalbargraph.css&#8217; rel=’stylesheet’ type=’text/css’/>

<h1>
You scored:
</h1>
<div class=”bargraph” style= “width: 365px;”>
<ul class=”bars”>
<li class=”bar1″ style=”height: <?php echo $a=($res[‘magical’] *2) +1 ;?>%;”><?php echo $res[‘magical’] ;?></li>
<li class=”bar2″ style=”height: <?php echo $b=($res[‘logical’] *2 ) +1;?>%;”><?php echo $res[‘logical’] ;?></li>
<li class=”bar3″ style=”height: <?php echo $c=($res[‘critical’] *2)+1 ;?>%;”><?php echo $res[‘critical’] ;?></li>
<li class=”bar4″ style=”height: <?php echo $d=($res[‘agile’] *2) +1 ;?>%;”><?php echo $res[‘agile’] ;?></li>

</ul>
<ul class=”label”><li>Magical</li><li>Logical</li><li>Critical</li><li>agile</li></ul>
<ul class=”y-axis”><li>Max</li><li>30</li><li>20</li><li>10</li><li>0</li></ul>

</div>

parse json response from cakephp query and prepoulate the selectbox

$(document).ready(function(){
$(“#cat”).change(function(){
var subcatid = $(“#cat”).val();
$.ajax({
type: “POST”,
url: “webroot; ?>users/subcatfind”,
data: { id: subcatid},
success:function(data){
var sel = $(“#subc”);
sel.empty();
var jso=$.parseJSON(data);
for(i=0;i<= jso.length;i++){
sel.append('’+jso[i].Subcategorie.title+”);;
}
}

});

});
});