• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Basic类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了Basic类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: ajax_getmoney

 function ajax_getmoney()
 {
     $id = abs((int) $_GET['id']);
     if ($id > 0) {
         $model = new fpp_district_Model();
         $orm = $model->db2cls($id);
         Basic::currency($orm->sendprice_district);
         echo $orm->sendprice_district;
     }
 }
开发者ID:brojasmeneses,项目名称:floreriarosabel,代码行数:10,代码来源:Ship_district.php


示例11: calcStat

 function calcStat($gameStatID, $memberObj)
 {
     $calculatedValue = 0;
     $gameStatObj = new Basic($this->MySQL, "gamestats", "gamestats_id");
     if ($gameStatObj->select($gameStatID) && isset($memberObj)) {
         $gameStatInfo = $gameStatObj->get_info_filtered();
         $gameStat1Obj = new Basic($this->MySQL, "gamestats", "gamestats_id");
         $gameStat2Obj = new Basic($this->MySQL, "gamestats", "gamestats_id");
         if ($gameStatInfo['stattype'] == "calculate" && $gameStat1Obj->select($gameStatInfo['firststat_id']) && $gameStat2Obj->select($gameStatInfo['secondstat_id'])) {
             $gameStats1Info = $gameStat1Obj->get_info_filtered();
             $gameStats2Info = $gameStat2Obj->get_info_filtered();
             $gameStat1Type = $gameStats1Info['stattype'];
             $gameStat2Type = $gameStats2Info['stattype'];
             if ($gameStat1Type == "calculate") {
                 $gameStat1Value = $this->calcStat($gameStats1Info['gamestats_id'], $memberObj);
             } else {
                 $gameStat1Value = $memberObj->getGameStatValue($gameStats1Info['gamestats_id']);
             }
             if ($gameStat2Type == "calculate") {
                 $gameStat2Value = $this->calcStat($gameStats2Info['gamestats_id'], $memberObj);
             } else {
                 $gameStat2Value = $memberObj->getGameStatValue($gameStats2Info['gamestats_id']);
             }
             switch ($gameStatInfo['calcop']) {
                 case "div":
                     if ($gameStat2Value == 0) {
                         $gameStat2Value = 1;
                     }
                     $calculatedValue = round($gameStat1Value / $gameStat2Value, $gameStatInfo['decimalspots']);
                     break;
                 case "mul":
                     $calculatedValue = round($gameStat1Value * $gameStat2Value, $gameStatInfo['decimalspots']);
                     break;
                 case "sub":
                     $calculatedValue = round($gameStat1Value - $gameStat2Value, $gameStatInfo['decimalspots']);
                     break;
                 default:
                     $calculatedValue = round($gameStat1Value + $gameStat2Value, $gameStatInfo['decimalspots']);
             }
         }
     }
     return $calculatedValue;
 }
开发者ID:nsystem1,项目名称:clanscripts,代码行数:43,代码来源:game.php


示例12: handle

 public static function handle(&$template)
 {
     if (isset($template[KEY_MOCK_DEFINE]) == false || is_array($template[KEY_MOCK_DEFINE]) == false) {
         return;
     }
     foreach ($template[KEY_MOCK_DEFINE] as $key => $value) {
         \Mock\Random\Define::set($key, Basic::handle($value));
     }
     unset($template[KEY_MOCK_DEFINE]);
 }
开发者ID:pythias,项目名称:mock,代码行数:10,代码来源:Define.php


