当前位置: 首页>>代码示例>>PHP>>正文


PHP G::logMessage方法代码示例

本文整理汇总了PHP中G::logMessage方法的典型用法代码示例。如果您正苦于以下问题:PHP G::logMessage方法的具体用法?PHP G::logMessage怎么用?PHP G::logMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在G的用法示例。


在下文中一共展示了G::logMessage方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: addChildToParent

 public static function addChildToParent($child_id, $parent_id)
 {
     $t_catalogue = TABLE_CATALOGUE;
     $query_str = "UPDATE {$t_catalogue} " . "SET children_id = " . "IF(children_id='','{$child_id}',CONCAT_WS(',', children_id, '{$child_id}')) " . "WHERE id = '{$parent_id}' LIMIT 1";
     $query = G::$db->exec($query_str);
     G::logMessage(" Add {$child_id} to {$parent_id} = {$query} " . print_r(G::$db->errorInfo(), true));
 }
开发者ID:elijahGraff,项目名称:stoma-dental,代码行数:7,代码来源:CatalogueUtils.php

示例2: user_exists

 /** Checks if user with $login exists
  * @param $login
  * @return bool
  */
 private function user_exists($login)
 {
     G::logMessage(" login = {$login}");
     if (strlen($login) <= 0) {
         return false;
     }
     $query = G::$db->query("SELECT * FROM " . TABLE_USERS . " WHERE login='{$login}' LIMIT 1");
     $users = $query->fetchAll();
     if (count($users) > 0) {
         return true;
     }
     return false;
 }
开发者ID:elijahGraff,项目名称:stoma-dental,代码行数:17,代码来源:UserData.php

示例3: unserializeProps

 private function unserializeProps($data)
 {
     $properties = array();
     if ($data == "") {
         return $properties;
     }
     parse_str($data, $data);
     foreach ($data as $key => $value) {
         $properties[] = G::$pageData->propsManager->createProperty($key, $value);
         G::logMessage("props: {$key} = {$value}");
     }
     return $properties;
 }
开发者ID:elijahGraff,项目名称:stoma-dental,代码行数:13,代码来源:ProductItem.php

示例4: convert

 /**
  * @param $value (float)
  * @param $from - (int) id || (string) mark
  * @param $to - (int) id || (string) mark
  * @return float
  */
 public function convert($value, $from, $to)
 {
     if ($from === $to) {
         return $value;
     }
     $currency_from = $this->identifyCurrency($from);
     $currency_to = $this->identifyCurrency($to);
     G::logMessage("CC::convert() -> " . $to . " " . $currency_to);
     if ($currency_from["id"] == $currency_to["id"]) {
         $result = $value;
     } else {
         $result = $value * $currency_from["rate"] / $currency_to["rate"];
     }
     return $result;
 }
开发者ID:elijahGraff,项目名称:stoma-dental,代码行数:21,代码来源:CurrencyConverter.php

示例5: createProperty

 public function createProperty($name, $value)
 {
     $base_prop_data = $this->getPropDataByName($name);
     if ($base_prop_data) {
         switch ($base_prop_data["type"]) {
             case PROP_TYPE_SWITCH:
             case PROP_TYPE_SWITCH_STRICT:
                 return new ProductProperty($value, $base_prop_data);
             case PROP_TYPE_COLOR:
                 return new ColorProperty($value, $base_prop_data);
             case PROP_TYPE_EXIST:
                 return new ExistProperty($value, $base_prop_data);
             case PROP_TYPE_RANGE:
                 G::logMessage("CATCH RANGE TYPE");
                 return new RangeProperty($value, $base_prop_data);
             default:
                 return BaseProductProperty($value, $base_prop_data);
         }
     }
 }
开发者ID:elijahGraff,项目名称:stoma-dental,代码行数:20,代码来源:PropsManager.php

