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

PHP ConfigHelper类代码示例

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

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



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

示例1: MessageAdd

function MessageAdd($msg, $headers, $files = NULL)
{
    global $DB, $LMS;
    $time = time();
    $head = '';
    if ($headers) {
        foreach ($headers as $idx => $header) {
            $head .= $idx . ": " . $header . "\n";
        }
    }
    $DB->Execute('INSERT INTO rtmessages (ticketid, createtime, subject, body, userid, customerid, mailfrom, inreplyto, messageid, replyto, headers)
			VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', array($msg['ticketid'], $time, $msg['subject'], preg_replace("/\r/", "", $msg['body']), $msg['userid'], $msg['customerid'], $msg['mailfrom'], $msg['inreplyto'], $msg['messageid'], isset($msg['replyto']) ? $msg['replyto'] : $headers['Reply-To'], $head));
    $mail_dir = ConfigHelper::getConfig('rt.mail_dir');
    if (!empty($files) && !empty($mail_dir)) {
        $id = $DB->GetLastInsertId('rtmessages');
        $dir = $mail_dir . sprintf('/%06d/%06d', $msg['ticketid'], $id);
        @mkdir($mail_dir . sprintf('/%06d', $msg['ticketid']), 0700);
        @mkdir($dir, 0700);
        foreach ($files as $file) {
            $newfile = $dir . '/' . $file['name'];
            if (@rename($file['tmp_name'], $newfile)) {
                $DB->Execute('INSERT INTO rtattachments (messageid, filename, contenttype) 
						VALUES (?,?,?)', array($id, $file['name'], $file['type']));
            }
        }
    }
}
开发者ID:Akheon23,项目名称:lms,代码行数:27,代码来源:rtmessageadd.php


示例2: invoice_body

function invoice_body()
{
    global $invoice, $pdf;
    if (isset($invoice['invoice'])) {
        $template = ConfigHelper::getConfig('invoices.cnote_template_file');
    } else {
        $template = ConfigHelper::getConfig('invoices.template_file');
    }
    switch ($template) {
        case "standard":
            invoice_body_standard();
            break;
        case "FT-0100":
            invoice_body_ft0100();
            break;
        default:
            if (file_exists($template)) {
                require $template;
            } else {
                //go to LMS modules directory
                require MODULES_DIR . '/' . $template;
            }
    }
    if (!isset($invoice['last'])) {
        new_page();
    }
}
开发者ID:kornelek,项目名称:lms,代码行数:27,代码来源:invoice_pdf.php


示例3: note_recipient

 public function note_recipient()
 {
     $oldy = $this->backend->GetY();
     $recipient = '<b>' . trans('Note recipient:') . '</b><br>';
     $recipient .= $this->data['name'] . '<br>';
     $recipient .= $this->data['address'] . '<br>';
     $recipient .= $this->data['zip'] . ' ' . $this->data['city'] . '<br>';
     if ($this->data['ten']) {
         $recipient .= trans('TEN') . ': ' . $this->data['ten'] . '<br>';
     } elseif ($this->data['ssn']) {
         $recipient .= trans('SSN') . ': ' . $this->data['ssn'] . '<br>';
     }
     $this->backend->SetFont('arial', '', 10);
     $this->backend->writeHTMLCell(80, '', 125, 50, $recipient, 0, 1, 0, true, 'L');
     $y = $this->backend->GetY();
     if (ConfigHelper::checkValue(ConfigHelper::getConfig('invoices.customer_bankaccount', true))) {
         $bankaccount = trans('Bank account:') . ' <b>' . format_bankaccount(bankaccount($this->data['customerid'], $this->data['account'])) . '</b>';
         $this->backend->SetFont('arial', 'B', 8);
         $this->backend->writeHTMLCell('', '', 125, $oldy + round(($y - $oldy - 8) / 2), $bankaccount, 0, 1, 0, true, 'L');
     }
     if (ConfigHelper::checkValue(ConfigHelper::getConfig('invoices.customer_credentials', true))) {
         $pin = '<b>' . trans('Customer ID: $a', sprintf('%04d', $this->data['customerid'])) . '</b><br>';
         $pin .= '<b>PIN: ' . sprintf('%04d', $this->data['customerpin']) . '</b><br>';
         $this->backend->SetFont('arial', 'B', 8);
         $this->backend->writeHTMLCell('', '', 125, $oldy + round(($y - $oldy) / 2), $pin, 0, 1, 0, true, 'L');
     }
     $this->backend->SetY($y);
 }
开发者ID:itav,项目名称:lms,代码行数:28,代码来源:LMSTcpdfDebitNote.php


示例4: SetLanguage

 protected function SetLanguage($aLanguages)
 {
     if (ConfigHelper::Get('/languages/switch') == 'host') {
         $sLanguage = substr($_SERVER['SERVER_NAME'], 0, 2);
         if (array_key_exists($sLanguage, $aLanguages) && substr($_SERVER['SERVER_NAME'], 2, 1) == '.') {
             $this->sLanguage = $sLanguage;
         } else {
             $this->sLanguage = 'en';
         }
     } else {
         // check for request to change language
         // if not present check for cookie specifiying language
         // finally fall back to english
         if (isset($_GET['lang']) && array_key_exists($_GET['lang'], $aLanguages)) {
             $this->sLanguage = $_GET['lang'];
             setcookie('lang', $this->sLanguage, time() + 60 * 60 * 24 * 365, '/');
             header('Location: /');
             exit;
         } elseif (isset($_COOKIE['lang']) && array_key_exists($_COOKIE['lang'], $aLanguages)) {
             $this->sLanguage = $_COOKIE['lang'];
         } else {
             $this->sLanguage = 'en';
         }
     }
 }
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:25,代码来源:controller.inc.php


示例5: main_form

 protected function main_form($x, $y)
 {
     $balance = $this->data['balance'] < 0 ? -$this->data['balance'] : $this->data['balance'];
     $font_size = 14;
     $lineh = 25;
     $x += ConfigHelper::getConfig('finances.leftmargin', 0, true);
     $y += ConfigHelper::getConfig('finances.bottommargin', 0, true);
     $y += 275;
     $this->backend->addText($x, $y, $font_size, $this->data['d_name']);
     $y -= $lineh;
     $this->backend->addText($x, $y, $font_size, trim($this->data['d_zip'] . ' ' . $this->data['d_city'] . ' ' . $this->data['d_address']));
     $y -= $lineh;
     $this->backend->addText($x, $y, $font_size, format_bankaccount(bankaccount($this->data['id'], $this->data['account'])));
     $y -= $lineh;
     $this->backend->addText($x + 220, $y, $font_size, sprintf('%.2f', $balance));
     $y -= $lineh;
     $this->backend->addText($x, $y, $font_size, trans('$a dollars $b cents', to_words(floor($balance)), to_words(round(($balance - floor($balance)) * 100))));
     $y -= $lineh;
     $this->backend->addText($x, $y, $font_size, $this->truncate($this->data['customername']));
     $y -= $lineh;
     $this->backend->addText($x, $y, $font_size, $this->truncate(trim($this->data['zip'] . ' ' . $this->data['city'] . ' ' . $this->data['address'])));
     $y -= $lineh;
     $this->backend->addText($x, $y, $font_size, ConfigHelper::getConfig('finances.pay_title', trans('Not set')));
     $y -= $lineh;
     $this->backend->addText($x, $y, $font_size, trans('Customer ID: $a', sprintf('%04d', $this->data['id'])));
 }
开发者ID:Akheon23,项目名称:lms,代码行数:26,代码来源:LMSEzpdfTransferForm.php


示例6: module_setup

function module_setup()
{
    global $SMARTY, $DB, $USERPANEL, $layout, $LMS;
    $layout['pagetitle'] = trans('Userpanel Configuration');
    $SMARTY->assign('page_header', ConfigHelper::getConfig('userpanel.page_header', ''));
    $SMARTY->assign('company_logo', ConfigHelper::getConfig('userpanel.company_logo', ''));
    $SMARTY->assign('stylelist', getdir(USERPANEL_DIR . DIRECTORY_SEPARATOR . 'style', '^[a-z0-9]*$'));
    $SMARTY->assign('style', ConfigHelper::getConfig('userpanel.style', 'default'));
    $SMARTY->assign('hint', ConfigHelper::getConfig('userpanel.hint', 'modern'));
    $SMARTY->assign('hide_nodes_modules', ConfigHelper::getConfig('userpanel.hide_nodes_modules', 0));
    $SMARTY->assign('reminder_mail_sender', ConfigHelper::getConfig('userpanel.reminder_mail_sender', ''));
    $SMARTY->assign('reminder_mail_subject', ConfigHelper::getConfig('userpanel.reminder_mail_subject', trans('credential reminder')));
    $SMARTY->assign('reminder_mail_body', ConfigHelper::getConfig('userpanel.reminder_mail_body', "ID: %id\nPIN: %pin"));
    $SMARTY->assign('reminder_sms_body', ConfigHelper::getConfig('userpanel.reminder_sms_body', "ID: %id, PIN: %pin"));
    $SMARTY->assign('auth_type', ConfigHelper::getConfig('userpanel.auth_type', 1));
    $SMARTY->assign('force_ssl', ConfigHelper::getConfig('userpanel.force_ssl', ConfigHelper::getConfig('phpui.force_ssl', 1)));
    $enabled_modules = ConfigHelper::getConfig('userpanel.enabled_modules', null, true);
    if (is_null($enabled_modules)) {
        $enabled_modules = array();
        if (!empty($USERPANEL->MODULES)) {
            foreach ($USERPANEL->MODULES as $module) {
                $enabled_modules[] = $module['module'];
            }
        }
        $DB->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'enabled_modules', implode(',', $enabled_modules)));
    } else {
        $enabled_modules = explode(',', $enabled_modules);
    }
    $SMARTY->assign('enabled_modules', $enabled_modules);
    $SMARTY->assign('total', sizeof($USERPANEL->MODULES));
    $SMARTY->display('file:' . USERPANEL_DIR . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . 'setup.html');
}
开发者ID:prezeskk,项目名称:lms,代码行数:32,代码来源:setup_functions.php