示例13: index

 public function index()
 {
     //$profiler = new Profiler;
     if (isset($_GET['emailtest'])) {
         $this->emailtest();
         die;
     }
     if (isset($_GET['database'])) {
         $this->alterDatabase();
     }
     if (isset($_GET['cronjob'])) {
         $this->cronjob();
         die;
     }
     @session_start();
     //     $lan = (@$_GET['l']<>'en') ? "es" : 'en';
     if (@$_GET['l'] != '') {
         $_SESSION['lan'] = @$_GET['l'] != 'en' ? array("es_ES", 'España') : array("en_US", 'USA');
     }
     if (@$_SESSION['lan'] != "") {
         Kohana::config_set("locale.language", $_SESSION['lan']);
     }
     $lang = new Translate();
     $lang->currency();
     $defaultobj = "category";
     $defaultact = "index";
     $module = $this->uri->segment("index") != '' ? $this->uri->segment("index") : $defaultobj;
     $action = $this->uri->segment($module) != '' ? $this->uri->segment($module) : $defaultact;
     $module = ucfirst($lang->word->{$module});
     $lib = new $module();
     $action = @$lang->word->{$action};
     $this->template->widget = $lib->GetWidgets();
     if (method_exists($lib, $action) === FALSE) {
         $lib = new $module();
         $lib->{$defaultact}();
     } else {
         $lib->{$action}();
     }
     $table_page = new fpp_page_Model();
     $header = $table_page->db2cls(46);
     $footer = $table_page->db2cls(47);
     $meta_description = $table_page->db2cls(48);
     $tr_content_page = Basic::TransVar("content_page");
     $this->template->header = strip_tags($header->{$tr_content_page});
     $this->template->footer = $footer->{$tr_content_page};
     $this->template->meta_description = strip_tags($meta_description->{$tr_content_page});
     //Executes Action's
     $this->template->title = $this->uri->segment() == '' ? 'floreria Rosabel | florerias peru | floreria | enviar flores peru' : Kohana::config("core.title_page") . $lib->GetTitle();
     $this->template->content = $lib->GetContent();
     $this->template->keywords = $lib->GetKeywords() != '' ? $lib->GetKeywords() : 'enviar flores peru, florerías en lima, florerias en lima, envio de flores a peru,florerías,florerias lima, florerias en Lima,floreria lima, Florerias de Lima, Flores domicilio Lima, Florerias en San Isidro, envio de flores a lima, envio de flores en peru,floreria amor y amistad,flores dia de las madres,arreglos florales, floreria san borja peru, florerias en trujillo, florerias en arequipa, floreria los olivos, florerias unidas,envio de flores lima, delivery flores lima, envio flores, floreria san isidro, arreglos flores, rosas, orquideas, giraloes, tulipanes, delivery flowers, send flowers lima, roses, flower shop lima';
     if (request::is_ajax()) {
         $this->auto_render = FALSE;
         echo $lib->GetContent();
     }
 }
开发者ID:brojasmeneses,项目名称:floreriarosabel,代码行数:55,代码来源:home.php


示例14: acl_fields

 function acl_fields()
 {
     global $app_list_strings, $db, $moduleList;
     $app_list_strings['roles_list'] = array();
     $query = "SELECT id, name FROM acl_roles WHERE deleted=0 ORDER BY name";
     $res = $db->query($query);
     while ($row = $db->fetchByAssoc($res)) {
         $app_list_strings['roles_list'][$row['id']] = $row['name'];
     }
     parent::Basic();
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:11,代码来源:acl_fields.php


示例15: _randomTime

 private static function _randomTime($min = false, $max = false)
 {
     // min, max
     if ($min == false) {
         $min = 0;
     }
     if ($max == false) {
         $max = time();
     }
     return Basic::natural($min, $max);
 }
开发者ID:pythias,项目名称:mock,代码行数:11,代码来源:Date.php


示例16: saveAuth

 public function saveAuth($username, $password, $remember = false)
 {
     $this->clearAuth();
     $this->username = $this->_sessionModule->username = $username;
     $this->password = $this->_sessionModule->password = $password;
     if ($remember) {
         $this->_cookieModule->set(md5('username' . $this->salt), $username, time() + 2592000);
         $password = Basic::authcode($password, 'ENCODE', $this->salt);
         $this->_cookieModule->set(md5('password' . $this->salt), $password, time() + 2592000);
     }
 }
开发者ID:sujinw,项目名称:php-lugit-framework,代码行数:11,代码来源:AuthModule.php


示例17:

 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


示例18: 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


示例19: 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


示例20: __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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP BasicAuth类代码示例发布时间:2022-05-23
下一篇:
PHP BaserTestCase类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap