| Server IP : 23.111.136.34 / Your IP : 216.73.216.215 Web Server : Apache System : Linux servidor.eurohost.com.br 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : meusitei ( 1072) PHP Version : 5.6.40 Disable Function : show_source, system, shell_exec, passthru, proc_open MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/meusitei/www/central/widgets/ |
Upload File : |
<?php
require("../dbconnect.php");
require("../includes/functions.php");
/*
*** USAGE SAMPLES ***
<script language="javascript" src="widgets/productsinfo.php?pid=1&get=name"></script>
<script language="javascript" src="widgets/productsinfo.php?pid=1&get=description"></script>
<script language="javascript" src="widgets/productsinfo.php?pid=1&get=price&billingcycle=monthly"></script>
<script language="javascript" src="widgets/productsinfo.php?pid=1&get=orderurl&carttpl=web20cart"></script>
*/
$result = select_query("tblproducts","",array("id"=>$pid));
$data = mysql_fetch_array($result);
$pid = $data['id'];
$name = $data['name'];
$description = $data['description'];
if (!$pid) widgetoutput('Product ID Not Found');
if ($get=="name") widgetoutput($name);
if ($get=="description") {
$description = str_replace(array("\r","\n","\r\n"),"",$description);
widgetoutput($description);
}
if ($get=="configoption") widgetoutput($data['configoption'].$configoptionnum);
if ($get=="orderurl") {
$systemurl = ($CONFIG['SystemSSLURL']) ? $CONFIG['SystemSSLURL'].'/' : $CONFIG['SystemURL'].'/';
if ($carttpl=="ajax") {
widgetoutput($systemurl."order/?pid=$pid");
} else {
widgetoutput($systemurl."cart.php?a=add&pid=$pid&$carttpl=cart");
}
}
if ($get=="price") {
$currency = ($currency) ? getCurrency('',$currency) : getCurrency();
$result = select_query("tblpricing","",array("type"=>"product","currency"=>$currency['id'],"relid"=>$pid));
$data = mysql_fetch_array($result);
$price = $data[$billingcycle];
$price = formatCurrency($price);
widgetoutput($price);
}
function widgetoutput($value) {
echo "document.write('".addslashes($value)."');";
exit;
}
?>