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);
}
Example #2
0
 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;
 }
Example #3
0
 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;
 }
Example #4
0
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);
}
Example #5
0
		/**
 * 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);
	}
}
Example #6
0
 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;
 }
Example #7
0
 /**
  * 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;
                     $texty = $texty - round(imagefontheight($this->fontsize) / 2, 0);
                     $shadowcolor = imagecolorallocate($this->image, $this->color[0][0] - 50 < 0 ? 0 : $this->color[0][0] - 50, $this->color[0][1] - 50 < 0 ? 0 : $this->color[0][1] - 50, $this->color[0][2] - 50 < 0 ? 0 : $this->color[0][2] - 50);
                     imagestring($this->image, $this->fontsize, $textx - 1, $texty - 1, $value, $shadowcolor);
                     imagestring($this->image, $this->fontsize, $textx + 1, $texty + 1, $value, $shadowcolor);
                     imagestring($this->image, $this->fontsize, $textx + 2, $texty + 2, $value, $shadowcolor);
                     imagestring($this->image, $this->fontsize, $textx, $texty, $value, $textcolor);
                     imagecolordeallocate($this->image, $shadowcolor);
                 }
             }
         }
     }
     return true;
 }
Example #8
0
 /**
  * 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);
 }
     $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));
Example #10
0
$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);
Example #11
0
 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;
     }
 }
Example #12
0
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();
    }
}
Example #13
0
/******************************************************************************/
/******************************************************************************/
$__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;
#-------------------------------------------------------------------------------
Example #14
0
function AddPage($adi, $soyadi, $numarasi, $sinif, $sube, $cevapanahtariUTime, $readerUTime)
{
    global $pdf, $dbh;
    $dersadi = $GLOBALS["ders"];
    $kturu = $_SESSION["data"]["kturu"];
    $PUAN = array();
    $Dogru = 0;
    $Yanlis = 0;
    $Bos = 0;
    $Net = 0;
    $result = mysql_query("SELECT `ders`,`cevapnum`,`kitap`,`A`,`B`,`C`,`D` FROM `d_cevaplar` WHERE `ogrnum`=" . $numarasi . " AND `utime` = '" . $readerUTime . "' ORDER BY `cevapnum` ASC");
    if (!$result) {
        die('Invalid query: ' . mysql_error());
    }
    if (mysql_num_rows($result) > 0) {
        while ($row = mysql_fetch_assoc($result)) {
            $result2 = mysql_query("SELECT `A` , `B` , `C` , `D` FROM `d_cevapanahtari` WHERE `kturu` = '" . $row['kitap'] . "' AND `ders` = '" . $row['ders'] . "' AND `utime` = '" . $cevapanahtariUTime . "' AND `cevapnum`='" . $row['cevapnum'] . "' ORDER BY `cevapnum` ASC");
            if (!$result2) {
                die('Invalid query: ' . mysql_error());
            }
            if (mysql_num_rows($result2) > 0) {
                $Karar = -1;
                // YANLIS
                $CevapA = $row['A'];
                $CevapB = $row['B'];
                $CevapC = $row['C'];
                $CevapD = $row['D'];
                $AnahtarA = mysql_result($result2, 0, "A");
                $AnahtarB = mysql_result($result2, 0, "B");
                $AnahtarC = mysql_result($result2, 0, "C");
                $AnahtarD = mysql_result($result2, 0, "D");
                if ($CevapA + $CevapB + $CevapC + $CevapD > 1) {
                    $Karar = -1;
                } else {
                    if ($CevapA + $CevapB + $CevapC + $CevapD == 0) {
                        $Karar = 0;
                    } else {
                        if ($AnahtarA == 1) {
                            if ($CevapA == 1) {
                                $Karar = 1;
                            }
                            //DOGRU
                        }
                        if ($AnahtarB == 1) {
                            if ($CevapB == 1) {
                                $Karar = 1;
                            }
                        }
                        if ($AnahtarC == 1) {
                            if ($CevapC == 1) {
                                $Karar = 1;
                            }
                        }
                        if ($AnahtarD == 1) {
                            if ($CevapD == 1) {
                                $Karar = 1;
                            }
                        }
                    }
                }
                if ($Karar == -1) {
                    $Yanlis += 1;
                } else {
                    if ($Karar == 0) {
                        $Bos += 1;
                    } else {
                        if ($Karar == 1) {
                            $Dogru += 1;
                        }
                    }
                }
                // son
            }
        }
    }
    $Net = $Dogru - $Yanlis / 3;
    $Basari = $Dogru * 10;
    $PUAN['D'] = array($Dogru, $Yanlis, $Bos, $Net, $Basari);
    $PUAN['TOPLAM'] = round($Basari, 2);
    if ($PUAN['T'][3] == 0 && $PUAN['M'][3] == 0 && $PUAN['F'][3] == 0 && $PUAN['S'][3] == 0 && $PUAN['D'][3] == 0) {
        mysql_query("UPDATE `d_reader` SET `puan` = '0' WHERE `utime` = '" . $readerUTime . "' AND `num` =" . $numarasi);
    } else {
        mysql_query("UPDATE `d_reader` SET `puan` = '" . $PUAN['TOPLAM'] . "' WHERE `utime` = '" . $readerUTime . "' AND `num` =" . $numarasi);
    }
    //round(1.95583, 2);
    $pdf->AddPage();
    $pdf->AddFont('verdana', '', 'verdana.php');
    $pdf->SetFont('verdana', '', 8);
    $pdf->SetXY(6, 10);
    $pdf->Cell(0, 2, 'ONDOKUZ MAYIS UNIVERSITESI', 0, 0, 'C');
    $pdf->SetXY(3, 11);
    //$pdf->Cell(0,8,$dersadi,0,0,'C');
    $pdf->SetXY(3, 12);
    $pdf->Cell(0, 14, 'SINAV SONUC BELGESI', 0, 0, 'C');
    $pdf->SetXY(10, 30);
    $pdf->Rect(10, 30, 100, 5);
    $pdf->Rect(10, 35, 100, 5);
    $pdf->Rect(10, 40, 100, 5, "");
    $pdf->Rect(10, 45, 100, 5, "");
    $pdf->Line(48, 30, 48, 50);
    $pdf->SetXY(10, 30);
    $pdf->Cell(38, 5, 'ADI SOYADI', 0, 0, 'L');
    $pdf->Cell(50, 5, $adi . " " . $soyadi, 0, 0, 'L');
    $pdf->SetXY(10, 35);
    $pdf->Cell(38, 5, 'SINIF', 0, 0, 'L');
    $pdf->Cell(50, 5, $sinif . ' / ' . $sube, 0, 0, 'L');
    $pdf->SetXY(10, 40);
    $pdf->Cell(38, 5, 'OKUL NO', 0, 0, 'L');
    $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']);
}
Example #15
0
							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))))
