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


PHP AppController::generAnchor方法代码示例

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


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

示例1: show

 function show()
 {
     global $gorumroll, $lll, $gorumuser, $dontRemoveInstallFiles, $CONFIG_FILE_DIR, $noahVersion;
     JavaScript::addCss(CSS_DIR . "/checkconf.css?{$noahVersion}");
     $_GS = new GlobalStat();
     if ($_GS->congrat) {
         View::assign("congrat", $lll["congrat"]);
         $_GS->congrat = FALSE;
         modify($_GS);
     }
     $report = array();
     $st = join("", file($CONFIG_FILE_DIR . "/config.php"));
     $p = "^<\\?";
     $cfe = FALSE;
     if (!ereg($p, $st)) {
         $cfe = TRUE;
         $report[] = array($lll["confpreerr"], 'conferr');
     }
     $p = "\\?>\$";
     $p1 = "\\?>\n\$";
     $p2 = "\\?>\r\n\$";
     if (!ereg($p, $st) && !ereg($p1, $st) && !ereg($p2, $st)) {
         $cfe = TRUE;
         $report[] = array($lll["confposterr"], 'conferr');
     }
     if ($cfe) {
         $report[] = array($lll["conffileok"], 'confok');
     }
     if ($gorumuser->password == getPassword("admin")) {
         $report[] = array($lll["chadmpass"], 'conferr');
     }
     $_S =& new AppSettings();
     if ($_S->adminEmail == "") {
         $report[] = array($lll["chsyspass"], 'conferr');
         $report[] = array($lll["chsyspass_expl"], 'confexpl');
     } else {
         $ctrl = new AppController("checkconf/mailtest");
         $report[] = array($ctrl->generAnchor($lll["triggerMailTest"]), 'confok');
     }
     if (!defined("IMG_GIF") || !function_exists("ImageTypes")) {
         $report[] = array($lll["nogd"], 'conferr');
         $report[] = array($lll["nogd_expl"], 'confexpl');
     }
     if (!is_writeable(ini_get("session.save_path"))) {
         $error_message = "The configured Path for Session files (" . ini_get("session.save_path") . ") is not writeable!";
     }
     $this->checkWritePermission($noPermDirs);
     if (count($noPermDirs)) {
         $report[] = array(sprintf($lll["nopermission"], implode(", ", $noPermDirs)), 'conferr');
         $report[] = array($lll["nopermission_expl"], 'confexpl');
     }
     $this->checkReadPermission($noPermDirs);
     if (count($noPermDirs)) {
         $report[] = array(sprintf($lll["nopermission_read"], implode(", ", $noPermDirs)), 'conferr');
         $report[] = array($lll["nopermission_read_expl"], 'confexpl');
     }
     // Nice URL section:
     View::assign("rewriteOn", $gorumroll->rewriteOn);
     if (!$gorumroll->rewriteOn) {
         if (function_exists("apache_get_modules")) {
             View::assign("rewriteModuleEnabled", in_array("mod_rewrite", apache_get_modules()));
         } else {
             View::assign("rewriteModuleEnabled", "unsure");
         }
     }
     // CAPTCHA test:
     View::assign("captchaLink", Controller::getBaseURL() . "gorum/captcha/captcha.php");
     if ((!empty($dontRemoveInstallFiles) || $this->installFilesRemoved()) && $this->appFilesRemoved() && $this->backupFilesRemoved() && $_GS->defPageConf) {
         $ctrl =& new AppController("checkconf", "remove_first_check");
         View::assign("clickToDisappear", "{$lll['confdisapp']} " . $ctrl->generAnchor($lll["here1"]) . ".<br>{$lll['confclicheck']}");
     }
     View::assign("report", $report);
 }
开发者ID:alencarmo,项目名称:OCF,代码行数:73,代码来源:checkconf.php