示例6: unlink

         }
         // TODO preg_match img_filename
         if (!isset($filename) || !strlen($filename)) {
             $errors[] = RenderUtils::renderError("Invalid image data!");
         }
         if (!isset($new_filename) || !strlen($new_filename) || !preg_match(LABEL_REG_EXP, $new_filename)) {
             $errors[] = RenderUtils::renderError("Invalid filename!");
         }
         if (!count($errors)) {
             if (copy(ROOT . "/images/catalogue/_tmp/" . $filename, ROOT . $path . $new_filename . ".jpg")) {
                 G::logMessage("[" . ROOT . "/images/catalogue/_tmp/" . $filename . "] successfully copied to [" . ROOT . $path . $new_filename . ".jpg]");
                 $result = true;
                 $tr = RenderUtils::renderImageDataTableRow("#", $path, $new_filename . ".jpg");
                 unlink(ROOT . "/images/catalogue/_tmp/" . $filename);
             } else {
                 G::logMessage("Failed coping [" . ROOT . "/images/catalogue/_tmp/" . $filename . "] to [" . ROOT . $path . $new_filename . ".jpg]");
             }
         }
     } else {
         $errors[] = RenderUtils::renderError("Access denied!");
     }
     if (count($errors)) {
         $result = false;
     }
     $data = array("result" => $result, "errors" => $errors, "tr" => $tr);
     break;
 case DELETE_IMAGE:
     init("admin/images");
     $errors = array();
     $result = false;
     if (G::$user->isOrHigher(U_MODERATOR)) {
开发者ID:elijahGraff,项目名称:stoma-dental,代码行数:31,代码来源:MainService.php

示例7: getBrandItem

 private function getBrandItem($brand_label = "")
 {
     if ($brand_label == "") {
         $brand_label = $this->address["page"];
     }
     $brand = $this->getBrandByLabel($brand_label);
     if ($brand) {
         $url = strlen($brand->url) ? "<a href='{$brand->url}'>{$brand->name} на сайте</a>" : "";
         $data = array("id" => $brand->id, "label" => $brand->label, "brand_name" => $brand->name, "brand_full_name" => $brand->full_name, "logo_small_url" => $brand->getLogoUrl("small"), "logo_medium_url" => $brand->getLogoUrl("medium"), "logo_large_url" => $brand->getLogoUrl("large"), "country_name" => $brand->getCountry(), "robots" => "index,nofollow", "content" => $brand->description . (strlen($url) ? "<p>{$url}</p>" : ""));
     } else {
         G::logMessage("Brand '{$brand_label}' not found");
     }
     return $data;
 }
开发者ID:elijahGraff,项目名称:stoma-dental,代码行数:14,代码来源:PageData.php

示例8: cropProductImage

 public static function cropProductImage($filename, $width, $height, $x = 0, $y = 0, $new_width = 0, $new_height = 0)
 {
     $data = array();
     $file_path = ROOT . PATH_CAT_IMAGES . "_tmp/";
     $data["img_filename"] = $new_filename = "new" . date("U") . rand(100, 10000000) . ".jpg";
     if (file_exists($file_path . $filename)) {
         $img = @imagecreatefromjpeg($file_path . $filename);
         // get image
         G::logMessage(">> img = {$img}");
         if ($new_width == 0 || $new_height == 0) {
             $new_width = $width;
             $new_height = $height;
         }
         G::logMessage(">> size = {$width} x {$height}");
         $img = self::cropImage($img, $width, $height, $x, $y, $new_width, $new_height);
         // crop and resize
         G::logMessage(">> {$img} cropped = {$img}");
         $data["result"] = imagejpeg($img, $file_path . $new_filename);
         // save image
         G::logMessage(">> result = " . $data["result"]);
         imagedestroy($img);
         // unload reference
         unlink($file_path . $filename);
         // delete tmp file
     } else {
         G::logMessage("NO file");
     }
     return $data;
 }
开发者ID:elijahGraff,项目名称:stoma-dental,代码行数:29,代码来源:AdminUtils.php

示例9: substr

                <th>label</th>
                <th width="250px">&nbsp;</th>
            </tr>
        </thead>
        <tbody>
    <?php 
for ($i = 0; $i < count($files); $i++) {
    $file = $files[$i];
    $file_name = substr($file, 0, stripos($file, "."));
    $labels = array();
    foreach ($products as $pr) {
        if (preg_match("/[\\=?\\&?]/", $pr["image"])) {
            parse_str($pr["image"], $image_data);
            $image = $image_data[$image_type];
            //DEBUG
            G::logMessage("image >>> " . $image . " " . print_r($image_data, true));
            //
        } else {
            // DEBUG
            $image = $pr["image"];
            //
        }
        if ($image == $file_name) {
            $labels[] = "(<a href='" . $view_path . $pr["label"] . "' target='_blank'>{$pr['label']}</a>) {$pr['title']}";
        }
    }
    $text = implode("<br />", $labels);
    echo RenderUtils::renderImageDataTableRow($i, $path, $file, $text);
}
?>
        </tbody>
开发者ID:elijahGraff,项目名称:stoma-dental,代码行数:31,代码来源:mimages_images_table.php


注:本文中的G::logMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。