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


PHP Basic类代码示例

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


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

示例1: displayCustomPageLink

 public function displayCustomPageLink()
 {
     $customPageObj = new Basic($this->MySQL, "custompages", "custompage_id");
     $menuCustomPageInfo = $this->menuItemObj->objCustomPage->get_info();
     $customPageObj->select($menuCustomPageInfo['custompage_id']);
     echo "\n\t\t\t<div style='text-align: " . $menuCustomPageInfo['textalign'] . "'>\n\t\t\t" . $menuCustomPageInfo['prefix'] . "<a href='" . MAIN_ROOT . "custompage.php?pID=" . $menuCustomPageInfo['custompage_id'] . "' target='" . $menuCustomPageInfo['linktarget'] . "'>" . $customPageObj->get_info_filtered("pagename") . "</a>\n\t\t\t</div>\n\t\t\t";
 }
开发者ID:bluethrust,项目名称:clanscriptsv4,代码行数:7,代码来源:roboredmenu.php

示例2: revokeMedalSave

function revokeMedalSave()
{
    global $mysqli, $member, $medalObj, $memberInfo, $formObj;
    $revokeMedalObj = new Basic($mysqli, "medals_members", "medalmember_id");
    $arrMemberMedals = $member->getMedalList(true);
    $memberMedalID = array_search($_POST['medal'], $arrMemberMedals);
    if ($revokeMedalObj->select($memberMedalID) && $revokeMedalObj->delete()) {
        // Check if medal is frozen for member already
        $arrFrozenMembers = $medalObj->getFrozenMembersList();
        if (in_array($_POST['member'], $arrFrozenMembers)) {
            $frozenMedalID = array_search($_POST['member'], $arrFrozenMembers);
            $medalObj->objFrozenMedal->select($frozenMedalID);
            $medalObj->objFrozenMedal->delete();
        }
        $frozenMessage = "";
        if ($medalObj->get_info("autodays") != 0 || $medalObj->get_info("autorecruits") != 0) {
            $freezeTime = 86400 * $_POST['freezetime'] + time();
            $medalObj->objFrozenMedal->addNew(array("medal_id", "member_id", "freezetime"), array($_POST['medal'], $_POST['member'], $freezeTime));
            $dispDays = $_POST['freezetime'] == 1 ? "day" : "days";
            $frozenMessage = "  The medal will not be awarded again for " . $_POST['freezetime'] . " " . $dispDays . ".";
        }
        $logMessage = $member->getMemberLink() . " was stripped of the " . $medalObj->get_info_filtered("name") . " medal." . $frozenMessage . "<br><br><b>Reason:</b><br>" . filterText($_POST['reason']);
        $member->postNotification("You were stripped of the medal: <b>" . $medalObj->get_info_filtered("name") . "</b>");
        $member->select($memberInfo['member_id']);
        $member->logAction($logMessage);
    } else {
        $formObj->blnSaveResult = false;
        $formObj->errors[] = "Unable to save information to the database.  Please contact the website administrator.";
    }
}
开发者ID:nsystem1,项目名称:clanscripts,代码行数:30,代码来源:revokemedal.php

示例3: displayCustomPageLink

 public function displayCustomPageLink()
 {
     $customPageObj = new Basic($this->MySQL, "custompages", "custompage_id");
     $menuCustomPageInfo = $this->menuItemObj->objCustomPage->get_info();
     $customPageObj->select($menuCustomPageInfo['custompage_id']);
     $menuItemInfo = $customPageObj->get_info_filtered();
     $menuItemInfo['name'] = $menuItemInfo['pagename'];
     $menuCustomPageInfo['link'] = MAIN_ROOT . "custompage.php?pID=" . $menuItemInfo['custompage_id'];
     $this->formatLink($menuItemInfo, $menuCustomPageInfo);
 }
开发者ID:bluethrust,项目名称:clanscriptsv4,代码行数:10,代码来源:simpletechmenu.php

