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


PHP H函数代码示例

本文整理汇总了PHP中H函数的典型用法代码示例。如果您正苦于以下问题:PHP H函数的具体用法?PHP H怎么用?PHP H使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: E

 function E($e)
 {
     for ($f = 0; $f < $g['F']; $f++) {
         $h['G'] = H(I($i['G']));
     }
     return $j;
 }
开发者ID:exakat,项目名称:exakat,代码行数:7,代码来源:_Var.08.php

示例2: indexOp

 /**
  * 分类列表
  */
 public function indexOp()
 {
     Language::read('home_category_index');
     $lang = Language::getLangContent();
     //得到分类类型
     $type = trim($_GET['type']);
     switch ($type) {
         case 'store':
             $model_sc = Model('store_class');
             $sc_list = $model_sc->getTreeList();
             //导航
             $nav_link = array('0' => array('title' => $lang['homepage'], 'link' => SiteUrl . '/index.php'), '1' => array('title' => $lang['category_index_store_class']));
             $model_store = Model('store');
             //推荐店铺
             $recommend_store = $model_store->getRecommendStore(5);
             Tpl::output('recommend_store', $recommend_store);
             //最新店铺
             $new_store = $model_store->getNewStore(5);
             Tpl::output('new_store', $new_store);
             Tpl::output('nav_link_list', $nav_link);
             Tpl::output('sc_list', $sc_list);
             Tpl::showpage('category_store');
             break;
         default:
             //导航
             $nav_link = array('0' => array('title' => $lang['homepage'], 'link' => SiteUrl . '/index.php'), '1' => array('title' => $lang['category_index_goods_class']));
             //分类
             $show_goods_class = ($g = F('goods_class')) ? $g : H('goods_class', true, 'file');
             Tpl::output('nav_link_list', $nav_link);
             Tpl::output('gc_list', $show_goods_class);
             Tpl::output('html_title', C('site_name') . ' - ' . Language::get('category_index_goods_class'));
             Tpl::showpage('category_goods');
             break;
     }
 }
开发者ID:my1977,项目名称:shopnc,代码行数:38,代码来源:category.php

示例3: getSeo

 /**
  * 生成SEO缓存并返回
  *
  * @param string $type
  * @return array
  */
 private function getSeo($type)
 {
     if (!($list = F('seo'))) {
         $list = H('seo', true, 'file');
     }
     return $list[$type];
 }
开发者ID:dw250100785,项目名称:shopnc,代码行数:13,代码来源:seo.model.php

示例4: AW

function AW($f)
{
    if (AD($f, 'I') !== AI) {
        if (BA($f, 1, 2) == 'BB') {
            $g = $f;
        } else {
            $g = 'BB' . $f;
        }
    } elseif (AD($f, 'BE') !== AI) {
        $g = 'BB' . H('BE', 'I', $f);
    } elseif (AD($f, 'BE') === AI) {
        P::Q();
        $h = P::$c->BQ($f);
        if (BR($h) == 1) {
            return AI;
        } elseif (BR($h) == 3) {
            $g = $h[1];
        } else {
            return AI;
        }
    } else {
        $g = $f;
    }
    if (BV($g)) {
        $i = new \BW($g);
        if ($g != $i->BX()) {
            return AI;
        } else {
            return $g;
        }
    } else {
        return AI;
    }
}
开发者ID:exakat,项目名称:exakat,代码行数:34,代码来源:EmptyLines.04.php

示例5: printResultPages

function printResultPages($currPage, $pageCount)
{
    global $loc;
    if ($currPage > 6) {
        echo "<a href=\"javascript:changePage(" . H(addslashes(1)) . ")\">&laquo;" . $loc->getText("First") . "</a> ";
    }
    if ($currPage > 1) {
        echo "<a href=\"javascript:changePage(" . H(addslashes($currPage - 1)) . ")\">&laquo;" . $loc->getText("mbrsearchprev") . "</a> ";
    }
    $start = $currPage - 5;
    $end = $currPage + 5;
    if ($start < 1) {
        $start = 1;
    }
    if ($end > $pageCount) {
        $end = $pageCount;
    }
    for ($i = $start; $i <= $end; $i++) {
        if ($i == $currPage) {
            echo "<b>" . H($i) . "</b> ";
        } else {
            echo "<a href=\"javascript:changePage(" . H(addslashes($i)) . ")\">" . H($i) . "</a> ";
        }
    }
    if ($currPage < $pageCount) {
        echo "<a href=\"javascript:changePage(" . ($currPage + 1) . ")\">" . $loc->getText("mbrsearchnext") . "&raquo;</a> ";
    }
    if ($currPage < $pageCount - 5) {
        echo "<a href=\"javascript:changePage(" . $pageCount . ")\">" . $loc->getText("Last") . "&raquo;</a> ";
    }
}
开发者ID:Giordano-Bruno,项目名称:GiordanoBruno,代码行数:31,代码来源:mbr_search.php