Example #16
0
	function GetSpamRating($message)
	{
		global $DB;

		$arWords = CMailFilter::getWords($message, 1000);

		if (empty($arWords))
			return 0;

		// for every word find Si
		$arWords = array_map("md5", $arWords);

		global $BX_MAIL_SPAM_CNT;
		if(!is_set($BX_MAIL_SPAM_CNT, "G"))
		{
			$strSql = "SELECT MAX(GOOD_CNT) as G, MAX(BAD_CNT) as B FROM b_mail_spam_weight";
			if($res = $DB->Query($strSql))
				$BX_MAIL_SPAM_CNT = $res->Fetch();

			if(intval($BX_MAIL_SPAM_CNT["G"])<=0)
				$BX_MAIL_SPAM_CNT["G"] = 1;

			if(intval($BX_MAIL_SPAM_CNT["B"])<=0)
				$BX_MAIL_SPAM_CNT["B"] = 1;
		}

		$CNT_WORDS = COption::GetOptionInt("mail", "spam_word_count", B_MAIL_WORD_CNT);
		$MIN_COUNT =  COption::GetOptionInt("mail", "spam_min_count", B_MAIL_MIN_CNT);
		// select $CNT_WORDS words with max |Si - 0.5|
		// if the word placed less then xxx (5) times, then ignore
		$strSql =
			"SELECT SW.*, ".
			"	(BAD_CNT/".$BX_MAIL_SPAM_CNT["B"].".0) / (2*GOOD_CNT/".$BX_MAIL_SPAM_CNT["G"].".0 + BAD_CNT/".$BX_MAIL_SPAM_CNT["B"].".0) as RATING, ".
			"	ABS((BAD_CNT/".$BX_MAIL_SPAM_CNT["B"].".0) / (2*GOOD_CNT/".$BX_MAIL_SPAM_CNT["G"].".0 + BAD_CNT/".$BX_MAIL_SPAM_CNT["B"].".0) - 0.5) as MOD_RATING ".
			"FROM b_mail_spam_weight SW ".
			"WHERE WORD_ID IN ('".implode("', '", $arWords)."') ".
			"	AND ABS((BAD_CNT/".$BX_MAIL_SPAM_CNT["B"].".0) / (2*GOOD_CNT/".$BX_MAIL_SPAM_CNT["G"].".0 + BAD_CNT/".$BX_MAIL_SPAM_CNT["B"].".0) - 0.5) > 0.1 ".
			"	AND TOTAL_CNT>".$MIN_COUNT." ".
			"ORDER BY MOD_RATING DESC ".
			(strtoupper($DB->type)=="MYSQL"?"LIMIT ".$CNT_WORDS : "");

		//echo htmlspecialcharsbx($strSql)."<br>";

		$a = 1;
		$b = 1;
		$dbr = $DB->Query($strSql, false, "File: ".__FILE__."<br>Line: ".__LINE__);
		$arr = true;
		$words = "";

		for($i=0; $i<$CNT_WORDS; $i++)
		{
			if($arr && $arr = $dbr->Fetch())
			{
				//echo "<font size='-3'>".htmlspecialcharsbx($arr["WORD_REAL"])."=".$arr["RATING"]."<br></font> ";
				$words .= $arr["WORD_REAL"]." ".Round($arr["RATING"]*100, 4)." ".$arr["BAD_CNT"]." ".$arr["GOOD_CNT"]."\n";
				$a = $a * ($arr["RATING"]==0?0.00001:$arr["RATING"]);
				$b = $b * (1 - ($arr["RATING"]==1?0.9999:$arr["RATING"]));
			}
			else
			{
				//if there is no word then weight Si = 0.4
				$a = $a * 0.4;
				$b = $b * (1 - 0.4);
			}
		}
		// calculate Bayes for the whole message
		$rating = $a/($a+$b) * 100;

		return Array("RATING"=>$rating, "WORDS"=>$words);
	}