示例4: fatalError

    /**
     * Abort with a fatal error, displaying debug information to the
     * user.
     *
     * @access public
     *
     * @param integer $error  		Error number which is assigned to a text in errors.php.
     * @param integer $file             The file in which the error occured.
     * @param integer $line             The line on which the error occured.
     * @param optional boolean $log     Log this message via Horde::logMesage()?
     */
    function fatalError($error, $file, $line, $log = true)
    {
        $errortext = _("<b>A fatal error has occurred:</b>") . "<br /><br />\n";
        $errortext .= Basic::getErrorMessage($error) . "<br /><br />\n";
        $errortext .= sprintf(_("[line %s of %s]"), $line, $file);
        /*if ($log) {
              $errortext .= "<br /><br />\n";
              $errortext .= _("Details have been logged for the administrator.");
          }*/
        // Hardcode a small stylesheet so that this doesn't depend on
        // anything else.
        echo <<<HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Application Framework :: Fatal Error</title>
<style type="text/css">
<!--
body { font-family: Geneva,Arial,Helvetica,sans-serif; font-size: 12px; background-color: #013069; color: #ffffff; }
.header { color: #000000; background-color: #ffffff; font-family: Verdana,Helvetica,sans-serif; font-size: 12px; }
-->
</style>
</head>
<body>
<table border="0" align="center" width="500" cellpadding="2" cellspacing="0">
<tr><td class="header" align="center">{$errortext}</td></tr>
</table>
</body>
</html>
HTML;
        exit;
    }
开发者ID:BackupTheBerlios,项目名称:dnsmgr-svn,代码行数:43,代码来源:basic.php

示例5: build

 public static function build($action, $settings)
 {
     global $config;
     if ($action == 'all' || $action == 'news') {
         file_write($config['dir']['home'] . $settings['file'], Basic::homepage($settings));
     }
 }
开发者ID:npfriday,项目名称:Tinyboard,代码行数:7,代码来源:theme.php

示例6: _arrayPick

 private static function _arrayPick($pool, $len, $glue)
 {
     $pool = self::json($pool);
     if (is_string($pool)) {
         $tmp = explode('|', $pool);
         if (count($tmp) > 1) {
             $pool = $tmp;
         }
     }
     $size = is_array($pool) ? count($pool) : mb_strlen($pool);
     $indexes = array();
     while (1) {
         $index = Basic::natural(0, $size - 1);
         $indexes[$index] = $index;
         if (count($indexes) == $len) {
             break;
         }
     }
     $values = array();
     foreach ($indexes as $index) {
         $values[] = is_array($pool) ? $pool[$index] : mb_substr($pool, $index, 1);
     }
     if ($glue == null) {
         return $values;
     }
     return implode($glue, $values);
 }
开发者ID:pythias,项目名称:mock,代码行数:27,代码来源:Helper.php

示例7: cImage

 /**
  * Returns a <img> tag with the image file defined by $file and processed according to the properties in the TypoScript array.
  * Mostly this function is a sub-function to the IMAGE function which renders the IMAGE cObject in TypoScript. This function is called by "$this->cImage($conf['file'],$conf);" from IMAGE().
  *
  * @param	string		File TypoScript resource
  * @param	array		TypoScript configuration properties
  * @return	string		<img> tag, (possibly wrapped in links and other HTML) if any image found.
  * @access private
  * @see IMAGE()
  */
 function cImage($file, $conf)
 {
     $original = parent::cImage($file, $conf);
     $url = Basic::getImgUrl($original);
     $cdn = Basic::getCDN();
     $original = str_replace($url, $cdn . $url, $original);
     return $original;
 }
开发者ID:clickstorm,项目名称:cs_cdn,代码行数:18,代码来源:TslibCobj.php

示例8: Request_sugar

 function Request_sugar()
 {
     parent::Basic();
     $cont = new Contact();
     $cont->retrieve('f0552f45-5d45-b8cd-b32c-521730a146f2');
     /*$rabbit = new SugarRabbit();
       $rabbit->CreateContact($cont);*/
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:8,代码来源:Request_sugar.php

示例9: __construct

 function __construct($id = 1)
 {
     $fpp = new fpp_paybank_Model();
     $orm = $fpp->db2cls($id);
     $title_paybank = Basic::TransVar("title_paybank");
     var_dump($title_paybank);
     $description_paybank = Basic::TransVar("description_paybank");
     $this->title = $orm->{$title_paybank};
     $this->description = $orm->{$description_paybank};
 }
开发者ID:brojasmeneses,项目名称:floreriarosabel,代码行数:10,代码来源:Pay_ctabanco.php

示例10:

 function __construct()
 {
     $this->table = new fpp_client_Model();
     $this->id_client = (int) @$_SESSION['conf']['client']['id'];
     self::$id_cliente = $this->id_client;
     parent::__construct();
 }
开发者ID:brojasmeneses,项目名称:floreriarosabel,代码行数:7,代码来源:Client.php

示例11: DB

 function __construct($conf)
 {
     Trace::add_trace('construct class', __METHOD__);
     self::$conf = $conf;
     self::$conn = new DB($conf);
     $this->Func = new Func();
 }
开发者ID:shlomohass,项目名称:IID,代码行数:7,代码来源:Basic.class.php

示例12: init

 public function init($config)
 {
     parent::init($config);
     if ($this->url == self::DEFAULT_URL) {
         eval("\$this->url = {$this->url};");
     }
 }
开发者ID:mpf-soft,项目名称:admin-widgets,代码行数:7,代码来源:Add.php

示例13: __construct

 /** Constructor
  * 
  * @param array $conf
  */
 public function __construct($conf)
 {
     parent::__construct($conf);
     Trace::add_trace('construct class', __METHOD__);
     $this->author = isset(self::$conf['general']['author']) ? self::$conf['general']['author'] : '';
     $this->version = isset(self::$conf['general']['app_version']) ? self::$conf['general']['app_version'] : '';
 }
开发者ID:shlomohass,项目名称:MidataControl,代码行数:11,代码来源:Page.class.php

示例14: init

 public function init($config)
 {
     if (!$this->confirmation) {
         $this->confirmation = $this->translate('Are you sure you want to delete this?');
     }
     parent::init($config);
 }
开发者ID:mpf-soft,项目名称:admin-widgets,代码行数:7,代码来源:Delete.php

示例15: __construct

 public function __construct($conf)
 {
     parent::__construct($conf);
     Trace::add_trace('construct class', __METHOD__);
     $this->user_ip = $this->get_ip_address();
     $this->is_loged();
 }
开发者ID:shlomohass,项目名称:MidataControl,代码行数:7,代码来源:User.class.php


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