示例2: showRangeSelector

 function showRangeSelector($base)
 {
     global $gorumroll, $lll, $imagesDir;
     global $blockSize, $rangeBlockSize;
     global $yahooStylePagerTool;
     if (function_exists("appShowRangeSelector")) {
         return appShowRangeSelector($base);
     }
     if ($yahooStylePagerTool) {
         return showYahooStyleRangeSelector($base);
     }
     $typ =& $base->getTypeInfo();
     $bs = $blockSize;
     $rbs = $rangeBlockSize;
     $ro = isset($_COOKIE["kuki_rangeoffset_{$gorumroll->list}"]) ? $_COOKIE["kuki_rangeoffset_{$gorumroll->list}"] : (isset($_COOKIE["kuki_rangeoffset"]) ? $_COOKIE["kuki_rangeoffset"] : 0);
     $off = isset($_COOKIE["kuki_offset_{$gorumroll->list}"]) ? $_COOKIE["kuki_offset_{$gorumroll->list}"] : (isset($_COOKIE["kuki_offset"]) ? $_COOKIE["kuki_offset"] : 0);
     $base->getCount($count);
     if ($count <= $bs || $bs == 0 || $rbs == 0) {
         return "";
     }
     $ctrlParams = array();
     $ctrlParams["method"] = "range";
     $s = "";
     $s .= "<div class='pager'>";
     if ($off != 0) {
         $ctrlParams["rangeoffset"] = $ro;
         $ctrlParams["offset"] = 0;
         $s .= "<span>";
         $ctrl = new AppController($ctrlParams);
         $s .= $ctrl->generImageAnchor(IMAGES_DIR . "/first.gif", $lll["first"]);
         $s .= "</span>\n";
         $newOffset = max($off - $bs, 0);
         $ctrl["offset"] = $newOffset;
         $s .= "<span>";
         $ctrl = new AppController($ctrlParams);
         $s .= $ctrl->generImageAnchor(IMAGES_DIR . "/prev.gif", $lll["prev"]);
         $s .= "</span>\n";
     }
     if ($ro != 0) {
         $newOffset = max($ro - $rbs, 0);
         $ctrlParams["rangeoffset"] = $newOffset;
         $ctrlParams["offset"] = $off;
         //*
         $s .= "<span>";
         $ctrl = new AppController($ctrlParams);
         $s .= $ctrl->generAnchor("...");
         $s .= "</span>\n";
     }
     $upperRange = $count;
     for ($i = $ro; $i < $ro + $rbs; $i++) {
         $newOffset = $i * $bs;
         if ($newOffset >= $count) {
             break;
         }
         $ctrlParams["offset"] = $newOffset;
         $ctrlParams["rangeoffset"] = $ro;
         if ($off / $bs == $i) {
             $s .= "<span>";
             $s .= $i + 1;
             $s .= "</span>\n";
         } else {
             $s .= "<span>";
             $ctrl = new AppController($ctrlParams);
             $s .= $ctrl->generAnchor($i + 1);
             $s .= "</span>\n";
         }
         $upperRange = min($newOffset + $bs, $count);
     }
     if ($count > $upperRange) {
         if (($ro + $rbs - 1) * $bs > $count) {
             $newOffset = $count / $bs + 1 - $rbs;
         } else {
             $newOffset = $ro + $rbs;
         }
         $ctrlParams["rangeoffset"] = $newOffset;
         $ctrlParams["offset"] = $off;
         //*
         $s .= "<span>";
         $ctrl = new AppController($ctrlParams);
         $s .= $ctrl->generAnchor("...");
         $s .= "</span>\n";
     }
     if ($off + $bs < $count) {
         $newOffset = $off + $bs;
         $ctrlParams["offset"] = $newOffset;
         $ctrlParams["rangeoffset"] = $ro;
         $s .= "<span>";
         $ctrl = new AppController($ctrlParams);
         $s .= $ctrl->generImageAnchor(IMAGES_DIR . "/next.gif", $lll["next"]);
         $s .= "</span>\n";
         if ($count % $bs) {
             $newOffset = $count - $count % $bs;
         } else {
             $newOffset = $count - $bs;
         }
         $ctrlParams["offset"] = $newOffset;
         $ctrlParams["rangeoffset"] = $ro;
         $s .= "<span>";
         $ctrl = new AppController($ctrlParams);
         $s .= $ctrl->generImageAnchor(IMAGES_DIR . "/last.gif", $lll["last"]);
//.........这里部分代码省略.........
开发者ID:alencarmo,项目名称:OCF,代码行数:101,代码来源:pager.php


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