示例7: tla_ads

function tla_ads()
{
    // Number of seconds before connection to XML times out
    // (This can be left the way it is)
    $CONNECTION_TIMEOUT = 10;
    // Local file to store XML
    // This file MUST be writable by web server
    // You should create a blank file and CHMOD it to 666
    $LOCAL_XML_FILENAME = ConfigHelper::Get('/cache/tla/dir') . ConfigHelper::Get('/cache/tla/file');
    if (!file_exists($LOCAL_XML_FILENAME)) {
        die("Script error: {$LOCAL_XML_FILENAME} does not exist. Please create a blank file named {$LOCAL_XML_FILENAME}.");
    }
    if (!is_writable($LOCAL_XML_FILENAME)) {
        die("Script error: {$LOCAL_XML_FILENAME} is not writable. Please set write permissions on {$LOCAL_XML_FILENAME}.");
    }
    if (filemtime($LOCAL_XML_FILENAME) < time() - 3600 || filesize($LOCAL_XML_FILENAME) < 20) {
        $request_uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : "";
        $user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "";
        tla_updateLocalXML("http://www.text-link-ads.com/xml.php?inventory_key=Z73AUCI0OTG7DAHAYCKP&referer=" . urlencode($request_uri) . "&user_agent=" . urlencode($user_agent), $LOCAL_XML_FILENAME, $CONNECTION_TIMEOUT);
    }
    $xml = tla_getLocalXML($LOCAL_XML_FILENAME);
    $arr_xml = tla_decodeXML($xml);
    if (is_array($arr_xml)) {
        echo "\n<ul id=\"text-links\">\n";
        for ($i = 0; $i < count($arr_xml['URL']); $i++) {
            if (isset($arr_xml['PostID'][$i]) && $arr_xml['PostID'][$i] > 0) {
                continue;
            }
            echo "<li>" . $arr_xml['BeforeText'][$i] . " <a href=\"" . $arr_xml['URL'][$i] . "\">" . $arr_xml['Text'][$i] . "</a> " . $arr_xml['AfterText'][$i] . "</li>\n";
        }
        echo "</ul>";
    }
}
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:33,代码来源:text-ads.inc.php