Example #17
0
                $strCategory = $ar_iblock["NAME"];
                $sections_path = GetIBlockSectionPath($IBLOCK_ID, $ar_elems["IBLOCK_SECTION_ID"]);
                while ($arSection = $sections_path->GetNext()) {
                    if (strlen($strCategory) > 0) {
                        $strCategory .= ">";
                    }
                    $strCategory .= $arSection["NAME"];
                }
                $arSectionPaths[IntVal($ar_elems["IBLOCK_SECTION_ID"])] = PrepareString($strCategory);
            }
            $minPrice = 0;
            for ($i = 0, $intPCount = count($arPTypes); $i < $intPCount; $i++) {
                if (strlen($ar_elems["CATALOG_CURRENCY_" . $arPTypes[$i]]) <= 0) {
                    continue;
                }
                $tmpPrice = Round(CCurrencyRates::ConvertCurrency($ar_elems["CATALOG_PRICE_" . $arPTypes[$i]], $ar_elems["CATALOG_CURRENCY_" . $arPTypes[$i]], "USD"), 2);
                if ($minPrice <= 0 || $minPrice > $tmpPrice) {
                    $minPrice = $tmpPrice;
                }
            }
            if ($minPrice <= 0) {
                continue;
            }
            @fwrite($fp, "http://" . COption::GetOptionString("main", "server_name", $SERVER_NAME) . str_replace("//", "/", $ar_elems["DETAIL_PAGE_URL"]) . "\t" . $ar_elems["~NAME"] . "\t" . PrepareString($ar_elems["~PREVIEW_TEXT"], true) . "\t" . $strImage . "\t" . $arSectionPaths[IntVal($ar_elems["IBLOCK_SECTION_ID"])] . "\t" . $minPrice . "\n");
        }
        @fclose($fp);
    }
}
CCatalogDiscountSave::Enable();
if ($bTmpUserCreated) {
    unset($USER);
Example #18
0
 $DemRow = DB_fetch_row($DemResult);
 $StockDemand = $DemRow[0];
 $DemandDate = $DemRow[1];
 if (strlen(trim($DemandDate)) == 0) {
     $DemandDate = $DemRow[2];
 }
 if ($StockQOH < 0) {
     $StockQOH = 0;
 }
 if ($StockQOH + $StockQOWO - $StockDemand < 0) {
     $DemandQuantity = $StockDemand - ($StockQOH + $StockQOWO);
     if ($StockEOQ > 0) {
         if ($StockEOQ > $DemandQuantity) {
             $DemandQuantity = $StockEOQ;
         } else {
             $EOQMultiple = Round($DemandQuantity / $StockEOQ + 0.49, 0);
             $DemandQuantity = $StockEOQ * $EOQMultiple;
         }
     }
     $WO = GetNextTransNo(30, $db);
     // echo $WO. "= WO<BR>";
     $InsWOResult = DB_query("INSERT INTO workorders (wo,\n                                                     loccode,\n                                                     requiredby,\n                                                     startdate)\n                                     VALUES (" . $WO . ",\n                                            '" . $_SESSION['UserStockLocation'] . "',\n                                            '" . $DemandDate . "',\n                                            '" . Date('Y-m-d') . "')", $db);
     $sql = "INSERT INTO woitems (wo,\n\t                             stockid,\n\t                             qtyreqd,\n\t                             stdcost)\n\t         VALUES ( " . $WO . ",\n                         '" . $StockId . "',\n                         " . $DemandQuantity . ",\n                          0)";
     $result = DB_query($sql, $db, $ErrMsg);
     $sql2 = "INSERT INTO worequirements (wo,\n                                            parentstockid,\n                                            stockid,\n                                            qtypu,\n                                            stdcost,\n                                            autoissue)\n      \t                 SELECT " . $WO . ",\n        \t                           bom.parent,\n                                       bom.component,\n                                       bom.quantity,\n                                       (materialcost+labourcost+overheadcost)*bom.quantity,\n                                       autoissue\n                         FROM bom INNER JOIN stockmaster\n                         ON bom.component=stockmaster.stockid\n                         WHERE parent='" . $StockId . "'\n                         AND loccode ='" . $_POST['StockLocation'] . "'";
     $result = DB_query($sql2, $db, $ErrMsg);
     echo '<tr><TD>' . $StockId . '</TD>';
     echo '<td>' . $WO . '</td>';
     echo '<TD>' . $StockDescription . '</td>';
     echo '<td class="label">' . $DemandQuantity . '</td>';
     $PictureToDisplay = '/srv/www/htdocs/batavg/webERP2/companies/' . $_SESSION['DatabaseName'] . '/part_pics/' . $StockId . '.jpg';
Example #19
0
#-------------------------------------------------------------------------------
/** @author Alex Keda (for www.host-food.ru) */
/******************************************************************************/
/******************************************************************************/
$__args_list = array('PaymentSystemID', 'InvoiceID', 'Summ');
/******************************************************************************/
eval(COMP_INIT);
/******************************************************************************/
/******************************************************************************/
$Config = Config();
#-------------------------------------------------------------------------------
$Settings = $Config['Invoices']['PaymentSystems']['Uniteller'];
#-------------------------------------------------------------------------------
$Send = $Settings['Send'];
#-------------------------------------------------------------------------------
$Send['Subtotal_P'] = Round($Summ / $Settings['Course'], 2);
#-------------------------------------------------------------------------------
$Send['Order_IDP'] = $InvoiceID;
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Formats/Invoice/Number', $InvoiceID);
if (Is_Error($Comp)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$__USER = $GLOBALS['__USER'];
#-------------------------------------------------------------------------------
$Send['Comment'] .= SPrintF('%s, %s (%s)', $Comp, Translit($__USER['Name']), $__USER['Email']);
#-------------------------------------------------------------------------------
$Protocol = @$_SERVER['SERVER_PORT'] != 80 ? 'https' : 'http';
#-------------------------------------------------------------------------------
$Send['URL_RETURN'] = SPrintF('%s://%s/Invoices', $Protocol, HOST_ID);
 public static function ActivateCoupon($coupon, &$strError, $lang = false, $stableVersionsOnly = "Y")
 {
     $strError_tmp = "";
     CUpdateClientPartner::AddMessage2Log("exec CUpdateClientPartner::ActivateCoupon");
     $strQuery = CUpdateClientPartner::__CollectRequestData($strError_tmp, $lang, $stableVersionsOnly, array(), array());
     if ($strQuery === False || StrLen($strQuery) <= 0 || StrLen($strError_tmp) > 0) {
         if (StrLen($strError_tmp) <= 0) {
             $strError_tmp = "[RV01] " . GetMessage("SUPZ_NO_QSTRING") . ". ";
         }
     }
     if (StrLen($strError_tmp) <= 0) {
         $strQuery .= "&coupon=" . UrlEncode($coupon) . "&query_type=coupon";
         CUpdateClientPartner::AddMessage2Log(preg_replace("/LICENSE_KEY=[^&]*/i", "LICENSE_KEY=X", $strQuery));
         /*
         foreach ($arFields as $key => $value)
         	$strQuery .= "&".$key."=".urlencode($value);
         */
         $stime = CUpdateClientPartner::__GetMicroTime();
         $content = CUpdateClientPartner::__GetHTTPPage("ACTIV", $strQuery, $strError_tmp);
         if (strlen($content) <= 0) {
             if (StrLen($strError_tmp) <= 0) {
                 $strError_tmp = "[GNSU02] " . GetMessage("SUPZ_EMPTY_ANSWER") . ". ";
             }
         }
         CUpdateClientPartner::AddMessage2Log("TIME ActivateCoupon(request) " . Round(CUpdateClientPartner::__GetMicroTime() - $stime, 3) . " sec");
     }
     if (strlen($strError_tmp) <= 0) {
         $arRes = array();
         CUpdateClientPartner::__ParseServerData($content, $arRes, $strError_tmp);
     }
     if (strlen($strError_tmp) <= 0) {
         if (isset($arRes["DATA"]["#"]["ERROR"]) && is_array($arRes["DATA"]["#"]["ERROR"]) && count($arRes["DATA"]["#"]["ERROR"]) > 0) {
             for ($i = 0, $n = count($arRes["DATA"]["#"]["ERROR"]); $i < $n; $i++) {
                 if (strlen($arRes["DATA"]["#"]["ERROR"][$i]["@"]["TYPE"]) > 0) {
                     $strError_tmp .= "[" . $arRes["DATA"]["#"]["ERROR"][$i]["@"]["TYPE"] . "] ";
                 }
                 $strError_tmp .= $arRes["DATA"]["#"]["ERROR"][$i]["#"] . ". ";
             }
         }
     }
     if (strlen($strError_tmp) > 0) {
         CUpdateClientPartner::AddMessage2Log($strError_tmp, "AC");
         $strError .= $strError_tmp;
         return False;
     } else {
         return True;
     }
 }
<?php

/////////////////////////////////////////////////////
//Внимание скрипт это скрипт выгрузки только для .US
/////////////////////////////////////////////////////
set_time_limit(0);
define("HTTP_SERVER", "http://www.setbook.us");
chdir('/var/www/2009/');
require 'includes/application_top.php';
include 'cron/include/logs.class.php';
include 'cron/include/yandex.functions.php';
$logs = new logs('cron/logs/export_yandex_xml.log');
$GLOBAL_CRON = true;
$logs->write("------------- START --------------");
/*
	Общая выгрузка
*/
//из-за того что не выгружается файл по крон, прописываем жестко пути для русского сайта
$HTTP_GET_VARS['file'] = "/var/www/2009/prices/yandex_xml/yandex_us.xml";
//http://www.setbook.ru/prices/yandex_xml/yandex_us.xml
$logs->write("START [US, " . (isset($HTTP_GET_VARS['type']) ? $HTTP_GET_VARS['type'] : 'ALL') . "] " . $HTTP_GET_VARS['file']);
$res = generate($HTTP_GET_VARS);
$logs->write("STAT Categories: " . $res['Categories'] . ", Offers: " . $res['Offers'] . ", Filesize: " . Round(filesize($HTTP_GET_VARS['file']) / 1024 / 1024, 2) . "Mb");
$logs->write("END " . $HTTP_GET_VARS['file']);
unset($logs);
Example #22
0
 public function getHijriArray($mydate)
 {
     $month = date("m", strtotime($mydate));
     $day = date("j", strtotime($mydate));
     $year = date("Y", strtotime($mydate));
     //$time = mktime(0, 0, 0, Date(m), Date(j), Date(Y));
     $time = mktime(0, 0, 0, $month, $day, $year);
     $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;
     }
     if ($HMonths == "1") {
         $Month_Name = "محرم";
     } else {
         if ($HMonths == "2") {
             $Month_Name = "صفر";
         } else {
             if ($HMonths == "3") {
                 $Month_Name = "ربيع اول";
             } else {
                 if ($HMonths == "4") {
                     $Month_Name = "ربيع اخر";
                 } else {
                     if ($HMonths == "5") {
                         $Month_Name = "جماد اول";
                     } else {
                         if ($HMonths == "6") {
                             $Month_Name = "جماد اخر";
                         } else {
                             if ($HMonths == "7") {
                                 $Month_Name = "رجب";
                             } else {
                                 if ($HMonths == "8") {
                                     $Month_Name = "شعبان";
                                 } else {
                                     if ($HMonths == "9") {
                                         $Month_Name = "رمضان";
                                     } else {
                                         if ($HMonths == "10") {
                                             $Month_Name = "شوال";
                                         } else {
                                             if ($HMonths == "11") {
                                                 $Month_Name = "ذو القعدة";
                                             } else {
                                                 if ($HMonths == "12") {
                                                     $Month_Name = "ذو الحجة";
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     $NowDay = $HDays;
     $NowMonth = $HMonths;
     $NowYear = $HYear;
     $MDay_Num = date("w");
     if ($MDay_Num == "0") {
         $MDay_Name = "الأحد";
     } elseif ($MDay_Num == "1") {
         $MDay_Name = "الإثنين";
     } elseif ($MDay_Num == "2") {
         $MDay_Name = "الثلاثاء";
     } elseif ($MDay_Num == "3") {
         $MDay_Name = "الأربعاء";
     } elseif ($MDay_Num == "4") {
         $MDay_Name = "الخميس";
     } elseif ($MDay_Num == "5") {
         $MDay_Name = "الجمعة";
     } elseif ($MDay_Num == "6") {
         $MDay_Name = "السبت";
     }
     $NowDayName = $MDay_Name;
     $NowDate = $MDay_Name . "، " . $HDays . " " . $Month_Name . " " . $HYear . " هجريا";
     $NowDate = array();
     $NowDate['day'] = $HDays;
     $NowDate['month'] = $Month_Name;
     $NowDate['year'] = $HYear;
     return $NowDate;
 }
Example #23
0
 #-------------------------------------------------------------------
 $VPSOrderID = (int) $VPSOrder['ID'];
 #-------------------------------------------------------------------
 $CostPay = 0.0;
 #-------------------------------------------------------------------
 $DaysRemainded = $DaysPay;
 #-------------------------------------------------------------------
 $Comp = Comp_Load('Services/Bonuses', $DaysRemainded, $VPSOrder['ServiceID'], $VPSScheme['ID'], $UserID, $CostPay, $VPSScheme['CostDay'], $VPSOrder['OrderID']);
 if (Is_Error($Comp)) {
     return ERROR | @Trigger_Error(500);
 }
 #-----------------------------------------------------------------
 $CostPay = $Comp['CostPay'];
 $Bonuses = $Comp['Bonuses'];
 #-------------------------------------------------------------------
 $CostPay = Round($CostPay, 2);
 #-------------------------------------------------------------------
 #-------------------------------------------------------------------
 if ($VPSScheme['CostInstall'] > 0) {
     # need give installation payment
     if (!$VPSOrder['IsPayed']) {
         # if it not prolongation
         $CostPay += $VPSScheme['CostInstall'];
     }
 }
 #-------------------------------------------------------------------
 #-------------------------------------------------------------------
 if ($IsUseBasket || !$IsNoBasket && $CostPay > $VPSOrder['ContractBalance']) {
     #-----------------------------------------------------------------
     if (Is_Error(DB_Roll($TransactionID))) {
         return ERROR | @Trigger_Error(500);
Example #24
0
 function mp3_id($file)
 {
     // Lux: we keep all variables internal within this function, that way our global namespace
     // is kept clean, and we can still call this method like a function without instantiating
     // a whole class to do so.
     //global $version, $layer, $crc, $bitrate, $bitindex, $freq, $mode, $copy, $genres;
     // Corrected by Luca (18/06/01): luca@linuxmendoza.org.ar
     $genres = array('Blues', 'Classic Rock', 'Country', 'Dance', 'Disco', 'Funk', 'Grunge', 'Hip-Hop', 'Jazz', 'Metal', 'New Age', 'Oldies', 'Other', 'Pop', 'R&B', 'Rap', 'Reggae', 'Rock', 'Techno', 'Industrial', 'Alternative', 'Ska', 'Death Metal', 'Pranks', 'Soundtrack', 'Euro-Techno', 'Ambient', 'Trip-Hop', 'Vocal', 'Jazz+Funk', 'Fusion', 'Trance', 'Classical', 'Instrumental', 'Acid', 'House', 'Game', 'Sound Clip', 'Gospel', 'Noise', 'AlternRock', 'Bass', 'Soul', 'Punk', 'Space', 'Meditative', 'Instrumental Pop', 'Instrumental Rock', 'Ethnic', 'Gothic', 'Darkwave', 'Techno-Industrial', 'Electronic', 'Pop-Folk', 'Eurodance', 'Dream', 'Southern Rock', 'Comedy', 'Cult', 'Gangsta', 'Top 40', 'Christian Rap', 'Pop/Funk', 'Jungle', 'Native American', 'Cabaret', 'New Wave', 'Psychadelic', 'Rave', 'Showtunes', 'Trailer', 'Lo-Fi', 'Tribal', 'Acid Punk', 'Acid Jazz', 'Polka', 'Retro', 'Musical', 'Rock & Roll', 'Hard Rock', 'Folk', 'Folk-Rock', 'National Folk', 'Swing', 'Fast Fusion', 'Bebob', 'Latin', 'Revival', 'Celtic', 'Bluegrass', 'Avantgarde', 'Gothic Rock', 'Progressive Rock', 'Psychedelic Rock', 'Symphonic Rock', 'Slow Rock', 'Big Band', 'Chorus', 'Easy Listening', 'Acoustic', 'Humour', 'Speech', 'Chanson', 'Opera', 'Chamber Music', 'Sonata', 'Symphony', 'Booty Bass', 'Primus', 'P**n Groove', 'Satire', 'Slow Jam', 'Club', 'Tango', 'Samba', 'Folklore', 'Ballad', 'Power Ballad', 'Rhythmic Soul', 'Freestyle', 'Duet', 'Punk Rock', 'Drum Solo', 'Acapella', 'Euro-House', 'Dance Hall');
     $genreids = array("Blues" => 0, "Classic Rock" => 1, "Country" => 2, "Dance" => 3, "Disco" => 4, "Funk" => 5, "Grunge" => 6, "Hip-Hop" => 7, "Jazz" => 8, "Metal" => 9, "New Age" => 10, "Oldies" => 11, "Other" => 12, "Pop" => 13, "R&B" => 14, "Rap" => 15, "Reggae" => 16, "Rock" => 17, "Techno" => 18, "Industrial" => 19, "Alternative" => 20, "Ska" => 21, "Death Metal" => 22, "Pranks" => 23, "Soundtrack" => 24, "Euro-Techno" => 25, "Ambient" => 26, "Trip-Hop" => 27, "Vocal" => 28, "Jazz+Funk" => 29, "Fusion" => 30, "Trance" => 31, "Classical" => 32, "Instrumental" => 33, "Acid" => 34, "House" => 35, "Game" => 36, "Sound Clip" => 37, "Gospel" => 38, "Noise" => 39, "AlternRock" => 40, "Bass" => 41, "Soul" => 42, "Punk" => 43, "Space" => 44, "Meditative" => 45, "Instrumental Pop" => 46, "Instrumental Rock" => 47, "Ethnic" => 48, "Gothic" => 49, "Darkwave" => 50, "Techno-Industrial" => 51, "Electronic" => 52, "Pop-Folk" => 53, "Eurodance" => 54, "Dream" => 55, "Southern Rock" => 56, "Comedy" => 57, "Cult" => 58, "Gangsta" => 59, "Top 40" => 60, "Christian Rap" => 61, "Pop/Funk" => 62, "Jungle" => 63, "Native American" => 64, "Cabaret" => 65, "New Wave" => 66, "Psychadelic" => 67, "Rave" => 68, "Showtunes" => 69, "Trailer" => 70, "Lo-Fi" => 71, "Tribal" => 72, "Acid Punk" => 73, "Acid Jazz" => 74, "Polka" => 75, "Retro" => 76, "Musical" => 77, "Rock & Roll" => 78, "Hard Rock" => 79, "Folk" => 80, "Folk-Rock" => 81, "National Folk" => 82, "Swing" => 83, "Fast Fusion" => 84, "Bebob" => 85, "Latin" => 86, "Revival" => 87, "Celtic" => 88, "Bluegrass" => 89, "Avantgarde" => 90, "Gothic Rock" => 91, "Progressive Rock" => 92, "Psychedelic Rock" => 93, "Symphonic Rock" => 94, "Slow Rock" => 95, "Big Band" => 96, "Chorus" => 97, "Easy Listening" => 98, "Acoustic" => 99, "Humour" => 100, "Speech" => 101, "Chanson" => 102, "Opera" => 103, "Chamber Music" => 104, "Sonata" => 105, "Symphony" => 106, "Booty Bass" => 107, "Primus" => 108, "P**n Groove" => 109, "Satire" => 110, "Slow Jam" => 111, "Club" => 112, "Tango" => 113, "Samba" => 114, "Folklore" => 115, "Ballad" => 116, "Power Ballad" => 117, "Rhythmic Soul" => 118, "Freestyle" => 119, "Duet" => 120, "Punk Rock" => 121, "Drum Solo" => 122, "Acapella" => 123, "Euro-House" => 124, "Dance Hall" => 125);
     // end
     $version = array("00" => 2.5, "10" => 2, "11" => 1);
     $layer = array("01" => 3, "10" => 2, "11" => 1);
     $crc = array("Yes", "No");
     $bitrate["0001"] = array(32, 32, 32, 32, 8, 8);
     $bitrate["0010"] = array(64, 48, 40, 48, 16, 16);
     $bitrate["0011"] = array(96, 56, 48, 56, 24, 24);
     $bitrate["0100"] = array(128, 64, 56, 64, 32, 32);
     $bitrate["0101"] = array(160, 80, 64, 80, 40, 40);
     $bitrate["0110"] = array(192, 96, 80, 96, 48, 48);
     $bitrate["0111"] = array(224, 112, 96, 112, 56, 56);
     $bitrate["1000"] = array(256, 128, 112, 128, 64, 64);
     $bitrate["1001"] = array(288, 160, 128, 144, 80, 80);
     $bitrate["1010"] = array(320, 192, 160, 160, 96, 96);
     $bitrate["1011"] = array(352, 224, 192, 176, 112, 112);
     $bitrate["1100"] = array(384, 256, 224, 192, 128, 128);
     $bitrate["1101"] = array(416, 320, 256, 224, 144, 144);
     $bitrate["1110"] = array(448, 384, 320, 256, 160, 160);
     $bitindex = array("1111" => "0", "1110" => "1", "1101" => "2", "1011" => "3", "1010" => "4", "1001" => "5", "0011" => "3", "0010" => 4, "0001" => "5");
     $freq["00"] = array("11" => 44100, "10" => 22050, "00" => 11025);
     $freq["01"] = array("11" => 48000, "10" => 24000, "00" => 12000);
     $freq["10"] = array("11" => 32000, "10" => 16000, "00" => 8000);
     $mode = array("00" => "Stereo", "01" => "Joint stereo", "10" => "Dual channel", "11" => "Mono");
     $copy = array("No", "Yes");
     if (!($f = @fopen($file, "r"))) {
         return -1;
         break;
     } else {
         // read first 4 bytes from file and determine if it is wave file if so, header begins five bytes after word 'data'
         $tmp = fread($f, 4);
         if ($tmp == "RIFF") {
             $idtag["ftype"] = "Wave";
             fseek($f, 0);
             $tmp = fread($f, 128);
             $x = StrPos($tmp, "data");
             fseek($f, $x + 8);
             $tmp = fread($f, 4);
         }
         // now convert those four bytes to BIN. maybe it can be faster and easier. dunno how yet. help?
         for ($y = 0; $y < 4; $y++) {
             $x = decbin(ord($tmp[$y]));
             for ($i = 0; $i < 8 - StrLen($x); $i++) {
                 $x .= "0";
             }
             $bajt .= $x;
         }
         // every mp3 framesynch begins with eleven ones, lets look for it. if not found continue looking for some 1024 bytes (you can search multiple for it or you can disable this, it will speed up and not many mp3 are like this. anyways its not standart)
         //     if(substr($bajt,1,11)!="11111111111") {
         //        return -1;
         //        break;
         //     }
         if (substr($bajt, 1, 11) != "11111111111") {
             fseek($f, 4);
             $tmp = fread($f, 2048);
             for ($i = 0; $i < 2048; $i++) {
                 if (ord($tmp[$i]) == 255 && substr(decbin(ord($tmp[$i + 1])), 0, 3) == "111") {
                     $tmp = substr($tmp, $i, 4);
                     $bajt = "";
                     for ($y = 0; $y < 4; $y++) {
                         $x = decbin(ord($tmp[$y]));
                         for ($i = 0; $i < 8 - StrLen($x); $i++) {
                             $x .= "0";
                         }
                         $bajt .= $x;
                     }
                     break;
                 }
             }
         }
         if ($bajt == "") {
             return -1;
             break;
         }
         // now parse all the info from frame header
         $len = filesize($file);
         $idtag["version"] = $version[substr($bajt, 11, 2)];
         $idtag["layer"] = $layer[substr($bajt, 13, 2)];
         $idtag["crc"] = $crc[$bajt[15]];
         $idtag["bitrate"] = $bitrate[substr($bajt, 16, 4)][$bitindex[substr($bajt, 11, 4)]];
         $idtag["frequency"] = $freq[substr($bajt, 20, 2)][substr($bajt, 11, 2)];
         $idtag["padding"] = $copy[$bajt[22]];
         $idtag["mode"] = $mode[substr($bajt, 24, 2)];
         $idtag["copyright"] = $copy[$bajt[28]];
         $idtag["original"] = $copy[$bajt[29]];
         // lets count lenght of the song
         if ($idtag["layer"] == 1) {
             $fsize = (12 * ($idtag["bitrate"] * 1000) / $idtag["frequency"] + $idtag["padding"]) * 4;
         } else {
             $fsize = 144 * ($idtag["bitrate"] * 1000 / $idtag["frequency"] + $idtag["padding"]);
         }
         // Modified by Luca (18/02/01): devel@lluca.com
         $idtag["lenght_sec"] = round($len / Round($fsize) / 38.37);
         // end
         $idtag["lenght"] = date("i:s", round($len / Round($fsize) / 38.37));
         // now lets see at the end of the file for id3 tag. if exists then  parse it. if file doesnt have an id 3 tag if will return -1 in field 'tag' and if title is empty it returns file name.
         if (!$len) {
             $len = filesize($file);
         }
         fseek($f, $len - 128);
         $tag = fread($f, 128);
         if (Substr($tag, 0, 3) == "TAG") {
             $idtag["file"] = $file;
             $idtag["tag"] = -1;
             // Modified by Luca (18/02/01): devel@lluca.com
             $idtag["title"] = Mp3Parser::strip_nulls(Substr($tag, 3, 30));
             $idtag["artist"] = Mp3Parser::strip_nulls(Substr($tag, 33, 30));
             $idtag["album"] = Mp3Parser::strip_nulls(Substr($tag, 63, 30));
             $idtag["year"] = Mp3Parser::strip_nulls(Substr($tag, 93, 4));
             $idtag["comment"] = Mp3Parser::strip_nulls(Substr($tag, 97, 30));
             // If the comment is less than 29 chars, we look for the presence of a track #
             if (strlen($idtag["comment"]) < 29) {
                 if (Ord(Substr($tag, 125, 1)) == chr(0)) {
                     // If char 125 is null then track (maybe) is present
                     $idtag["track"] = Ord(Substr($tag, 126, 1));
                 } else {
                     // If not, we are sure is not present.
                     $idtag["track"] = 0;
                 }
             } else {
                 // If the comment is 29 or 30 chars long, there's no way to put track #
                 $idtag["track"] = 0;
             }
             // end
             $idtag["genreid"] = Ord(Substr($tag, 127, 1));
             $idtag["genre"] = $genres[$idtag["genreid"]];
             $idtag["filesize"] = $len;
         } else {
             $idtag["tag"] = 0;
         }
         // close opened file and return results.
         if (!$idtag["title"]) {
             $idtag["title"] = Str_replace("\\", "/", $file);
             $idtag["title"] = substr($idtag["title"], strrpos($idtag["title"], "/") + 1, 255);
         }
         fclose($f);
         return $idtag;
     }
 }
Example #25
0
 case 'exception':
     # No more...
     break;
 case 'array':
     #-------------------------------------------------------------------------------
     foreach ($HostingOrders as $HostingOrder) {
         #-------------------------------------------------------------------------------
         # проверяем наличие такого юзера в массиве с нагрузкой
         if (!isset($TUsages[$ServerID]['SUsages'][$HostingOrder['Login']])) {
             continue;
         }
         #-------------------------------------------------------------------------------
         $ATime = $TUsages[$ServerID]['SUsages'][$HostingOrder['Login']]['utime'] + $TUsages[$ServerID]['SUsages'][$HostingOrder['Login']]['stime'];
         $SUsage = Round($ATime * 100 / (24 * 3600), 2);
         #-------------------------------------------------------------------------------
         $BUsage = Round(($TUsages[$ServerID]['BUsages'][$HostingOrder['Login']]['utime'] + $TUsages[$ServerID]['BUsages'][$HostingOrder['Login']]['stime']) * 100 / ($Settings['PeriodToLock'] * 24 * 3600), 2);
         #-------------------------------------------------------------------------------
         # параметры для уведомлений
         $Params = array('ID' => $HostingOrder['ID'], 'UserID' => $HostingOrder['UserID'], 'Login' => $HostingOrder['Login'], 'Domain' => $HostingOrder['Domain'], 'Scheme' => $HostingOrder['Scheme'], 'SUsage' => $SUsage, 'BUsage' => $BUsage, 'ATime' => $ATime, 'UTime' => $TUsages[$ServerID]['SUsages'][$HostingOrder['Login']]['utime'], 'STime' => $TUsages[$ServerID]['SUsages'][$HostingOrder['Login']]['stime'], 'QuotaCPU' => $HostingOrder['QuotaCPU'], 'QuotaCPUTime' => $HostingOrder['QuotaCPU'] * 24 * 60 * 60 / 100, 'Url' => $HostingOrder['Params']['Url'], 'PeriodToLock' => $Settings['PeriodToLock'], 'UnLockOverlimits' => $Settings['UnLockOverlimits'], 'UnLockOverlimitsTime' => $Settings['UnLockOverlimitsTime'], 'UnLockOverlimitsText' => $Settings['UnLockOverlimits'] ? SPrintF("Если вы никак не отреагируете на данное событие, то ваш аккаунт будет автоматически разблокирован в %s.\n\n", $Settings['UnLockOverlimitsTime']) : '');
         #-------------------------------------------------------------------------------
         # шлём уведомление тем кто превысил порог уведомления, и превысил порог оповещения
         if ($SUsage > $HostingOrder['QuotaCPU'] * $Settings['NotifyRatio'] && $SUsage > $Settings['LockNotifyFrom']) {
             #-------------------------------------------------------------------------------
             $NotifyedCount++;
             #-------------------------------------------------------------------------------
             Debug(SPrintF('[comp/Tasks/HostingCPUUsage]: Надо уведомление: Login = %s; SUsage = %s; BUsage = %s; QuotaCPU = %s', $HostingOrder['Login'], $SUsage, $BUsage, $HostingOrder['QuotaCPU']));
             #-------------------------------------------------------------------------------
             $IsSend = NotificationManager::sendMsg(new Message('HostingCPUUsageNotice', $HostingOrder['UserID'], array('HostingOrder' => $Params)));
             #-------------------------------------------------------------------------------
             switch (ValueOf($IsSend)) {
                 case 'error':
        $Where = array();
        $Where[] = SPrintF('`UserID` = %u', $UserID);
        $Where[] = '`VoteBall` > 0';
        $Where[] = '`IsVisible` = "yes"';
        $Where[] = SPrintF('`CreateDate` BETWEEN %u AND %u', $StartDate, $FinishDate);
        $SumVotes = DB_Select('EdesksMessagesOwners', array('SUM(`VoteBall`) AS VoteSumm'), array('UNIQ', 'Where' => $Where));
        #-------------------------------------------------------------------------------
        switch (ValueOf($NumVotes)) {
            case 'error':
                return ERROR | @Trigger_Error(500);
            case 'exception':
                return ERROR | @Trigger_Error(400);
            case 'array':
                Debug(SPrintF("[comp/www/Administrator/PersonalStatistics]: Сумма баллов: %u", $SumVotes['VoteSumm']));
                if (IntVal($NumVotes['Counter']) > 0) {
                    $VoteAvg = Round($SumVotes['VoteSumm'] / $NumVotes['Counter'], 2);
                } else {
                    $VoteAvg = '-';
                }
                $Tr->AddChild(new Tag('TD', array('align' => 'right', 'class' => 'Standard'), $VoteAvg));
                #$Tr->AddChild(new Tag('TD',Array('align'=>'right','class'=>'Standard'),IntVal($SumVotes['VoteSumm'])));
                break;
            default:
                return ERROR | @Trigger_Error(101);
        }
        #-------------------------------------------------------------------------------
        if ($IsAdd) {
            $Table[] = $Tr;
        }
    }
}
Example #27
0
#-------------------------------------------------------------------------------
/** @author Alex Keda (for www.host-food.ru) */
/******************************************************************************/
/******************************************************************************/
$__args_list = array('PaymentSystemID', 'InvoiceID', 'Summ');
/******************************************************************************/
eval(COMP_INIT);
/******************************************************************************/
/******************************************************************************/
$Config = Config();
#-------------------------------------------------------------------------------
$Settings = $Config['Invoices']['PaymentSystems']['MailRu'];
#-------------------------------------------------------------------------------
$Send = $Settings['Send'];
#-------------------------------------------------------------------------------
$Send['sum'] = Round($Summ / $Settings['Course'], 2);
#-------------------------------------------------------------------------------
$Send['issuer_id'] = $InvoiceID;
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Formats/Invoice/Number', $InvoiceID);
if (Is_Error($Comp)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$__USER = $GLOBALS['__USER'];
$Send['description'] .= SPrintF('%s, %s (%s)', $Comp, Translit($__USER['Name']), $__USER['Email']);
#-------------------------------------------------------------------------------
$Send['message'] = $Send['description'];
#-------------------------------------------------------------------------------
$sha = sha1($Settings['Hash']);
$Hash = array($Send['currency'], $Send['description'], $Send['issuer_id'], $Send['message'], $Send['shop_id'], $Send['sum'], $sha);
        $thumbcropwidth = imagesx($timg);
        $thumbcropheight = imagesy($timg);
    }
    $tsize = getOption('thumb_size');
    $max = max($thumbcropwidth, $thumbcropheight);
    $thumbcropwidth = $thumbcropwidth * ($tsize / $max);
    $thumbcropheight = $thumbcropheight * ($tsize / $max);
}
$size = min(400, $width, $height);
if ($width >= $height) {
    $sr = $size / $width;
    $sizedwidth = $size;
    $sizedheight = round($height / $width * $size);
} else {
    $sr = $size / $height;
    $sizedwidth = Round($width / $height * $size);
    $sizedheight = $size;
}
$imageurl = "i.php?a=" . pathurlencode($albumname) . "&i=" . urlencode($imagepart) . "&s=" . $size . '&admin';
$iY = round($imageobj->get('thumbY') * $sr);
if ($iY) {
    $iX = round($imageobj->get('thumbX') * $sr);
    $iW = round($imageobj->get('thumbW') * $sr);
    $iH = round($imageobj->get('thumbH') * $sr);
} else {
    $cr = max($cropwidth, $cropheight) / getOption('thumb_size');
    $si = min($sizedwidth, $sizedheight);
    $iW = round($si * $cr);
    $iH = round($si * $cr);
    $iX = round(($sizedwidth - $iW) / 2);
    $iY = round(($sizedheight - $iH) / 2);
Example #29
0
function AddPage($readerUTime)
{
    global $pdf, $dbh;
    $PUAN = array();
    $PUAN['6TA'] = DersSinifSubeOrtalama('T', '6', 'A', $readerUTime);
    $PUAN['6MA'] = DersSinifSubeOrtalama('M', '6', 'A', $readerUTime);
    $PUAN['6FA'] = DersSinifSubeOrtalama('F', '6', 'A', $readerUTime);
    $PUAN['6SA'] = DersSinifSubeOrtalama('S', '6', 'A', $readerUTime);
    $PUAN['6DA'] = DersSinifSubeOrtalama('D', '6', 'A', $readerUTime);
    $PUAN['6HA'] = DersSinifSubeOrtalama('', '6', 'A', $readerUTime);
    $PUAN['6TB'] = DersSinifSubeOrtalama('T', '6', 'B', $readerUTime);
    $PUAN['6MB'] = DersSinifSubeOrtalama('M', '6', 'B', $readerUTime);
    $PUAN['6FB'] = DersSinifSubeOrtalama('F', '6', 'B', $readerUTime);
    $PUAN['6SB'] = DersSinifSubeOrtalama('S', '6', 'B', $readerUTime);
    $PUAN['6DB'] = DersSinifSubeOrtalama('D', '6', 'B', $readerUTime);
    $PUAN['6HB'] = DersSinifSubeOrtalama('', '6', 'B', $readerUTime);
    $PUAN['6TC'] = DersSinifSubeOrtalama('T', '6', 'C', $readerUTime);
    $PUAN['6MC'] = DersSinifSubeOrtalama('M', '6', 'C', $readerUTime);
    $PUAN['6FC'] = DersSinifSubeOrtalama('F', '6', 'C', $readerUTime);
    $PUAN['6SC'] = DersSinifSubeOrtalama('S', '6', 'C', $readerUTime);
    $PUAN['6DC'] = DersSinifSubeOrtalama('D', '6', 'C', $readerUTime);
    $PUAN['6HC'] = DersSinifSubeOrtalama('', '6', 'C', $readerUTime);
    $PUAN['6T_'] = DersSinifSubeOrtalama('T', '6', '', $readerUTime);
    $PUAN['6M_'] = DersSinifSubeOrtalama('M', '6', '', $readerUTime);
    $PUAN['6F_'] = DersSinifSubeOrtalama('F', '6', '', $readerUTime);
    $PUAN['6S_'] = DersSinifSubeOrtalama('S', '6', '', $readerUTime);
    $PUAN['6D_'] = DersSinifSubeOrtalama('D', '6', '', $readerUTime);
    $PUAN['6H_'] = DersSinifSubeOrtalama('', '6', '', $readerUTime);
    $PUAN['7TA'] = DersSinifSubeOrtalama('T', '7', 'A', $readerUTime);
    $PUAN['7MA'] = DersSinifSubeOrtalama('M', '7', 'A', $readerUTime);
    $PUAN['7FA'] = DersSinifSubeOrtalama('F', '7', 'A', $readerUTime);
    $PUAN['7SA'] = DersSinifSubeOrtalama('S', '7', 'A', $readerUTime);
    $PUAN['7DA'] = DersSinifSubeOrtalama('D', '7', 'A', $readerUTime);
    $PUAN['7HA'] = DersSinifSubeOrtalama('', '7', 'A', $readerUTime);
    $PUAN['7TB'] = DersSinifSubeOrtalama('T', '7', 'B', $readerUTime);
    $PUAN['7MB'] = DersSinifSubeOrtalama('M', '7', 'B', $readerUTime);
    $PUAN['7FB'] = DersSinifSubeOrtalama('F', '7', 'B', $readerUTime);
    $PUAN['7SB'] = DersSinifSubeOrtalama('S', '7', 'B', $readerUTime);
    $PUAN['7DB'] = DersSinifSubeOrtalama('D', '7', 'B', $readerUTime);
    $PUAN['7HB'] = DersSinifSubeOrtalama('', '7', 'B', $readerUTime);
    $PUAN['7TC'] = DersSinifSubeOrtalama('T', '7', 'C', $readerUTime);
    $PUAN['7MC'] = DersSinifSubeOrtalama('M', '7', 'C', $readerUTime);
    $PUAN['7FC'] = DersSinifSubeOrtalama('F', '7', 'C', $readerUTime);
    $PUAN['7SC'] = DersSinifSubeOrtalama('S', '7', 'C', $readerUTime);
    $PUAN['7DC'] = DersSinifSubeOrtalama('D', '7', 'C', $readerUTime);
    $PUAN['7HC'] = DersSinifSubeOrtalama('', '7', 'C', $readerUTime);
    $PUAN['7TD'] = DersSinifSubeOrtalama('T', '7', 'D', $readerUTime);
    $PUAN['7MD'] = DersSinifSubeOrtalama('M', '7', 'D', $readerUTime);
    $PUAN['7FD'] = DersSinifSubeOrtalama('F', '7', 'D', $readerUTime);
    $PUAN['7SD'] = DersSinifSubeOrtalama('S', '7', 'D', $readerUTime);
    $PUAN['7DD'] = DersSinifSubeOrtalama('D', '7', 'D', $readerUTime);
    $PUAN['7HD'] = DersSinifSubeOrtalama('', '7', 'D', $readerUTime);
    $PUAN['7T_'] = DersSinifSubeOrtalama('T', '7', '', $readerUTime);
    $PUAN['7M_'] = DersSinifSubeOrtalama('M', '7', '', $readerUTime);
    $PUAN['7F_'] = DersSinifSubeOrtalama('F', '7', '', $readerUTime);
    $PUAN['7S_'] = DersSinifSubeOrtalama('S', '7', '', $readerUTime);
    $PUAN['7D_'] = DersSinifSubeOrtalama('D', '7', '', $readerUTime);
    $PUAN['7H_'] = DersSinifSubeOrtalama('', '7', '', $readerUTime);
    $PUAN['8TA'] = DersSinifSubeOrtalama('T', '8', 'A', $readerUTime);
    $PUAN['8MA'] = DersSinifSubeOrtalama('M', '8', 'A', $readerUTime);
    $PUAN['8FA'] = DersSinifSubeOrtalama('F', '8', 'A', $readerUTime);
    $PUAN['8SA'] = DersSinifSubeOrtalama('S', '8', 'A', $readerUTime);
    $PUAN['8DA'] = DersSinifSubeOrtalama('D', '8', 'A', $readerUTime);
    $PUAN['8HA'] = DersSinifSubeOrtalama('', '8', 'A', $readerUTime);
    $PUAN['8TB'] = DersSinifSubeOrtalama('T', '8', 'B', $readerUTime);
    $PUAN['8MB'] = DersSinifSubeOrtalama('M', '8', 'B', $readerUTime);
    $PUAN['8FB'] = DersSinifSubeOrtalama('F', '8', 'B', $readerUTime);
    $PUAN['8SB'] = DersSinifSubeOrtalama('S', '8', 'B', $readerUTime);
    $PUAN['8DB'] = DersSinifSubeOrtalama('D', '8', 'B', $readerUTime);
    $PUAN['8HB'] = DersSinifSubeOrtalama('', '8', 'B', $readerUTime);
    $PUAN['8TC'] = DersSinifSubeOrtalama('T', '8', 'C', $readerUTime);
    $PUAN['8MC'] = DersSinifSubeOrtalama('M', '8', 'C', $readerUTime);
    $PUAN['8FC'] = DersSinifSubeOrtalama('F', '8', 'C', $readerUTime);
    $PUAN['8SC'] = DersSinifSubeOrtalama('S', '8', 'C', $readerUTime);
    $PUAN['8DC'] = DersSinifSubeOrtalama('D', '8', 'C', $readerUTime);
    $PUAN['8HC'] = DersSinifSubeOrtalama('', '8', 'C', $readerUTime);
    $PUAN['8T_'] = DersSinifSubeOrtalama('T', '8', '', $readerUTime);
    $PUAN['8M_'] = DersSinifSubeOrtalama('M', '8', '', $readerUTime);
    $PUAN['8F_'] = DersSinifSubeOrtalama('F', '8', '', $readerUTime);
    $PUAN['8S_'] = DersSinifSubeOrtalama('S', '8', '', $readerUTime);
    $PUAN['8D_'] = DersSinifSubeOrtalama('D', '8', '', $readerUTime);
    $PUAN['8H_'] = DersSinifSubeOrtalama('', '8', '', $readerUTime);
    $PUAN['_T_'] = DersSinifSubeOrtalama('T', '', '', $readerUTime);
    $PUAN['_M_'] = DersSinifSubeOrtalama('M', '', '', $readerUTime);
    $PUAN['_F_'] = DersSinifSubeOrtalama('F', '', '', $readerUTime);
    $PUAN['_S_'] = DersSinifSubeOrtalama('S', '', '', $readerUTime);
    $PUAN['_D_'] = DersSinifSubeOrtalama('D', '', '', $readerUTime);
    $PUAN['_H_'] = DersSinifSubeOrtalama('', '', '', $readerUTime);
    $pdf->AddPage();
    $pdf->AddFont('verdana', '', 'verdana.php');
    $pdf->SetFont('verdana', '', 8);
    $pdf->SetXY(3, 10);
    $pdf->Cell(0, 2, 'ABC ÝLKÖÐRETÝM OKULU', 0, 0, 'C');
    $pdf->SetXY(3, 11);
    $pdf->Cell(0, 8, '2010/2011 EÐÝTÝM ÖÐRETÝM YILI SEVÝYE TESPÝT SINAVI', 0, 0, 'C');
    $pdf->SetXY(3, 12);
    $pdf->Cell(0, 14, 'SINAV SONUÇ RAPORU', 0, 0, 'C');
    $pdf->SetXY(10, 30);
    $pdf->SetXY(15, 35);
    $pdf->Cell(38, 5, 'DERSLER', 0, 0, 'C');
    $pdf->Cell(38, 5, 'TÜRKÇE', 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->Cell(38, 5, 'TÜM DERSLER', 0, 0, 'C');
    $pdf->Rect(15, 35, 266, 5, "");
    $pdf->Rect(15, 40, 266, 5, "");
    $pdf->Rect(15, 45, 266, 5, "");
    $pdf->Rect(15, 50, 266, 5, "");
    $pdf->Rect(15, 55, 266, 5, "");
    $pdf->Rect(15, 60, 266, 5, "");
    $pdf->Rect(15, 65, 266, 5, "");
    $pdf->Rect(15, 70, 266, 5, "");
    $pdf->Rect(15, 75, 266, 5, "");
    $pdf->Rect(15, 80, 266, 5, "");
    $pdf->Rect(15, 85, 266, 5, "");
    $pdf->Rect(15, 90, 266, 5, "");
    $pdf->Rect(15, 95, 266, 5, "");
    $pdf->Rect(15, 100, 266, 5, "");
    $pdf->Rect(15, 105, 266, 5, "");
    $pdf->Rect(15, 110, 266, 5, "");
    $pdf->Rect(15, 35, 38, 80, "");
    $pdf->Rect(53, 35, 38, 80, "");
    $pdf->Rect(91, 35, 38, 80, "");
    $pdf->Rect(129, 35, 38, 80, "");
    $pdf->Rect(167, 35, 38, 80, "");
    $pdf->Rect(205, 35, 38, 80, "");
    $x = 15 + 9.5 * 4;
    $y = 40;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5;
    $pdf->Line($x, $y, $x, 115);
    $pdf->SetLineWidth(0.5);
    $x = 15;
    $y = 35;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5 * 4;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5 * 4;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5 * 4;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5 * 4;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5 * 4;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5 * 4;
    $pdf->Line($x, $y, $x, 115);
    $x += 9.5 * 4;
    $pdf->Line($x, $y, $x, 115);
    $x = 15 + 9.5 * 28;
    $pdf->Line(15, $y, $x, $y);
    $pdf->Line(15, 115, $x, 115);
    $pdf->Line(15, 45, $x, 45);
    $pdf->Line(15, 60, $x, 60);
    $pdf->Line(15, 65, $x, 65);
    $pdf->Line(15, 85, $x, 85);
    $pdf->Line(15, 90, $x, 90);
    $pdf->Line(15, 105, $x, 105);
    $pdf->SetLineWidth(0.4);
    $pdf->SetXY(15 + 9.5 * 4, 40);
    $pdf->Cell(9.5, 5, 'Doðru', 0, 0, 'C');
    $pdf->Cell(9.5, 5, 'Yanlýþ', 0, 0, 'C');
    $pdf->Cell(9.5, 5, 'Net', 0, 0, 'C');
    $pdf->Cell(9.5, 5, 'Baþarý', 0, 0, 'C');
    $pdf->Cell(9.5, 5, 'Doðru', 0, 0, 'C');
    $pdf->Cell(9.5, 5, 'Yanlýþ', 0, 0, 'C');
    $pdf->Cell(9.5, 5, 'Net', 0, 0, 'C');
    $pdf->Cell(9.5, 5, 'Baþarý', 0, 0, 'C');
    $pdf->Cell(9.5, 5, 'Doðru', 0, 0, 'C');
    $pdf->Cell(9.5, 5, 'Yanlýþ', 0, 0, 'C');
    $pdf->Cell(9.5, 5, 'Net', 0, 0, 'C');
    $pdf->Cell(9.5, 5, 'Baþarý', 0, 0, 'C');
    $pdf->Cell(9.5, 5, 'Doðru', 0, 0, 'C');
    $pdf->Cell(9.5, 5, 'Yanlýþ', 0, 0, 'C');
    $pdf->Cell(9.5, 5, 'Net', 0, 0, 'C');
    $pdf->Cell(9.5, 5, 'Baþarý', 0, 0, 'C');
    $pdf->Cell(9.5, 5, 'Doðru', 0, 0, 'C');
    $pdf->Cell(9.5, 5, 'Yanlýþ', 0, 0, 'C');
    $pdf->Cell(9.5, 5, 'Nnet', 0, 0, 'C');
    $pdf->Cell(9.5, 5, 'Baþarý', 0, 0, 'C');
    $pdf->Cell(9.5, 5, 'Doðru', 0, 0, 'C');
    $pdf->Cell(9.5, 5, 'Yanlýþ', 0, 0, 'C');
    $pdf->Cell(9.5, 5, 'Net', 0, 0, 'C');
    $pdf->Cell(9.5, 5, 'Baþarý', 0, 0, 'C');
    $pdf->SetXY(15, 40);
    $pdf->Cell(38, 5, 'ORTALAMA', 0, 0, 'C');
    $pdf->SetXY(15, 45);
    $pdf->Cell(38, 5, '6A', 0, 0, 'C');
    $pdf->SetXY(15, 50);
    $pdf->Cell(38, 5, '6B', 0, 0, 'C');
    $pdf->SetXY(15, 55);
    $pdf->Cell(38, 5, '6C', 0, 0, 'C');
    $pdf->SetXY(15, 60);
    $pdf->Cell(38, 5, '6. SINIFLAR ORTALAMASI', 0, 0, 'C');
    $pdf->SetXY(15, 65);
    $pdf->Cell(38, 5, '7A', 0, 0, 'C');
    $pdf->SetXY(15, 70);
    $pdf->Cell(38, 5, '7B', 0, 0, 'C');
    $pdf->SetXY(15, 75);
    $pdf->Cell(38, 5, '7C', 0, 0, 'C');
    $pdf->SetXY(15, 80);
    $pdf->Cell(38, 5, '7D', 0, 0, 'C');
    $pdf->SetXY(15, 85);
    $pdf->Cell(38, 5, '7. SINIFLAR ORTALAMASI', 0, 0, 'C');
    $pdf->SetXY(15, 90);
    $pdf->Cell(38, 5, '8A', 0, 0, 'C');
    $pdf->SetXY(15, 95);
    $pdf->Cell(38, 5, '8B', 0, 0, 'C');
    $pdf->SetXY(15, 100);
    $pdf->Cell(38, 5, '8C', 0, 0, 'C');
    $pdf->SetXY(15, 105);
    $pdf->Cell(38, 5, '8. SINIFLAR ORTALAMASI', 0, 0, 'C');
    $pdf->SetXY(15, 110);
    $pdf->Cell(38, 5, 'OKUL ORTALAMASI', 0, 0, 'C');
    $pdf->SetXY(15 + 9.5 * 4, 45);
    $pdf->Cell(9.5, 5, Round($PUAN['6TA'][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6TA'][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6TA'][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6TA'][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6MA'][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6MA'][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6MA'][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6MA'][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6FA'][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6FA'][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6FA'][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6FA'][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6SA'][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6SA'][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6SA'][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6SA'][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6DA'][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6DA'][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6DA'][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6DA'][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6HA'][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6HA'][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6HA'][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6HA'][3], 0) . '%', 0, 0, 'C');
    $pdf->SetXY(15 + 9.5 * 4, 50);
    $pdf->Cell(9.5, 5, Round($PUAN['6TB'][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6TB'][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6TB'][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6TB'][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6MB'][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6MB'][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6MB'][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6MB'][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6FB'][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6FB'][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6FB'][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6FB'][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6SB'][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6SB'][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6SB'][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6SB'][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6DB'][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6DB'][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6DB'][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6DB'][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6HB'][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6HB'][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6HB'][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6HB'][3], 0) . '%', 0, 0, 'C');
    $pdf->SetXY(15 + 9.5 * 4, 55);
    $pdf->Cell(9.5, 5, Round($PUAN['6TC'][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6TC'][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6TC'][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6TC'][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6MC'][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6MC'][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6MC'][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6MC'][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6FC'][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6FC'][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6FC'][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6FC'][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6SC'][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6SC'][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6SC'][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6SC'][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6DC'][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6DC'][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6DC'][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6DC'][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6HC'][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6HC'][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6HC'][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN['6HC'][3], 0) . '%', 0, 0, 'C');
    $pdf->SetXY(15 + 9.5 * 4, 60);
    $charilk = '6';
    $charson = '_';
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->SetXY(15 + 9.5 * 4, 65);
    $charilk = '7';
    $charson = 'A';
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->SetXY(15 + 9.5 * 4, 70);
    $charilk = '7';
    $charson = 'B';
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->SetXY(15 + 9.5 * 4, 75);
    $charilk = '7';
    $charson = 'C';
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->SetXY(15 + 9.5 * 4, 80);
    $charilk = '7';
    $charson = 'D';
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->SetXY(15 + 9.5 * 4, 85);
    $charilk = '7';
    $charson = '_';
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->SetXY(15 + 9.5 * 4, 90);
    $charilk = '8';
    $charson = 'A';
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->SetXY(15 + 9.5 * 4, 95);
    $charilk = '8';
    $charson = 'B';
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->SetXY(15 + 9.5 * 4, 100);
    $charilk = '8';
    $charson = 'C';
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->SetXY(15 + 9.5 * 4, 105);
    $charilk = '8';
    $charson = '_';
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->SetXY(15 + 9.5 * 4, 110);
    $charilk = '_';
    $charson = '_';
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'T' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'M' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'F' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'S' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'D' . $charson][3], 0) . '%', 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][0], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][1], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][2], 2), 0, 0, 'C');
    $pdf->Cell(9.5, 5, Round($PUAN[$charilk . 'H' . $charson][3], 0) . '%', 0, 0, 'C');
}
Example #30
0
 function send()
 {
     $this->write('</users></list>');
     fclose($this->xml_file);
     if ($this->send_packege) {
         $this->write_log('START ' . $this->count . ' ' . Round(filesize($this->packege_dir . $this->filename) / 1024, 0) . 'Kb ' . $this->packege_url . $this->filename);
         $pack_id = $this->start();
         if (is_numeric($pack_id)) {
             $this->pack_id = $pack_id;
             $this->write_log('STATUS OK ' . $pack_id . ' ' . $this->packege_url . $this->filename);
             if ($this->status_loger) {
                 $this->loger($pack_id);
             } else {
                 $this->write_log('STATUS LOGER OFF');
             }
         } else {
             $this->write_log('STATUS ERROR ' . $pack_id . ' ' . $this->status[$pack_id] . ' ' . $this->packege_url . $this->filename);
             $this->fatal_error('При отправке произошла ошибка: ' . $pack_id . ' ' . $this->status[$pack_id]);
         }
         $this->write_log("STOP \r\n\r\n" . $xmlurl);
     }
     fclose($this->log_file);
 }