本文整理汇总了PHP中Round函数的典型用法代码示例。如果您正苦于以下问题:PHP Round函数的具体用法?PHP Round怎么用?PHP Round使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Round函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: open_image
function open_image($file)
{
$size = getimagesize($file);
// if ($size[0] > 5000 || $size[1] > 5000) {
// return false;
// }
switch ($size["mime"]) {
case "image/jpg":
case "image/pjpeg":
case "image/jpeg":
$image = imagecreatefromjpeg($file);
break;
case "image/gif":
$image = imagecreatefromgif($file);
break;
case "image/x-png":
case "image/png":
$required_memory = Round(($size[0] + 500) * ($size[1] + 500) * $size["bits"]);
$new_limit = memory_get_usage() + $required_memory;
ini_set("memory_limit", $new_limit);
$image = imagecreatefrompng($file);
// ini_restore("memory_limit");
// die('sdsd');
// ini_set("memory_limit", '128M');
break;
default:
$image = false;
break;
}
return array($image, $size);
}
示例2: get_hjri
function get_hjri($format, $time)
{
$datelang[1] = "الموافق";
$datelang[2] = "ميلادي";
$datelang[3] = "هجرية";
$datevars = explode("-", $format);
if ($datevars[0] == "M1") {
$Christian = 1;
} else {
$Christian = 0;
}
if ($datevars[1] == "HD1") {
$hjri_daye_type = 1;
} else {
$hjri_daye_type = 0;
}
if ($datevars[2] == "HM1") {
$hjri_month_type = 1;
} else {
$hjri_month_type = 0;
}
if ($datevars[3] == "CM1") {
$Christian_month_type = 1;
} else {
$Christian_month_type = 0;
}
if ($datevars[4] == "T1") {
$hjri_time = 1;
} else {
$hjri_time = 0;
}
$TDays = round($time / (60 * 60 * 24));
$HYear = round($TDays / 354.37419);
$Remain = $TDays - $HYear * 354.37419;
$HMonths = round($Remain / 29.531182);
$HDays = $Remain - $HMonths * 29.531182;
$HYear = $HYear + 1389;
$HMonths = $HMonths + 10;
$HDays = $HDays + 23;
if ($HDays > 29.531188 and round($HDays) != 30) {
$HMonths = $HMonths + 1;
$HDays = Round($HDays - 29.531182);
} else {
$HDays = Round($HDays);
}
if ($HMonths > 12) {
$HMonths = $HMonths - 12;
$HYear = $HYear + 1;
}
$hjre_day = $this->hjri_day($time, $hjri_daye_type);
$hjre_month = $this->hjri_month($HMonths, $hjri_month_type);
$datetime = "{$hjre_day} {$HDays}- {$hjre_month}- {$HYear} {$datelang['3']}";
if ($Christian) {
$dm = date("j", $time);
$Christian_month = $this->Christian_month($time, $Christian_month_type);
$Christian_year = date("Y", $time);
$datetime .= " {$datelang['1']} {$dm}-{$Christian_month}- {$Christian_year} {$datelang['2']}";
}
return $datetime;
}
示例3: display
function display()
{
global $themeimg;
// Normalize the properties.
if ($this->MinVal > $this->MaxVal) {
$temp_val = $this->MinVal;
$this->MinVal = $this->MaxVal;
$this->MaxVal = $temp_val;
}
if ($this->CurVal < $this->MinVal) {
$this->CurVal = $this->MinVal;
} elseif ($this->CurVal > $this->MaxVal) {
$this->CurVal = $this->MaxVal;
}
// Figure out the percentage that the CurVal is within MinVal and MaxVal.
$percentage_val = ($this->CurVal - $this->MinVal) / ($this->MaxVal - $this->MinVal);
// Compute the first and second widths.
$fg_width = Round($this->Width * $percentage_val);
$bg_width = $this->Width - $fg_width;
$RenderHtml = "<table class='tbl' cellspacing=0 cellpadding=0 width=" . $this->Width . "><tr>";
if ($fg_width > 0) {
$RenderHtml = $RenderHtml . "<td width=" . $fg_width . " height=" . $this->Height . ($this->FgColor ? " bgcolor='" . $this->FgColor . "'" : '') . ($this->FgClass ? " class='" . $this->FgClass . "'" : '') . "><img src='{$themeimg}/shim.gif'></td>";
}
if ($bg_width > 0) {
$RenderHtml = $RenderHtml . "<td width=" . $bg_width . " height=" . $this->Height . ($this->BgColor ? " bgcolor='" . $this->BgColor . "'" : '') . ($this->BgClass ? " class='" . $this->BgClass . "'" : '') . "><img src='{$themeimg}/shim.gif'></td>";
}
$RenderHtml = $RenderHtml . "</tr></table>";
return $RenderHtml;
}
示例4: menscredit
function menscredit($cout = 200000, $taux = 0.026, $mois = 240, $apport = 0)
{
$cout *= (100 - $apport) / 100;
$mens = $cout * $taux / 12 / (1 - pow(1 + $taux / 12, -$mois));
$ctc = round($mens * $mois - $cout);
$p2 = $ctc * 100 / $cout;
$mens = Round($mens, 2);
return $mens;
#Array($m,$ctc);
}
示例5: xdebugInfo
/**
* Weird little script to trigger an xdebug info box.
* I use this to test for bottlenecks before I discovered cache grind. I'll leave it in incase I need it for something.
*
* @param string $msg A message, useful for identifying a break point.
*/
function xdebugInfo ($msg = false)
{
if ($init['debug'])
{
trigger_error(
'[xdbInfo] ' . ($msg ? '<span style="color:white;background-color:#D60;">' . $msg . '</span> | ' : null) .
'
Mem: <span style="color:white;background-color:#D60;">' . Round(
(xdebug_memory_usage() / 1000), 2) . '
Kb</span>, Time: <span style="color:white;background-color:#D60;">' . str_pad(
Round(xdebug_time_index(), 4), 6, '0') . 'secs</span>', E_USER_WARNING);
}
}
示例6: jdGetSizes
function jdGetSizes($size)
{
if ($size < 1024) {
$size = number_format(Round($size, 3), 0, ',', '.') . " B";
} elseif ($size < 1048576) {
$size = number_format(Round($size / 1024, 3), 2, ',', '.') . " KB";
} elseif ($size < 1073741824) {
$size = number_format(Round($size / 1048576, 3), 2, ',', '.') . " MB";
} elseif (1073741824 < $size) {
$size = number_format(Round($size / 1073741824, 3), 2, ',', '.') . " GB";
} elseif (1099511627776 < $size) {
$size = number_format(Round($size / 1099511627776, 3), 2, ',', '.') . " TB";
}
return $size;
}
示例7: _drawHorizontalBars
/**
* Generate Horizontal Bar Charts
*
* @return @e void
*/
protected function _drawHorizontalBars()
{
//-----------------------------------------
// Draw Legend & Axes
//-----------------------------------------
foreach ($this->data['yaxis'] as $key => $series) {
$this->legend[$key] = $series['name'];
}
if (!$this->_drawLegend()) {
return false;
}
$this->x_axis = array('type' => 'numeric', 'min' => 0, 'max' => $this->_getMax($this->data['yaxis']));
$this->y_axis = array('type' => 'labels', 'labels' => $this->data['xaxis']);
$this->_drawAxes();
//-----------------------------------------
// Allocate text and shadow cols
//-----------------------------------------
$textcolor = imagecolorallocate($this->image, hexdec(substr($this->options['titlecolor'], 1, 2)), hexdec(substr($this->options['titlecolor'], 3, 2)), hexdec(substr($this->options['titlecolor'], 5, 2)));
$shadowcolor = imagecolorallocate($this->image, hexdec(substr($this->options['titleshadow'], 1, 2)), hexdec(substr($this->options['titleshadow'], 3, 2)), hexdec(substr($this->options['titleshadow'], 5, 2)));
//-----------------------------------------
// Calculate bar display variables
//-----------------------------------------
$numybars = count($this->data['yaxis']);
$numbars = count($this->data['yaxis'][0]['data']);
$maxvalue = $this->_getMax($this->data['yaxis']);
$stepheight = floor(($this->grapharea['y1'] - $this->grapharea['y0']) / $numbars);
$barheight = floor($stepheight * 0.9 / $numybars);
$ident = round(($stepheight - $numybars * $barheight) / 2, 0) + 1;
$effect3DSize = round($barheight / 2, 0) < 20 ? round($barheight / 2, 0) : 20;
$numticks = $this->options['numticks'] > $maxvalue ? floor($maxvalue) : $this->options['numticks'];
$step = floor($maxvalue / $numticks);
$steps = ceil($maxvalue / $step);
$stepwidth = ($this->grapharea['x1'] - $this->grapharea['x0']) / $steps;
//-----------------------------------------
// Candybar?
//-----------------------------------------
for ($i = 0; $i < $numbars; $i++) {
for ($ci = 0; $ci < $numybars; $ci++) {
//-----------------------------------------
// Get me a nice color will ya
//-----------------------------------------
if (!isset($this->color[$ci])) {
$this->color[$ci] = explode(",", $this->_getSliceColor($this->data['yaxis'][$ci]['color']));
}
$value = $this->data['yaxis'][$ci]['data'][$i];
//-----------------------------------------
// Find out the bar location and size
//-----------------------------------------
$x1 = $this->grapharea['x0'] + 1;
$x2 = round($this->grapharea['x0'] + $value * $stepwidth / $step, 0);
$y1 = $this->grapharea['y1'] - $stepheight * $i - $ci * $barheight - $ident;
$y2 = $y1 - $barheight + 1;
//-----------------------------------------
// Bar
//-----------------------------------------
$barcolor = imagecolorallocate($this->image, $this->color[$ci][0], $this->color[$ci][1], $this->color[$ci][2]);
imagefilledrectangle($this->image, $x1, $y1, $x2, $y2, $barcolor);
imagecolordeallocate($this->image, $barcolor);
if ($this->options['style3D'] == 1) {
//-----------------------------------------
// Make the 3D effect
//-----------------------------------------
$shadowcolor = imagecolorallocate($this->image, $this->color[$ci][0] - 50 < 0 ? 0 : $this->color[$ci][0] - 50, $this->color[$ci][1] - 50 < 0 ? 0 : $this->color[$ci][1] - 50, $this->color[$ci][2] - 50 < 0 ? 0 : $this->color[$ci][2] - 50);
$shadowsize = ($y1 - $y2) / 2 > 20 ? 20 : Round(($y1 - $y2) / 2, 0);
for ($j = $shadowsize; $j > 0; $j--) {
imageline($this->image, $x2 + $j, $y1 - $j + 1, $x2 + $j, $y2 - $j, $shadowcolor);
}
imagecolordeallocate($this->image, $shadowcolor);
$shadowcolor = imagecolorallocate($this->image, $this->color[$ci][0] - 25 < 0 ? 0 : $this->color[$ci][0] - 25, $this->color[$ci][1] - 25 < 0 ? 0 : $this->color[$ci][1] - 25, $this->color[$ci][2] - 25 < 0 ? 0 : $this->color[$ci][2] - 25);
for ($j = $shadowsize; $j > 0; $j--) {
imageline($this->image, $x1 + $j, $y2 - $j, $x2 + $j, $y2 - $j, $shadowcolor);
}
imagecolordeallocate($this->image, $shadowcolor);
}
//-----------------------------------------
// Datalabels
//-----------------------------------------
if ($this->options['showdatalabels']) {
$textcolor = ImageColorAllocate($this->image, hexdec(substr($this->options['textcolor'], 1, 2)), hexdec(substr($this->options['textcolor'], 3, 2)), hexdec(substr($this->options['textcolor'], 5, 2)));
$textx = $x1 + round(($x2 - $x1) / 2, 0);
$texty = $y1 + round(($y2 - $y1) / 2, 0);
if ($this->use_ttf) {
$txtsize = imagettfbbox('10', 0, $this->options['font'], $value);
$textx = $textx - round(($txtsize[2] - $txtsize[0]) / 2, 0);
$textx = $textx < $this->grapharea['x0'] + 2 ? $this->grapharea['x0'] + 2 : $textx;
$texty = $texty + round(($txtsize[1] - $txtsize[5]) / 2, 0);
$shadowcolor = imagecolorallocate($this->image, $this->color[$ci][0] - 50 < 0 ? 0 : $this->color[$ci][0] - 50, $this->color[$ci][1] - 50 < 0 ? 0 : $this->color[$ci][1] - 50, $this->color[$ci][2] - 50 < 0 ? 0 : $this->color[$ci][2] - 50);
imagettftext($this->image, "10", 0, $textx - 1, $texty - 1, $shadowcolor, $this->options['font'], $value);
imagettftext($this->image, "10", 0, $textx + 1, $texty + 1, $shadowcolor, $this->options['font'], $value);
imagettftext($this->image, "10", 0, $textx + 2, $texty + 2, $shadowcolor, $this->options['font'], $value);
imagettftext($this->image, "10", 0, $textx, $texty, $textcolor, $this->options['font'], $value);
imagecolordeallocate($this->image, $shadowcolor);
} else {
$textx = $textx - round(imagefontwidth($this->fontsize) * strlen($value) / 2, 0);
$texty = $textx < $this->grapharea['x0'] + 2 ? $this->grapharea['x0'] + 2 : $textx;
//.........这里部分代码省略.........
示例8: resizeImage
/**
* resizeImage
*
* @param string $path,
* @param string $resWidth
* @param string $resHeight
* @param string $saveTo default value null
*
* @return void
*/
public function resizeImage($path, $resWidth, $resHeight, $saveTo = null)
{
$imageInfo = @getimagesize($path);
if (!$imageInfo) {
throw new Exception("Could not get image information");
}
list($width, $height) = $imageInfo;
$percentHeight = $resHeight / $height;
$percentWidth = $resWidth / $width;
$percent = $percentWidth < $percentHeight ? $percentWidth : $percentHeight;
$resWidth = $width * $percent;
$resHeight = $height * $percent;
// Resample
$image_p = imagecreatetruecolor($resWidth, $resHeight);
imagealphablending($image_p, false);
imagesavealpha($image_p, true);
$background = imagecolorallocate($image_p, 0, 0, 0);
ImageColorTransparent($image_p, $background);
// make the new temp image all transparent
//Assume 3 channels if we can't find that information
if (!array_key_exists("channels", $imageInfo)) {
$imageInfo["channels"] = 3;
}
$memoryNeeded = Round(($imageInfo[0] * $imageInfo[1] * $imageInfo['bits'] * $imageInfo['channels'] + Pow(2, 16)) * 1.95) / (1024 * 1024);
if ($memoryNeeded < 80) {
$memoryNeeded = 80;
}
ini_set('memory_limit', intval($memoryNeeded) . 'M');
$functions = array(IMAGETYPE_GIF => array('imagecreatefromgif', 'imagegif'), IMAGETYPE_JPEG => array('imagecreatefromjpeg', 'imagejpeg'), IMAGETYPE_PNG => array('imagecreatefrompng', 'imagepng'));
if (!array_key_exists($imageInfo[2], $functions)) {
throw new Exception("Image format not supported");
}
list($inputFn, $outputFn) = $functions[$imageInfo[2]];
$image = $inputFn($path);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $resWidth, $resHeight, $width, $height);
$outputFn($image_p, $saveTo);
if (!is_null($saveTo)) {
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$saveTo = $filter->validateInput($saveTo, "path");
}
@chmod($saveTo, 0666);
}
示例9: Comp_Load
$Profile = Comp_Load('www/Administrator/API/ProfileCompile', array('ProfileID' => $ProfileID));
#-------------------------------------------------------------
switch (ValueOf($Profile)) {
case 'error':
return ERROR | @Trigger_Error(500);
case 'exception':
return ERROR | @Trigger_Error(400);
case 'array':
$Replace['Customer'] = $Profile['Attribs'];
break;
default:
return ERROR | @Trigger_Error(101);
}
}
#---------------------------------------------------------------
$Summ = Round($Result['Summ'], 2);
#---------------------------------------------------------------
$DOM = new DOM();
#---------------------------------------------------------------
if (Is_Error($DOM->Load('WorksComplite/Reports/Template'))) {
return ERROR | @Trigger_Error(500);
}
#---------------------------------------------------------------
$Adding = System_Read(SPrintF('templates/WorksComplite/Reports/Head.%s.xml', $Contract['IsUponConsider'] ? 'Upon' : 'Use'));
if (Is_Error($Adding)) {
return ERROR | @Trigger_Error(500);
}
#---------------------------------------------------------------
$DOM->AddHTML('Body', $Adding, TRUE);
#---------------------------------------------------------------
$Executor = DB_Select('Profiles', 'TemplateID', array('UNIQ', 'ID' => 100));
示例10: StrToUpper
$Hash = StrToUpper(Md5(Implode(':', $Hash)));
#-------------------------------------------------------------------------------
if ($Hash != $Args['V2_HASH']) {
return ERROR | @Trigger_Error('[comp/www/Merchant/Egold]: проверка подлинности завершилась не удачей');
}
#-------------------------------------------------------------------------------
$Invoice = DB_Select('Invoices', array('ID', 'Summ'), array('UNIQ', 'ID' => $Args['PAYMENT_ID']));
#-------------------------------------------------------------------------------
switch (ValueOf($Invoice)) {
case 'error':
return ERROR | @Trigger_Error(500);
case 'exception':
return ERROR | @Trigger_Error(400);
case 'array':
#---------------------------------------------------------------------------
if (Round($Invoice['Summ'] / $Settings['Course'], 2) != $Args['PAYEE_ACCOUNT']) {
return ERROR | @Trigger_Error('[comp/Merchant/Egold]: проверка суммы платежа завершилась не удачей');
}
#---------------------------------------------------------------------------
$Comp = Comp_Load('Users/Init', 100);
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#---------------------------------------------------------------------------
$Comp = Comp_Load('www/API/StatusSet', array('ModeID' => 'Invoices', 'StatusID' => 'Payed', 'RowsIDs' => $Invoice['ID'], 'Comment' => 'Автоматическое зачисление'));
#---------------------------------------------------------------------------
switch (ValueOf($Comp)) {
case 'error':
return ERROR | @Trigger_Error(500);
case 'exception':
return ERROR | @Trigger_Error(400);
示例11: GetUpdatesList
function GetUpdatesList(&$_2132833962, $_570174288 = false, $_1009125337 = "Y")
{
$_1272261578 = ___1498308727(1511);
$_984440988 = array();
CUpdateClient::AddMessage2Log(___1498308727(1512));
$_2050725472 = CUpdateClient::CollectRequestData($_1272261578, $_570174288, $_1009125337, array(), array(), array());
if ($_2050725472 === False || StrLen($_2050725472) <= min(28, 0, 9.3333333333333) || StrLen($_1272261578) > min(114, 0, 38)) {
$_2132833962 .= $_1272261578;
CUpdateClient::AddMessage2Log(___1498308727(1513), ___1498308727(1514));
return False;
}
CUpdateClient::AddMessage2Log($GLOBALS['____467353288'][698](___1498308727(1515), ___1498308727(1516), $_2050725472));
$_145565738 = CUpdateClient::getmicrotime();
$_1501652390 = CUpdateClient::GetHTTPPage(___1498308727(1517), $_2050725472, $_1272261578);
CUpdateClient::AddMessage2Log(___1498308727(1518) . Round(CUpdateClient::getmicrotime() - $_145565738, round(0 + 1 + 1 + 1)) . ___1498308727(1519));
$_984440988 = array();
if ($GLOBALS['____467353288'][699]($_1272261578) <= 230 * 2 - 460) {
CUpdateClient::ParseServerData($_1501652390, $_984440988, $_1272261578);
}
if ($GLOBALS['____467353288'][700]($_1272261578) <= min(62, 0, 20.666666666667)) {
if (!isset($_984440988[___1498308727(1520)]) || !$GLOBALS['____467353288'][701]($_984440988[___1498308727(1521)])) {
$_1272261578 .= ___1498308727(1522) . GetMessage(___1498308727(1523)) . ___1498308727(1524);
}
}
if ($GLOBALS['____467353288'][702]($_1272261578) <= min(18, 0, 6)) {
$_984440988 = $_984440988[___1498308727(1525)][___1498308727(1526)];
if (!$GLOBALS['____467353288'][703]($_984440988[___1498308727(1527)]) && (!isset($_984440988[___1498308727(1528)]) || !$GLOBALS['____467353288'][704]($_984440988[___1498308727(1529)]))) {
$_1272261578 .= ___1498308727(1530) . GetMessage(___1498308727(1531)) . ___1498308727(1532);
}
}
if ($GLOBALS['____467353288'][705]($_1272261578) > 1236 / 2 - 618) {
CUpdateClient::AddMessage2Log($_1272261578, ___1498308727(1533));
$_2132833962 .= $_1272261578;
return False;
} else {
return $_984440988;
}
}
示例12: __SetTimeMark
function __SetTimeMark($text, $startStop = "")
{
global $bCmlDebug;
global $cmlTimeMarkTo, $cmlTimeMarkFrom, $cmlTimeMarkGlobalFrom;
global $cmlMemoryMarkTo, $cmlMemoryMarkFrom, $cmlMemoryMarkGlobalFrom;
//echo " ";
//flush();
if (!$bCmlDebug) {
return;
}
if (StrToUpper($startStop) == "START") {
$hFile = fopen($_SERVER["DOCUMENT_ROOT"] . CML_DEBUG_FILE_NAME, "w");
fwrite($hFile, date("H:i:s") . " - " . __getMemoryUsage() . " - " . $text . "\n");
fclose($hFile);
$cmlMemoryMarkGlobalFrom = __getMemoryUsage();
$cmlMemoryMarkFrom = __getMemoryUsage();
$cmlTimeMarkGlobalFrom = __getMicroTime();
$cmlTimeMarkFrom = __getMicroTime();
} elseif (StrToUpper($startStop) == "STOP") {
$cmlTimeMarkTo = __getMicroTime();
$cmlMemoryMarkTo = __getMemoryUsage();
$hFile = fopen($_SERVER["DOCUMENT_ROOT"] . CML_DEBUG_FILE_NAME, "a");
fwrite($hFile, date("H:i:s") . " - " . Round($cmlTimeMarkTo - $cmlTimeMarkFrom, 3) . " s - " . ($cmlMemoryMarkTo - $cmlMemoryMarkFrom) . " - " . $text . "\n");
fwrite($hFile, date("H:i:s") . " - " . Round($cmlTimeMarkTo - $cmlTimeMarkGlobalFrom, 3) . " s - " . ($cmlMemoryMarkTo - $cmlMemoryMarkGlobalFrom) . "\n");
fclose($hFile);
} else {
$cmlTimeMarkTo = __getMicroTime();
$cmlMemoryMarkTo = __getMemoryUsage();
$hFile = fopen($_SERVER["DOCUMENT_ROOT"] . CML_DEBUG_FILE_NAME, "a");
fwrite($hFile, date("H:i:s") . " - " . Round($cmlTimeMarkTo - $cmlTimeMarkFrom, 3) . " s - " . ($cmlMemoryMarkTo - $cmlMemoryMarkFrom) . " - " . ($cmlMemoryMarkTo - $cmlMemoryMarkGlobalFrom) . " - " . $text . "\n");
fclose($hFile);
$cmlMemoryMarkFrom = __getMemoryUsage();
$cmlTimeMarkFrom = __getMicroTime();
}
}
示例13: array
/******************************************************************************/
/******************************************************************************/
$__args_list = array('SystemID', 'InvoiceID', 'Summ');
/******************************************************************************/
eval(COMP_INIT);
/******************************************************************************/
/******************************************************************************/
$Config = Config();
#-------------------------------------------------------------------------------
$Settings = $Config['Invoices']['PaymentSystems']['Checkout'];
#-------------------------------------------------------------------------------
$Send = $Settings['Send'];
#-------------------------------------------------------------------------------
$Send['cart_order_id'] = $InvoiceID;
#-------------------------------------------------------------------------------
$Send['total'] = Round($Summ / $Settings['Course'], 2);
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Formats/Invoice/Number', $InvoiceID);
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$__USER = $GLOBALS['__USER'];
#-------------------------------------------------------------------------------
$Send['c_description_1'] .= SPrintF('%s, %s (%s)', $Comp, Translit($__USER['Name']), $__USER['Email']);
$Send['c_name_1'] = $Send['c_description_1'];
$Send['c_prod_1'] = $Send['c_description_1'];
$Send['c_price_1'] = $Send['total'];
#-------------------------------------------------------------------------------
return $Send;
#-------------------------------------------------------------------------------
示例14: AddPage
//.........这里部分代码省略.........
$pdf->Cell(50, 5, $numarasi, 0, 0, 'L');
$pdf->SetXY(10, 45);
$pdf->Cell(38, 5, 'TOPLAM PUAN', 0, 0, 'L');
$pdf->Cell(50, 5, $PUAN['TOPLAM'], 0, 0, 'L');
$dersadi = $GLOBALS["ders"];
$pdf->SetXY(10, 55);
$pdf->Rect(10, 55, 38, 5, "||");
$pdf->Cell(45, 5, 'SONUC TABLOSU', 0, 0, 'C');
//$pdf->Cell(38,5,'MATEMAT�K',0,0,'C');
//$pdf->Cell(38,5,'FEN VE TEKNOLOJ�',0,0,'C');
//$pdf->Cell(38,5,'SOSYAL B�LG�LER',0,0,'C');
//$pdf->Cell(38,5,'�NG�L�ZCE',0,0,'C');
$pdf->Rect(10, 60, 38, 10, "");
$pdf->Rect(10, 65, 38, 5, "");
$pdf->Rect(10, 70, 38, 5, "");
$pdf->Rect(10, 75, 38, 5, "");
//$pdf->Rect(10, 55, 38, 25 ,"");
//$pdf->Rect(48, 55, 38, 25 ,"");
//$pdf->Rect(86, 55, 38, 25 ,"");
//$pdf->Rect(124, 55, 38, 25 ,"");
//$pdf->Rect(162, 55, 38, 25 ,"");
$pdf->Line(19.5, 60, 19.5, 70);
$pdf->Line(29, 60, 29, 70);
$pdf->Line(38.5, 60, 38.5, 70);
$pdf->Line(48, 60, 48, 70);
//$pdf->Line(57.5, 60, 57.5, 70);
//$pdf->Line(67, 60, 67, 70);
//$pdf->Line(76.5, 60, 76.5, 70);
//$pdf->Line(86, 60, 86, 70);
//$pdf->Line(95.5, 60, 95.5, 70);
//$pdf->Line(105, 60, 105, 70);
//$pdf->Line(114.5, 60, 114.5, 70);
//$pdf->Line(124, 60, 124, 70);
//$pdf->Line(133.5, 60, 133.5, 70);
//$pdf->Line(143, 60, 143, 70);
//$pdf->Line(152.5, 60, 152.5, 70);
//$pdf->Line(162, 60, 162, 70);
//$pdf->Line(171.5, 60, 171.5, 70);
//$pdf->Line(181, 60, 181, 70);
//$pdf->Line(190.5, 60, 190.5, 70);
$pdf->SetXY(10, 60);
$pdf->Cell(9.5, 5, 'D', 0, 0, 'C');
$pdf->Cell(9.5, 5, 'Y', 0, 0, 'C');
$pdf->Cell(9.5, 5, 'B', 0, 0, 'C');
$pdf->Cell(9.5, 5, 'N', 0, 0, 'C');
//$pdf->Cell(9.5,5,'D',0,0,'C');
//$pdf->Cell(9.5,5,'Y',0,0,'C');
//$pdf->Cell(9.5,5,'B',0,0,'C');
//$pdf->Cell(9.5,5,'N',0,0,'C');
//$pdf->Cell(9.5,5,'D',0,0,'C');
//$pdf->Cell(9.5,5,'Y',0,0,'C');
//$pdf->Cell(9.5,5,'B',0,0,'C');
//$pdf->Cell(9.5,5,'N',0,0,'C');
//$pdf->Cell(9.5,5,'D',0,0,'C');
//$pdf->Cell(9.5,5,'Y',0,0,'C');
//$pdf->Cell(9.5,5,'B',0,0,'C');
//$pdf->Cell(9.5,5,'N',0,0,'C');
//$pdf->Cell(9.5,5,'D',0,0,'C');
//$pdf->Cell(9.5,5,'Y',0,0,'C');
//$pdf->Cell(9.5,5,'B',0,0,'C');
//$pdf->Cell(9.5,5,'N',0,0,'C');
$pdf->SetXY(10, 65);
$pdf->Cell(9.5, 5, Round($PUAN['D'][0], 2), 0, 0, 'C');
$pdf->Cell(9.5, 5, Round($PUAN['D'][1], 2), 0, 0, 'C');
$pdf->Cell(9.5, 5, Round($PUAN['D'][2], 2), 0, 0, 'C');
$pdf->Cell(9.5, 5, Round($PUAN['D'][3], 2), 0, 0, 'C');
//$pdf->Cell(9.5,5,Round($PUAN['M'][0], 2),0,0,'C');
//$pdf->Cell(9.5,5,Round($PUAN['M'][1], 2),0,0,'C');
//$pdf->Cell(9.5,5,Round($PUAN['M'][2], 2),0,0,'C');
//$pdf->Cell(9.5,5,Round($PUAN['M'][3], 2),0,0,'C');
//$pdf->Cell(9.5,5,Round($PUAN['F'][0], 2),0,0,'C');
//$pdf->Cell(9.5,5,Round($PUAN['F'][1], 2),0,0,'C');
//$pdf->Cell(9.5,5,Round($PUAN['F'][2], 2),0,0,'C');
//$pdf->Cell(9.5,5,Round($PUAN['F'][3], 2),0,0,'C');
//$pdf->Cell(9.5,5,Round($PUAN['S'][0], 2),0,0,'C');
//$pdf->Cell(9.5,5,Round($PUAN['S'][1], 2),0,0,'C');
//$pdf->Cell(9.5,5,Round($PUAN['S'][2], 2),0,0,'C');
//$pdf->Cell(9.5,5,Round($PUAN['S'][3], 2),0,0,'C');
//$pdf->Cell(9.5,5,Round($PUAN['D'][0], 2),0,0,'C');
//$pdf->Cell(9.5,5,Round($PUAN['D'][1], 2),0,0,'C');
//$pdf->Cell(9.5,5,Round($PUAN['D'][2], 2),0,0,'C');
//$pdf->Cell(9.5,5,Round($PUAN['D'][3], 2),0,0,'C');
$pdf->SetXY(10, 70);
$pdf->Cell(38, 5, '% BASARI', 0, 0, 'C');
//$pdf->Cell(38,5,'% BA�ARI',0,0,'C');
//$pdf->Cell(38,5,'% BA�ARI',0,0,'C');
//$pdf->Cell(38,5,'% BA�ARI',0,0,'C');
//$pdf->Cell(38,5,'% BA�ARI',0,0,'C');
$pdf->SetXY(10, 75);
//$pdf->Cell(38,5,Round($PUAN['T'][4], 2),0,0,'C');
//$pdf->Cell(38,5,Round($PUAN['M'][4], 2),0,0,'C');
//$pdf->Cell(38,5,Round($PUAN['F'][4], 2),0,0,'C');
//$pdf->Cell(38,5,Round($PUAN['S'][4], 2),0,0,'C');
$pdf->Cell(38, 5, Round($PUAN['D'][4], 2), 0, 0, 'C');
rapor_query($adi, $soyadi, $numarasi, $dersadi, $sinif, $sube, $readerUTime, $PUAN['D']);
//rapor_query($adi,$soyadi,$numarasi,'M',$sinif,$sube,$readerUTime,$PUAN['M']);
//rapor_query($adi,$soyadi,$numarasi,'F',$sinif,$sube,$readerUTime,$PUAN['F']);
//rapor_query($adi,$soyadi,$numarasi,'S',$sinif,$sube,$readerUTime,$PUAN['S']);
//rapor_query($adi,$soyadi,$numarasi,'D',$sinif,$sube,$readerUTime,$PUAN['D']);
}
示例15: substr
else
{
//$arResFields[$i] = $res1["PROPERTY_".substr($arNeedFields[$i], strlen("IP_PROP"))."_VALUE"];
$arResFields[$i] = $res1["PROPERTY_".$strTempo."_VALUE"];
}
$bFieldOut = True;
}
elseif ($boolCatalog && substr($arNeedFields[$i], 0, strlen("CR_PRICE_"))=="CR_PRICE_")
{
$sPriceTmp = substr($arNeedFields[$i], strlen("CR_PRICE_"));
$arPriceTmp = explode("_", $sPriceTmp);
if (strlen($res1["CATALOG_CURRENCY_".intval($arPriceTmp[0])])>0
&& $res1["CATALOG_CURRENCY_".intval($arPriceTmp[0])]!=$arPriceTmp[1])
{
$arResFields[$i] = Round(CCurrencyRates::ConvertCurrency($res1["CATALOG_PRICE_".intval($arPriceTmp[0])], $res1["CATALOG_CURRENCY_".intval($arPriceTmp[0])], $arPriceTmp[1]), 2);
}
else
{
$arResFields[$i] = $res1["CATALOG_PRICE_".intval($arPriceTmp[0])];
}
$bFieldOut = True;
}
}
if (!$bFieldOut)
{
foreach ($arAvailGroupFields_names as $key => $value)
{
if ($key==substr($arNeedFields[$i], 0, strlen($key))
&& is_numeric(substr($arNeedFields[$i], strlen($key))))