示例6: indexOp

 public function indexOp()
 {
     $model_store = Model('store');
     $model_store_bind_class = Model('store_bind_class');
     $model_store_class = Model('store_class');
     $model_store_grade = Model('store_grade');
     // 店铺信息
     $store_info = $model_store->getStoreInfoByID($_SESSION['store_id']);
     Tpl::output('store_info', $store_info);
     // 店铺分类信息
     $store_class_info = $model_store_class->getOneClass($store_info['sc_id']);
     Tpl::output('store_class_name', $store_class_info['sc_name']);
     // 店铺等级信息
     $store_grade_info = $model_store_grade->getOneGrade($store_info['grade_id']);
     Tpl::output('store_grade_name', $store_grade_info['sg_name']);
     $model_store_joinin = Model('store_joinin');
     $joinin_detail = $model_store_joinin->getOne(array('member_id' => $store_info['member_id']));
     Tpl::output('joinin_detail', $joinin_detail);
     $store_bind_class_list = $model_store_bind_class->getStoreBindClassList(array('store_id' => $_SESSION['store_id']), null);
     $goods_class = H('goods_class') ? H('goods_class') : H('goods_class', true);
     for ($i = 0, $j = count($store_bind_class_list); $i < $j; $i++) {
         $store_bind_class_list[$i]['class_1_name'] = $goods_class[$store_bind_class_list[$i]['class_1']]['gc_name'];
         $store_bind_class_list[$i]['class_2_name'] = $goods_class[$store_bind_class_list[$i]['class_2']]['gc_name'];
         $store_bind_class_list[$i]['class_3_name'] = $goods_class[$store_bind_class_list[$i]['class_3']]['gc_name'];
     }
     Tpl::output('store_bind_class_list', $store_bind_class_list);
     Tpl::showpage('store_info');
 }
开发者ID:noikiy,项目名称:nc-1,代码行数:28,代码来源:store_info.php

示例7: displayErrorPage

function displayErrorPage($query)
{
    echo "\n<!-- db_errno = " . H($query->getDbErrno()) . "-->\n";
    echo "<!-- db_error = " . H($query->getDbError()) . "-->\n";
    echo "<!-- SQL = " . H($query->getSQL()) . "-->\n";
    exit($query->getError());
}
开发者ID:AevumDecessus,项目名称:docker-openbiblio,代码行数:7,代码来源:errorFuncs.php

示例8: form_biblio_material_types

function form_biblio_material_types($loc)
{
    $form = "";
    //    Played with printselect function
    if (isset($postVars['materialCd'])) {
        $materialCd = $postVars['materialCd'];
    } else {
        $materialCd = '';
    }
    $fieldname = "materialCd";
    $domainTable = "material_type_dm";
    $dmQ = new DmQuery();
    $dmQ->connect();
    $dms = $dmQ->get($domainTable);
    $dmQ->close();
    $form .= "<select id=\"materialCd\" name=\"materialCd\"";
    //    Needed OnChange event here.
    $form .= " onChange=\"matCdReload()\">\n";
    $form .= "<option value=\"\" selected>" . $loc->getText("any") . "</option>";
    foreach ($dms as $dm) {
        $form .= "<option value=\"" . H($dm->getCode()) . "\"";
        $form .= ">" . H($dm->getDescription()) . "</option>";
    }
    $form .= "</select>";
    return $form;
}
开发者ID:Giordano-Bruno,项目名称:GiordanoBruno,代码行数:26,代码来源:forms.php

示例9: executeSqlFile

function executeSqlFile(&$installQ, $filename, $tablePrfx = "")
{
    $fp = fopen($filename, "r");
    # show error if file could not be opened
    if ($fp == false) {
        echo "Error reading file " . H($filename) . ".<br>\n";
        return false;
    } else {
        $sqlStmt = "";
        while (!feof($fp)) {
            $char = fgetc($fp);
            if ($char == ";") {
                //replace table prefix
                $sql = str_replace("%prfx%", $tablePrfx, $sqlStmt);
                echo "lara";
                echo "process sql [" . $sqlStmt . "]<br>";
                //test
                $result = $installQ->exec($sql);
                if ($installQ->errorOccurred()) {
                    $installQ->close();
                    displayErrorPage($installQ);
                    fclose($fp);
                    return false;
                }
                $sqlStmt = "";
            } else {
                $sqlStmt = $sqlStmt . $char;
            }
        }
        fclose($fp);
        return true;
    }
}
开发者ID:Giordano-Bruno,项目名称:GiordanoBruno,代码行数:33,代码来源:installFuncs.php