示例8: WriteToBrowser

 public function WriteToBrowser($filename = null)
 {
     $this->PrepareFullContents();
     header('Content-Type: ' . ConfigHelper::getConfig($this->config_section . '.content_type'));
     if (!is_null($filename)) {
         header('Content-Disposition: inline; filename=' . $filename);
     }
     echo $this->contents;
 }
开发者ID:Akheon23,项目名称:lms,代码行数:9,代码来源:LMSHtmlDocument.php


示例9: Draw

 public function Draw($data)
 {
     parent::Draw($data);
     $template_file = ConfigHelper::getConfig('notes.template_file');
     if (!$this->smarty->templateExists($template_file)) {
         $template_file = 'note' . DIRECTORY_SEPARATOR . $template_file;
     }
     $this->smarty->assign('note', $this->data);
     $this->contents .= $this->smarty->fetch($template_file);
 }
开发者ID:Akheon23,项目名称:lms,代码行数:10,代码来源:LMSHtmlDebitNote.php


示例10: module_setup

 function module_setup()
 {
     global $SMARTY, $LMS;
     $SMARTY->assign('disable_transferform', ConfigHelper::getConfig('userpanel.disable_transferform'));
     $SMARTY->assign('disable_invoices', ConfigHelper::getConfig('userpanel.disable_invoices'));
     $SMARTY->assign('invoice_duplicate', ConfigHelper::getConfig('userpanel.invoice_duplicate'));
     $SMARTY->assign('show_tariffname', ConfigHelper::getConfig('userpanel.show_tariffname'));
     $SMARTY->assign('show_speeds', ConfigHelper::getConfig('userpanel.show_speeds'));
     $SMARTY->display('module:finances:setup.html');
 }
开发者ID:kornelek,项目名称:lms,代码行数:10,代码来源:functions.php


示例11: __construct

 public function __construct(&$DB, &$SESSION)
 {
     // ustawia zmienne klasy
     $this->DB =& $DB;
     $this->SESSION =& $SESSION;
     $module_order = ConfigHelper::getConfig('userpanel.module_order', '', true);
     if (strlen($module_order)) {
         $this->module_order = array_flip(explode(',', $module_order));
     }
 }
开发者ID:prezeskk,项目名称:lms,代码行数:10,代码来源:Userpanel.class.php


示例12: pngdrawtext

function pngdrawtext($image, $font, $x, $y, $text, $color, $bgcolor)
{
    if (ConfigHelper::getConfig('phpui.gd_translate_to')) {
        $text = iconv('UTF-8', ConfigHelper::getConfig('phpui.gd_translate_to'), $text);
    }
    imagestring($image, $font, $x + 1, $y + 1, $text, $bgcolor);
    imagestring($image, $font, $x + 1, $y - 1, $text, $bgcolor);
    imagestring($image, $font, $x - 1, $y + 1, $text, $bgcolor);
    imagestring($image, $font, $x - 1, $y - 1, $text, $bgcolor);
    imagestring($image, $font, $x, $y, $text, $color);
}
开发者ID:Akheon23,项目名称:lms,代码行数:11,代码来源:netdevmap.php


示例13: GetMenuUrl

 public function GetMenuUrl($sAppRoot, $sSection)
 {
     if ($sSection != 'home') {
         if (ConfigHelper::Get('/urls/rewritten')) {
             return $sAppRoot . "section/{$sSection}";
         } else {
             return $sAppRoot . "?view={$sSection}";
         }
     }
     return $sAppRoot;
 }
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:11,代码来源:template-functions.inc.php


示例14: Draw

 public function Draw($data)
 {
     parent::Draw($data);
     $template_file = ConfigHelper::getConfig('receipts.template_file');
     if (!$this->smarty->templateExists('file:' . $template_file)) {
         $template_file = 'receipt' . DIRECTORY_SEPARATOR . $template_file;
     }
     $this->smarty->assign('type', $this->data['which']);
     $this->smarty->assign('receipt', $this->data);
     $this->contents .= $this->smarty->fetch('file:' . $template_file);
 }
开发者ID:itav,项目名称:lms,代码行数:11,代码来源:LMSHtmlReceipt.php


示例15: module_get_timestamp

function module_get_timestamp($tpl_name, &$tpl_timestamp, $smarty_obj)
{
    global $LMS;
    $template = explode(':', $tpl_name);
    $template_path = ConfigHelper::getConfig('directories.userpanel_dir') . '/modules/' . $template[0] . '/templates/' . $template[1];
    if (file_exists($template_path)) {
        $tpl_timestamp = filectime($template_path);
        return true;
    } else {
        return false;
    }
}
开发者ID:oswida,项目名称:lms,代码行数:12,代码来源:LMS.setup.php


示例16: smartyCashImportOKBS

 public function smartyCashImportOKBS(Smarty $hook_data)
 {
     $template_dirs = $hook_data->getTemplateDir();
     $plugin_templates = PLUGINS_DIR . DIRECTORY_SEPARATOR . LMSCustomersAgePlugin::PLUGIN_DIRECTORY_NAME . DIRECTORY_SEPARATOR . 'templates';
     $custom_templates_dir = ConfigHelper::getConfig('phpui.custom_templates_dir');
     if (!empty($custom_templates_dir) && file_exists($plugin_templates . DIRECTORY_SEPARATOR . $custom_templates_dir) && !is_file($plugin_tempaltes . DIRECTORY_SEPARATOR . $custom_templates_dir)) {
         $plugin_templates = PLUGINS_DIR . DIRECTORY_SEPARATOR . LMSCustomersAgePlugin::PLUGIN_DIRECTORY_NAME . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . $custom_templates_dir;
     }
     array_unshift($template_dirs, $plugin_templates);
     $hook_data->setTemplateDir($template_dirs);
     return $hook_data;
 }
开发者ID:kyob,项目名称:lms-plugins,代码行数:12,代码来源:CashImportOKBSHandler.php


示例17: _getConfig

 /**
  * Get imap configuration
  */
 private function _getConfig()
 {
     $config = ConfigHelper::getImapConfig();
     $this->hostname = $config->imap_host;
     $this->username = $config->imap_user;
     $this->password = $config->imap_pass;
     // Validate config
     if (strlen($this->hostname) == 0 || strlen($this->username) == 0 || strlen($this->password) == 0) {
         return false;
     } else {
         return true;
     }
 }
开发者ID:houzhenggang,项目名称:cobalt,代码行数:16,代码来源:Mail.php


示例18: __construct

 /**
  * Loads plugins
  *
  * @throws Exception Throws exception if plugin not found
  */
 public function __construct()
 {
     $dirs = getdir(PLUGINS_DIR, '^[0-9a-zA-Z]+$');
     if (empty($dirs)) {
         return;
     }
     asort($dirs);
     $plugins_config = ConfigHelper::getConfig('phpui.plugins');
     $plugins_tuples = empty($plugins_config) ? array() : preg_split('/[;,\\s\\t\\n]+/', $plugins_config, -1, PREG_SPLIT_NO_EMPTY);
     $plugin_priorities = array();
     foreach ($plugins_tuples as $idx => $plugin_tuple) {
         $plugin_props = explode(':', $plugin_tuple);
         $plugin_priorities[$plugin_props[0]] = count($plugin_props) == 2 ? intval($plugin_props[1]) : SubjectInterface::LAST_PRIORITY;
         $plugins_tuples[$idx] = $plugin_props[0];
     }
     foreach ($dirs as $plugin_name) {
         if (class_exists($plugin_name)) {
             $plugin_name::loadLocales();
             $plugin_info = array('name' => $plugin_name, 'enabled' => false, 'new_style' => true, 'dbcurrschversion' => null, 'dbschversion' => defined($plugin_name . '::PLUGIN_DBVERSION') ? constant($plugin_name . '::PLUGIN_DBVERSION') : null, 'fullname' => defined($plugin_name . '::PLUGIN_NAME') ? trans(constant($plugin_name . '::PLUGIN_NAME')) : null, 'description' => defined($plugin_name . '::PLUGIN_DESCRIPTION') ? trans(constant($plugin_name . '::PLUGIN_DESCRIPTION')) : null, 'author' => defined($plugin_name . '::PLUGIN_AUTHOR') ? constant($plugin_name . '::PLUGIN_AUTHOR') : null);
             if (array_key_exists($plugin_name, $plugin_priorities)) {
                 $plugin = new $plugin_name();
                 if (!$plugin instanceof LMSPlugin) {
                     throw new Exception("Plugin object must be instance of LMSPlugin class");
                 }
                 $plugin_info = array_merge($plugin_info, array('enabled' => true, 'priority' => $plugin_priorities[$plugin_name], 'dbcurrschversion' => $plugin->getDbSchemaVersion()));
                 $this->registerObserver($plugin, $plugin_info['priority']);
             }
             $this->new_style_plugins[$plugin_name] = $plugin_info;
         } else {
             writesyslog("Unknown plugin {$plugin_name} at position {$position}", LOG_ERR);
             continue;
         }
     }
     $files = getdir(LIB_DIR . DIRECTORY_SEPARATOR . 'plugins', '^[0-9a-zA-Z_\\-]+\\.php$');
     if (empty($files)) {
         return;
     }
     asort($files);
     $old_plugins = array_diff($plugins_tuples, array_keys($this->new_style_plugins));
     foreach ($files as $plugin_name) {
         if (!is_readable(LIB_DIR . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR . $plugin_name)) {
             continue;
         }
         $plugin_name = str_replace('.php', '', $plugin_name);
         $plugin_info = array('name' => $plugin_name, 'enabled' => false, 'new_style' => false);
         if (array_key_exists($plugin_name, $plugin_priorities)) {
             $plugin_info['enabled'] = true;
         }
         $this->old_style_plugins[$plugin_name] = $plugin_info;
     }
 }
开发者ID:itav,项目名称:lms,代码行数:56,代码来源:LMSPluginManager.php


示例19: DBLoad

function DBLoad($filename = NULL)
{
    global $DB, $SYSLOG;
    if (!$filename) {
        return FALSE;
    }
    $finfo = pathinfo($filename);
    $ext = $finfo['extension'];
    if ($ext == 'gz' && extension_loaded('zlib')) {
        $file = gzopen($filename, 'r');
    } else {
        $file = fopen($filename, 'r');
    }
    if (!$file) {
        return FALSE;
    }
    $DB->BeginTrans();
    // przyspieszmy działanie jeżeli baza danych obsługuje transakcje
    while (!feof($file)) {
        $line = fgets($file, 8192);
        if ($line != '') {
            $line = str_replace(";\n", '', $line);
            $DB->Execute($line);
        }
    }
    $DB->CommitTrans();
    if (extension_loaded('zlib') && $ext == 'gz') {
        gzclose($file);
    } else {
        fclose($file);
    }
    // Okej, zróbmy parę bzdurek db depend :S
    // Postgres sux ! (warden)
    // Tak, a łyżka na to 'niemożliwe' i poleciała za wanną potrącając bannanem musztardę (lukasz)
    switch (ConfigHelper::getConfig('database.type')) {
        case 'postgres':
            // actualize postgres sequences ...
            foreach ($DB->ListTables() as $tablename) {
                // ... where we have *_id_seq
                if (!in_array($tablename, array('rtattachments', 'dbinfo', 'invoicecontents', 'receiptcontents', 'documentcontents', 'stats', 'eventassignments', 'sessions'))) {
                    $DB->Execute("SELECT setval('" . $tablename . "_id_seq',max(id)) FROM " . $tablename);
                }
            }
            break;
    }
    if ($SYSLOG) {
        $SYSLOG->AddMessage(SYSLOG_RES_DBBACKUP, SYSLOG_OPER_DBBACKUPRECOVER, array('filename' => $filename), null);
    }
}
开发者ID:jarecky,项目名称:lms,代码行数:49,代码来源:dbrecover.php


示例20: module_setup

function module_setup()
{
    global $SMARTY, $DB, $USERPANEL, $layout, $LMS;
    $layout['pagetitle'] = trans('Userpanel Configuration');
    $SMARTY->assign('stylelist', getdir(USERPANEL_DIR . '/style', '^[a-z0-9]*$'));
    $SMARTY->assign('style', ConfigHelper::getConfig('userpanel.style', 'default'));
    $SMARTY->assign('hint', ConfigHelper::getConfig('userpanel.hint', 'modern'));
    $SMARTY->assign('hide_nodes_modules', ConfigHelper::getConfig('userpanel.hide_nodes_modules', 0));
    $SMARTY->assign('reminder_mail_sender', ConfigHelper::getConfig('userpanel.reminder_mail_sender', ''));
    $SMARTY->assign('reminder_mail_subject', ConfigHelper::getConfig('userpanel.reminder_mail_subject', trans('credential reminder')));
    $SMARTY->assign('reminder_mail_body', ConfigHelper::getConfig('userpanel.reminder_mail_body', "ID: %id\nPIN: %pin"));
    $SMARTY->assign('reminder_sms_body', ConfigHelper::getConfig('userpanel.reminder_sms_body', "ID: %id, PIN: %pin"));
    $SMARTY->assign('total', sizeof($USERPANEL->MODULES));
    $SMARTY->display(USERPANEL_DIR . '/templates/setup.html');
}
开发者ID:oswida,项目名称:lms,代码行数:15,代码来源:setup_functions.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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