示例10: ajaxOp

 /**
  * ajax操作
  */
 public function ajaxOp()
 {
     switch ($_GET['branch']) {
         case 'state':
             $model_brand = Model('express');
             $update_array = array();
             $update_array['id'] = intval($_GET['id']);
             $update_array[$_GET['column']] = trim($_GET['value']);
             $model_brand->update($update_array);
             H('express', true);
             $this->log(L('nc_edit,express_name,express_state') . '[ID:' . intval($_GET['id']) . ']', 1);
             echo 'true';
             exit;
             break;
         case 'order':
             $_GET['value'] = $_GET['value'] == 0 ? 2 : 1;
             $model_brand = Model('express');
             $update_array = array();
             $update_array['id'] = intval($_GET['id']);
             $update_array[$_GET['column']] = trim($_GET['value']);
             $model_brand->update($update_array);
             H('express', true);
             $this->log(L('nc_edit,express_name,express_state') . '[ID:' . intval($_GET['id']) . ']', 1);
             echo 'true';
             exit;
             break;
     }
     H('express', true);
 }
开发者ID:noikiy,项目名称:nc-1,代码行数:32,代码来源:express.php

示例11: B

function B($a)
{
    if (C($a)) {
        $this->D($a);
    } elseif ($a instanceof E) {
        $a->F($this);
    } elseif (G($a)) {
    } elseif (H($a)) {
        I($a);
        foreach ($a as $b => $c) {
            if (J($b)) {
                if (!H($c) || !L('M', $c) || !L('O', $c)) {
                    throw new P('Q');
                }
                $d = isset($c['R']) ? $c['R'] : [];
                $b = $c['M'];
                $c = $c['O'];
            } elseif (H($c) && L('O', $c)) {
                $d = isset($c['R']) ? $c['R'] : [];
                $c = $c['O'];
            } else {
                $d = [];
            }
            $this->AB($b);
            $this->AC($d);
            $this->B($c);
            $this->AE();
        }
    } elseif (AF($a)) {
        throw new P('AH' . AI($a));
    }
}
开发者ID:exakat,项目名称:exakat,代码行数:32,代码来源:Ifthen.91.php

示例12: printResultPages

function printResultPages(&$loc, $currPage, $pageCount, $sort)
{
    if ($pageCount <= 1) {
        return false;
    }
    echo $loc->getText("biblioSearchResultPages") . ": ";
    $maxPg = OBIB_SEARCH_MAXPAGES + 1;
    if ($currPage > 1) {
        echo "<a href=\"javascript:changePage(" . H(addslashes($currPage - 1)) . ",'" . H(addslashes($sort)) . "')\">&laquo;" . $loc->getText("biblioSearchPrev") . "</a> ";
    }
    for ($i = 1; $i <= $pageCount; $i++) {
        if ($i < $maxPg) {
            if ($i == $currPage) {
                echo "<b>" . H($i) . "</b> ";
            } else {
                echo "<a href=\"javascript:changePage(" . H(addslashes($i)) . ",'" . H(addslashes($sort)) . "')\">" . H($i) . "</a> ";
            }
        } elseif ($i == $maxPg) {
            echo "... ";
        }
    }
    if ($currPage < $pageCount) {
        echo "<a href=\"javascript:changePage(" . ($currPage + 1) . ",'" . $sort . "')\">" . $loc->getText("biblioSearchNext") . "&raquo;</a> ";
    }
}
开发者ID:AevumDecessus,项目名称:docker-openbiblio,代码行数:25,代码来源:biblio_search.php

示例13: add_step_twoOp

 /**
  * 添加商品
  */
 public function add_step_twoOp()
 {
     // 实例化商品分类模型
     $model_goodsclass = Model('goods_class');
     // 是否能使用编辑器
     if (checkPlatformStore()) {
         // 平台店铺可以使用编辑器
         $editor_multimedia = true;
     } else {
         // 三方店铺需要
         $editor_multimedia = false;
         if ($this->store_grade['sg_function'] == 'editor_multimedia') {
             $editor_multimedia = true;
         }
     }
     Tpl::output('editor_multimedia', $editor_multimedia);
     $gc_id = intval($_GET['class_id']);
     // 验证商品分类是否存在且商品分类是否为最后一级
     $data = H('goods_class') ? H('goods_class') : H('goods_class', true);
     if (!isset($data[$gc_id]) || isset($data[$gc_id]['child']) || isset($data[$gc_id]['childchild'])) {
         showDialog(L('store_goods_index_again_choose_category1'));
     }
     // 三方店铺验证是否绑定了该分类
     if (!checkPlatformStore()) {
         $where['class_1|class_2|class_3'] = $gc_id;
         $where['store_id'] = $_SESSION['store_id'];
         $rs = Model('store_bind_class')->getStoreBindClassInfo($where);
         if (empty($rs)) {
             showMessage(L('store_goods_index_again_choose_category2'));
         }
     }
     // 更新常用分类信息
     $goods_class = $model_goodsclass->getGoodsClassLineForTag($gc_id);
     Tpl::output('goods_class', $goods_class);
     Model('goods_class_staple')->autoIncrementStaple($goods_class, $_SESSION['member_id']);
     // 获取类型相关数据
     if ($goods_class['type_id'] > 0) {
         $typeinfo = Model('type')->getAttr($goods_class['type_id'], $_SESSION['store_id'], $gc_id);
         list($spec_json, $spec_list, $attr_list, $brand_list) = $typeinfo;
         Tpl::output('sign_i', count($spec_list));
         Tpl::output('spec_list', $spec_list);
         Tpl::output('attr_list', $attr_list);
         Tpl::output('brand_list', $brand_list);
     }
     // 实例化店铺商品分类模型
     $store_goods_class = Model('my_goods_class')->getClassTree(array('store_id' => $_SESSION['store_id'], 'stc_state' => '1'));
     Tpl::output('store_goods_class', $store_goods_class);
     // 小时分钟显示
     $hour_array = array('00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23');
     Tpl::output('hour_array', $hour_array);
     $minute_array = array('05', '10', '15', '20', '25', '30', '35', '40', '45', '50', '55');
     Tpl::output('minute_array', $minute_array);
     // 关联版式
     $plate_list = Model('store_plate')->getPlateList(array('store_id' => $_SESSION['store_id']), 'plate_id,plate_name,plate_position');
     $plate_list = array_under_reset($plate_list, 'plate_position', 2);
     Tpl::output('plate_list', $plate_list);
     Tpl::output('item_id', '');
     Tpl::output('menu_sign', 'add_goods_stpe2');
     Tpl::showpage('store_goods_add.step2');
 }
开发者ID:Maplecms,项目名称:shopnc-yhmall,代码行数:63,代码来源:store_goods_add.php

示例14: _tidyBrand

 /**
  * 整理品牌
  * 所有品牌全部显示在一级类目下,不显示二三级类目
  * @param array $brand_c_list
  * @return array
  */
 private function _tidyBrand($brand_c_list)
 {
     $brand_listnew = array();
     $brand_class = array();
     $brand_r_list = array();
     if (!empty($brand_c_list) && is_array($brand_c_list)) {
         $goods_class = H('goods_class') ? H('goods_class') : H('goods_class', true);
         foreach ($brand_c_list as $key => $brand_c) {
             $gc_array = $this->_getTopClass($goods_class, $brand_c['class_id']);
             if (empty($gc_array)) {
                 $brand_listnew[0][] = $brand_c;
                 $brand_class[0]['brand_class'] = '其他';
             } else {
                 $brand_listnew[$gc_array['gc_id']][] = $brand_c;
                 $brand_class[$gc_array['gc_id']]['brand_class'] = $gc_array['gc_name'];
             }
             //推荐品牌
             if ($brand_c['brand_recommend'] == 1) {
                 $brand_r_list[] = $brand_c;
             }
         }
     }
     krsort($brand_class);
     krsort($brand_listnew);
     return array('brand_listnew' => $brand_listnew, 'brand_class' => $brand_class, 'brand_r_list' => $brand_r_list);
 }
开发者ID:noikiy,项目名称:nc-1,代码行数:32,代码来源:brand.php

示例15: ajaxOp

 /**
  * ajax操作
  */
 public function ajaxOp()
 {
     switch ($_GET['branch']) {
         case 'state':
             $model_brand = Model('express');
             $update_array = array();
             $update_array['id'] = intval($_GET['id']);
             $update_array[$_GET['column']] = trim($_GET['value']);
             $model_brand->update($update_array);
             echo 'true';
             exit;
             break;
         case 'order':
             $_GET['value'] = $_GET['value'] == 0 ? 2 : 1;
             $model_brand = Model('express');
             $update_array = array();
             $update_array['id'] = intval($_GET['id']);
             $update_array[$_GET['column']] = trim($_GET['value']);
             $model_brand->update($update_array);
             echo 'true';
             exit;
             break;
     }
     H('express', true);
 }
开发者ID:dw250100785,项目名称:shopnc,代码行数:28,代码来源:express.php


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