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


PHP check_class函数代码示例

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


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

示例1: nodejs_forum_event_user_forum_post_created_callback

/**
 * Event callback after triggering "user_forum_post_created".
 *
 * @param array $info
 *  Details about forum post.
 */
function nodejs_forum_event_user_forum_post_created_callback($info)
{
    $postID = intval(vartrue($info['data']['post_id'], 0));
    $postUserID = intval(vartrue($info['data']['post_user'], 0));
    $postThreadID = intval(vartrue($info['data']['post_thread'], 0));
    if ($postID === 0 || $postThreadID === 0) {
        return;
    }
    // Get forum plugin preferences.
    $plugForumPrefs = e107::getPlugConfig('forum')->getPref();
    $db = e107::getDb();
    // Load thread.
    $thread = $db->retrieve('forum_thread', '*', 'thread_id = ' . $postThreadID);
    $threadUser = intval(vartrue($thread['thread_user'], 0));
    // Load forum to check (read) permission.
    $forum = $db->retrieve('forum', '*', 'forum_id = ' . intval(vartrue($thread['thread_forum_id'], 0)));
    // Author of the forum post.
    $authorPost = e107::user($postUserID);
    // Author of the forum topic.
    $authorThread = e107::user($threadUser);
    e107_require_once(e_PLUGIN . 'nodejs/nodejs.main.php');
    $template = e107::getTemplate('nodejs_forum');
    $sc = e107::getScBatch('nodejs_forum', true);
    $tp = e107::getParser();
    // Get topic page number.
    $postNum = $db->count('forum_post', '(*)', "WHERE post_id <= " . $postID . " AND post_thread = " . $postThreadID . " ORDER BY post_id ASC");
    $postPage = ceil($postNum / vartrue($plugForumPrefs['postspage'], 10));
    // Push rendered row item into Latest Forum Posts menu.
    $sc_vars = array('author' => $authorPost, 'post' => $info['data'], 'thread' => $thread, 'topicPage' => $postPage);
    $sc->setVars($sc_vars);
    $markup = $tp->parseTemplate($template['MENU']['RECENT']['ITEM'], true, $sc);
    $message = (object) array('broadcast' => true, 'channel' => 'nodejs_notify', 'callback' => 'nodejsForumMenu', 'type' => 'latestForumPosts', 'markup' => $markup);
    nodejs_enqueue_message($message);
    // Broadcast logged in users to inform about new forum post created.
    if ($authorPost) {
        $sc->setVars($sc_vars);
        $markup = $tp->parseTemplate($template['NOTIFICATION']['POST_ALL'], true, $sc);
        // It's a public forum, so broadcast every online user.
        if (intval(vartrue($forum['forum_class'], 0)) === 0) {
            $message = (object) array('broadcast' => true, 'channel' => 'nodejs_notify', 'callback' => 'nodejsForum', 'type' => 'newForumPostAny', 'markup' => $markup, 'exclude' => $postUserID);
            nodejs_enqueue_message($message);
        } else {
            $forumClass = vartrue($forum['forum_class'], 0);
            $db->select('nodejs_presence');
            while ($row = $db->fetch()) {
                if (isset($row['uid']) && check_class($forumClass, null, $row['uid'])) {
                    $message = (object) array('channel' => 'nodejs_user_' . $row['uid'], 'callback' => 'nodejsForum', 'type' => 'newForumPostAny', 'markup' => $markup, 'exclude' => $postUserID);
                    nodejs_enqueue_message($message);
                }
            }
        }
    }
    // Broadcast logged in (thread-author) user to inform about new forum post created in his/her topic.
    if (isset($authorThread['user_id'])) {
        $sc->setVars($sc_vars);
        $markup = $tp->parseTemplate($template['NOTIFICATION']['POST_OWN'], true, $sc);
        $message = (object) array('channel' => 'nodejs_user_' . $authorThread['user_id'], 'callback' => 'nodejsForum', 'type' => 'newForumPostOwn', 'markup' => $markup, 'exclude' => $postUserID);
        nodejs_enqueue_message($message);
    }
}
开发者ID:lonalore,项目名称:nodejs_forum,代码行数:66,代码来源:e_module.php

示例2: sc_link_navigator

 function sc_link_navigator($parm = '')
 {
     global $rs;
     $frm = e107::getForm();
     $mains = "";
     if (vartrue($this->plugPrefs['link_navigator_frontpage'])) {
         $mains .= '<li><a class="btn btn-default" href="' . e107::url('links_page', 'index') . '">' . LAN_LINKS_14 . '</a></li>';
     }
     if (vartrue($this->plugPrefs['link_navigator_refer'])) {
         $mains .= '<li><a class="btn btn-default" href="' . e107::url('links_page', 'top') . '">' . LAN_LINKS_12 . '</a></li>';
     }
     if (vartrue($this->plugPrefs['link_navigator_rated']) && vartrue($this->plugPrefs['link_rating'])) {
         $mains .= '<li><a class="btn btn-default" href="' . e107::url('links_page', 'rated') . '">' . LAN_LINKS_13 . '</a></li>';
     }
     if (vartrue($this->plugPrefs['link_navigator_category'])) {
         $mains .= '<li><a class="btn btn-default" href="' . e107::url('links_page', 'allcats') . '">' . LAN_LINKS_43 . '</a></li>';
     }
     if (vartrue($this->plugPrefs['link_navigator_links'])) {
         $mains .= '<li><a class="btn btn-default" href="' . e107::url('links_page', 'alllinks') . '">' . LAN_LINKS_51 . '</a></li>';
     }
     if (vartrue($this->plugPrefs['link_navigator_submit']) && vartrue($this->plugPrefs['link_submit']) && check_class($this->plugPrefs['link_submit_class'])) {
         $mains .= '<li><a class="btn btn-default" href="' . e107::url('links_page', 'submit') . '">' . LAN_LINKS_27 . '</a></li>';
     }
     if (vartrue($this->plugPrefs['link_navigator_manager']) && vartrue($this->plugPrefs['link_manager']) && check_class($this->plugPrefs['link_manager_class'])) {
         $mains .= '<li><a class="btn btn-default" href="' . e107::url('links_page', 'manage') . '">' . LAN_LINKS_35 . '</a></li>';
     }
     return $mains;
 }
开发者ID:Jimmi08,项目名称:links_page,代码行数:28,代码来源:links_page_shortcodes.php

示例3: init

 function init()
 {
     if (!empty($_GET['filter'])) {
         $action = $_GET['filter'];
         $this->adminMenu['main/' . $action]['selected'] = true;
     }
     $pref = e107::pref('faqs');
     $this->access = array('main/create' => varset($pref['admin_faq_create'], e_UC_ADMIN), 'main/edit' => varset($pref['admin_faq_edit'], e_UC_ADMIN), 'main/delete' => varset($pref['admin_faq_delete'], e_UC_ADMIN), 'cat/list' => check_class($pref['admin_cat_create']) || check_class($pref['admin_cat_edit']) ? e_UC_ADMIN : e_UC_NOBODY, 'cat/create' => varset($pref['admin_cat_create'], e_UC_ADMIN), 'cat/edit' => varset($pref['admin_cat_edit'], e_UC_ADMIN), 'cat/delete' => varset($pref['admin_cat_delete'], e_UC_ADMIN));
 }
开发者ID:armpit,项目名称:e107,代码行数:9,代码来源:admin_config.php

示例4: sc_faq_submit_question

 function sc_faq_submit_question()
 {
     $faqpref = e107::getPlugConfig('faqs')->getPref();
     $frm = e107::getForm();
     if (check_class($faqpref['add_faq'])) {
         $text = "<div class='faq-submit-question-container'><a class='e-expandit faq-submit-question' href='faqs.php'>Submit a Question</a>\n\t\t\t<div class='e-hideme faq-submit-question-form'>\n\t\t\t<form method=\"post\" action=\"" . e_SELF . "?cat.{$id}.{$idx}\" id=\"dataform\">\n\t\t\t<div>" . $frm->textarea('ask_a_question', '') . '<br />' . $frm->submit('submit_a_question', 'Go') . "</div>\n\t\t\t</form>\n\t\t\t</div>\n\t\t\t</div>\t\t\t\n\t\t\t";
         return $text;
     }
 }
开发者ID:notzen,项目名称:e107,代码行数:9,代码来源:faqs_shortcodes.php

示例5: check_allowed

function check_allowed($class_id)
{
    global $sql;
    if (!$sql->db_Select('userclass_classes', '*', "userclass_id = {$class_id}")) {
        header("location:" . SITEURL);
        exit;
    }
    $row = $sql->db_Fetch();
    if (!getperms('0') && !check_class($row['userclass_editclass'])) {
        header("location:" . SITEURL);
        exit;
    }
}
开发者ID:CAJT-UKCoder,项目名称:e107-Plugins,代码行数:13,代码来源:userclass2.php

示例6: init

 public function init()
 {
     $ns = e107::getRender();
     $uploadAccess = e107::pref('core', 'upload_class');
     if (!check_class($uploadAccess)) {
         $text = "<div style='text-align:center'>" . LAN_UL_002 . "</div>";
         $ns->tablerender(LAN_UL_020, $text);
         return;
     }
     if (isset($_POST['upload'])) {
         $this->processUpload();
         return;
     }
     $this->renderForm();
 }
开发者ID:armpit,项目名称:e107,代码行数:15,代码来源:upload.php

示例7: renderMenu

 /**
  * Render menu contents.
  */
 function renderMenu()
 {
     $template = e107::getTemplate('paypal_donation');
     $sc = e107::getScBatch('paypal_donation', true);
     $tp = e107::getParser();
     $db = e107::getDb();
     $db->select('paypal_donation', '*', 'pd_status = 1 ORDER BY pd_weight ASC');
     $text = '';
     while ($row = $db->fetch()) {
         if (check_class($row['pd_visibility']) === true) {
             $item = array('menu_item' => $row, 'amounts' => $this->getAmounts($row['pd_id']), 'raised' => $this->getRaised($row['pd_id']));
             $sc->setVars($item);
             $text .= $tp->parseTemplate($template['MENU'], true, $sc);
         }
     }
     e107::getRender()->tablerender(LAN_PAYPAL_DONATION_FRONT_01, $text);
     unset($text);
 }
开发者ID:lonalore,项目名称:paypal_donation,代码行数:21,代码来源:paypal_donation_menu.php

示例8: uploadfile_shortcode

/**
 * Print out upload form elements and/or process submitted uploads.
 * Your <form> tag must include: enctype='multipart/form-data' - in order to work.
 *
 * Example usage:
 * <code>
 * // Process uploaded file (sent by the form below), it'll print out message (if any)
 * if(isset($_POST['etrigger_uploadfiles']))
 * {
 * 		// NOTE: chmod permissions after upload are set to 0755
 * 		echo e107::getParser()->parseTemplate('{UPLOADFILE='.e_MEDIA.'public|process=1&upload_file_mask=jpg,jpeg,png,gif&upload_final_chmod=493}');
 * }
 *
 * // Render upload form
 * echo '<form action="'.e_SELF.'" enctype="multipart/form-data" method="post">';
 * echo e107::getParser()->parseTemplate('{UPLOADFILE='.e_MEDIA.'public|nowarn&trigger=etrigger_uploadfiles}');
 * echo '</form>';
 * </code>
 *
 * @todo Human readable *nix like permissions option (upload_final_chmod) e.g. 'rw-rw-r--' --> 0664, 'rwxrwxrwx' --> 0777
 *
 * @param string $parm upload_path|parameters (GET query format)
 * 	Available parameters:
 * 	- trigger [render] (string): name attribute of upload trigger button, default 'uploadfiles'
 * 	- name [render|processing] (string): name of upload (file) field, without array brackets ([]), default 'file_userfile'
 * 	- up_container [render] (string): the id attribute of upload container (containing upload field(s)), default 'up_container'
 * 	- up_row [render] (string): the id attribute of upload added fields (diuplicates), default 'upline'
 * 	- process [render|processing] ('0'|'1' boolean): main shortcode action, 0 - render markup, 1 - process uploaded files, default '0'
 *  - upload_file_mask [processing] (string): 'file_mask' parameter of process_uploaded_files() - comma-separated list of file types which if defined limits the allowed file types to those which are
 *  in both this list and the file specified by the 'filetypes' option. Enables restriction to, for example, image files. {@link process_uploaded_files()),
 *  default is empty string
 *  - upload_filetypes [processing] (string): 'filetypes' parameter of process_uploaded_files() - name of file containing list of valid file types, default is empty string
 * 	- upload_extra_file_types [processing] (string): 'extra_file_types' parameter of process_uploaded_files() - '0' (default) rejects totally unknown file extensions;
 *  '1' accepts totally unknown file extensions which are in $options['filetypes'] file; comma-separated list of additional permitted file extensions
 *	- upload_final_chmod [processing] (string): 'final_chmod' parameter of process_uploaded_files() - chmod() to be applied to uploaded files (0644 default).
 *	NOTE: you need to provide number with numerci base of decimal (as a string) which will be auto-converted to octal number
 *	Example: '493' --> 0755; '511' --> 0777
 *	- upload_max_upload_size [processing] (string): 'max_upload_size' parameter of process_uploaded_files() - maximum size of uploaded files in bytes,
 *	or as a string with a 'multiplier' letter (e.g. 16M) at the end, default is empty string
 *	- upload_overwrite [processing] ('0'|'1' boolean): 'overwrite' parameter of process_uploaded_files() - maximum number of files which can be uploaded - default is '0' (unlimited)
 *	- return_type [processing] ('0'|'message'|'result'): 'message' (default) - return messages (eMessage::render() method);
 *	'result' - return array generated by process_uploaded_files();
 *	'0' - return empty string;
 *	NOTE: upload messages are added to 'upload_shortcode' message namespace
 *	<code>
 *	// render messages manually (return_type=0)
 *	echo e107::getMessage()->render('upload_shortcode');
 *	// OR copy them to the default message namespace
 *	e107::getMessage()->moveStack('upload_shortcode', 'default');
 *	// Do something... and render all messages
 *	echo e107::getMessage()->render();
 *	<code>
 * @return mixed Based on 'return_type' parameter - string or uploaded array result
 */
function uploadfile_shortcode($parm)
{
    if (!FILE_UPLOADS) {
        return LAN_UPLOAD_SERVEROFF;
    }
    if (USER_AREA === TRUE && !check_class(e107::getPref('upload_class'))) {
        return LAN_DISABLED;
    }
    $parm = explode('|', $parm, 2);
    $path = $parm[0];
    if ($path && !is_writable($path)) {
        return LAN_UPLOAD_777 . " <b>" . str_replace("../", "", $path) . "</b>";
    }
    $parms = array();
    parse_str(varset($parm[1], ''), $parms);
    $parms = array_merge(array('trigger' => 'uploadfiles', 'name' => 'file_userfile', 'up_container' => 'up_container', 'up_row' => 'upline', 'process' => '0', 'upload_file_mask' => '', 'upload_filetypes' => '', 'upload_extra_file_types' => '0', 'upload_final_chmod' => '', 'upload_max_upload_size' => '0', 'upload_max_file_count' => '0', 'upload_overwrite' => '0', 'return_type' => 'message', 'disable_button' => '0'), $parms);
    // PROCESS UPLOADED FILES, optional usage by external code
    if ($parms['process']) {
        e107_require_once(e_HANDLER . 'upload_handler.php');
        $options = array('file_mask' => $parms['upload_file_mask'], 'filetypes' => $parms['upload_filetypes'], 'extra_file_types' => $parms['upload_extra_file_types'] ? true : false, 'final_chmod' => $parms['upload_final_chmod'] ? intval(intval($parms['upload_final_chmod']), 8) : 0644, 'max_upload_size' => $parms['upload_max_upload_size'], 'file_array_name' => $parms['name'], 'max_file_count' => $parms['upload_max_file_count'], 'overwrite' => $parms['upload_overwrite'] ? true : false);
        $uploaded = process_uploaded_files($path, false, $options);
        if ($uploaded) {
            $emessage = e107::getMessage();
            foreach ($uploaded as $finfo) {
                $emessage->addStack($finfo['message'], 'upload_shortcode', $finfo['error'] ? E_MESSAGE_ERROR : E_MESSAGE_SUCCESS);
            }
            if ($parms['return_type'] == 'message') {
                return $emessage->render('upload_shortcode');
            }
        }
        return $parms['return_type'] == 'result' ? $uploaded : '';
    }
    // RENDER FORM
    $onclickt = !isset($parms['nowarn']) ? " onclick=\"return jsconfirm('" . LAN_UPLOAD_CONFIRM . "')\"" : '';
    $onclickd = " onclick=\"duplicateHTML('{$parms['up_row']}','{$parms['up_container']}');\"";
    $name = $parms['name'] . '[]';
    $text .= "\n\t        <!-- Upload Shortcode -->\n\t\t\t<div>\n\t\t\t\t<div class='field-spacer'>\n\t\t\t\t\t<button class='action duplicate' type='button' value='no-value'{$onclickd}><span>" . LAN_UPLOAD_ADDFILE . "</span></button>";
    // Media Manager does the submit, not the shortcode.
    if (!$parms['disable_button']) {
        $text .= "<button class='upload' type='submit' name='{$parms['trigger']}' value='no-value'{$onclickt}><span>" . LAN_UPLOAD_FILES . "</span></button>";
    }
    $text .= "\n\t\t\t\t</div>\n\t\t\t\t<div id='{$parms['up_container']}'>\n\t\t\t\t\t<div id='{$parms['up_row']}' class='nowrap'>\n\t\t\t\t\t\t<input class='tbox file' type='file' name='{$name}' />\n\t\t\t        </div>\n\t\t\t\t</div>\n\t\t\t\t<div class='field-help'>Upload to: <strong>" . str_replace('../', '', $path) . "</strong></div>\n\t\t\t</div>\n\t\t\t<!-- End Upload Shortcode -->\n\t\t";
    return $text;
}
开发者ID:armpit,项目名称:e107,代码行数:98,代码来源:uploadfile.php

示例9: check_perm

function check_perm()
{
    global $prefs;
    if ($prefs['editor_class'] == "admin") {
        if (ADMIN) {
            return True;
        }
    } elseif ($prefs['editor_class'] == "users") {
        if (USER) {
            return True;
        }
    } elseif ($prefs['editor_class'] == "all") {
        return True;
    } elseif ($prefs['editor_class'] == "admin") {
        if (ADMIN) {
            return True;
        }
    } elseif (check_class($prefs['editor_class'])) {
        return True;
    } else {
        return False;
    }
}
开发者ID:alcides,项目名称:e107wiki,代码行数:23,代码来源:utils.php

示例10: class_list

 /**
  *    Display selection dropdown of all user classes
  *
  * @param int $class - if its e_UC_MEMBER, all classes are shown. Otherwise only the class matching the value is shown.
  * @return string
  */
 function class_list($class, $form_name)
 {
     global $sql;
     $text = "<select class='tbox' id='class' name='class' onchange=\"uc_switch('user')\">";
     $text .= "<option value=''>" . US_LAN_2 . "</option>";
     if (ADMINPERMS == '0' && $class == e_UC_MEMBER) {
         $text .= "<option value='all'>" . US_LAN_3 . "</option>";
     }
     if ($class == e_UC_MEMBER) {
         $sql->db_Select("userclass_classes", "userclass_id, userclass_name", "ORDER BY userclass_name", "nowhere");
         while ($row = $sql->db_Fetch()) {
             if (check_class($row['userclass_id']) || ADMINPERMS == '0') {
                 $text .= "<option value='" . $row['userclass_id'] . ":" . $row['userclass_name'] . "'>" . $row['userclass_name'] . "</option>";
             }
         }
     } else {
         $sql->db_Select("userclass_classes", "userclass_id, userclass_name", "userclass_id='" . intval($class) . "' ORDER BY userclass_name");
         while ($row = $sql->db_Fetch()) {
             $text .= "<option value='" . $row['userclass_id'] . ":" . $row['userclass_name'] . "'>" . $row['userclass_name'] . "</option>";
         }
     }
     return $text;
 }
开发者ID:armpit,项目名称:e107,代码行数:29,代码来源:user_select_class.php

示例11: displayUserInfo

$text .= '</td>';
if (check_class($pref['eb_teams_create_class']) && $pref['eb_links_showcreateteam'] == 1) {
    $text .= '<td>';
    $text .= '<form action="' . e_PLUGIN . 'ebattles/clancreate.php" method="post">';
    $text .= '<div>';
    $text .= '<input type="hidden" name="userid" value="' . USERID . '"/>';
    $text .= '<input type="hidden" name="username" value="' . USERNAME . '"/>';
    $text .= '</div>';
    //        $text .= ebImageTextButton('createteam', 'add.png', '', 'simple', '', EB_CLANS_L7);
    $text .= '<div class="buttons"><button style="display:block; float:left; margin:0 0 0 0; padding:0 0 0 0; background-color:transparent; border:0px; font-size:100%; text-decoration:none; font-weight:bold; cursor:pointer;" type="submit" name="createteam" title="' . EB_CLANS_L7 . '"><img src="' . e_PLUGIN . 'ebattles/images/add.png" alt="' . EB_CLANS_L7 . '" style="vertical-align:middle"/></button></div>
	<div style="clear:both"></div>';
    $text .= '</form>';
    $text .= '</td>';
}
$text .= '</tr>';
if (check_class(e_UC_MEMBER)) {
    $text .= '<tr>';
    $text .= '<td>';
    $text .= '<a href="' . $profile_link . '">';
    $text .= EB_MENU_L4;
    $text .= '</a><br />';
    $text .= '</td>';
    $text .= '</tr>';
    /* Get User Information */
    $text .= displayUserInfo(USERID, $profile_link);
}
$text .= '</table>';
$ns->tablerender($ebattles_title, $text);
/***************************************************************************************
Functions
***************************************************************************************/
开发者ID:testt98,项目名称:ebattles,代码行数:31,代码来源:ebattles_menu.php

示例12: isset

}
if (isset($linkspage_pref['link_menu_navigator_links']) && $linkspage_pref['link_menu_navigator_links']) {
    if (isset($linkspage_pref['link_menu_navigator_rendertype']) && $linkspage_pref['link_menu_navigator_rendertype'] == "1") {
        $mains .= $rs->form_option(LCLAN_OPT_68, "0", e107::url('links_page', 'alllinks'), "");
    } else {
        $mains .= $bullet . " <a href='" . e107::url('links_page', 'alllinks') . "'>" . LCLAN_OPT_68 . "</a><br />";
    }
}
if (isset($linkspage_pref['link_menu_navigator_submit']) && $linkspage_pref['link_menu_navigator_submit'] && isset($linkspage_pref['link_submit']) && $linkspage_pref['link_submit'] && check_class($linkspage_pref['link_submit_class'])) {
    if (isset($linkspage_pref['link_menu_navigator_rendertype']) && $linkspage_pref['link_menu_navigator_rendertype'] == "1") {
        $mains .= $rs->form_option(LAN_LINKS_27, "0", e107::url('links_page', 'submit'), "");
    } else {
        $mains .= $bullet . " <a href='" . e107::url('links_page', 'submit') . "'>" . LAN_LINKS_27 . "</a><br />";
    }
}
if (isset($linkspage_pref['link_menu_navigator_manager']) && $linkspage_pref['link_menu_navigator_manager'] && isset($linkspage_pref['link_manager']) && $linkspage_pref['link_manager'] && check_class($linkspage_pref['link_manager_class'])) {
    if (isset($linkspage_pref['link_menu_navigator_rendertype']) && $linkspage_pref['link_menu_navigator_rendertype'] == "1") {
        $mains .= $rs->form_option(LCLAN_ITEM_35, "0", e107::url('links_page', 'manage'), "");
    } else {
        $mains .= $bullet . " <a href='" . e107::url('links_page', 'manage') . "'>" . LCLAN_ITEM_35 . "</a><br />";
    }
}
if ($mains) {
    $cap = isset($linkspage_pref['link_menu_navigator_caption']) && $linkspage_pref['link_menu_navigator_caption'] ? $linkspage_pref['link_menu_navigator_caption'] : LCLAN_OPT_82;
    if (isset($linkspage_pref['link_menu_navigator_rendertype']) && $linkspage_pref['link_menu_navigator_rendertype'] == "1") {
        $selectjs = "style='width:100%;' onchange=\"if(this.options[this.selectedIndex].value != ''){ return document.location=this.options[this.selectedIndex].value; }\" ";
        $text .= $rs->form_select_open("navigator", $selectjs);
        $text .= $rs->form_option($cap, "0", "", "");
        $text .= $mains;
        $text .= $rs->form_select_close();
        $text .= "<br />";
开发者ID:Jimmi08,项目名称:links_page,代码行数:31,代码来源:link_menu.php

示例13: parse_parent

function parse_parent($parent)
{
    if (!check_class($parent['forum_postclass'])) {
        $status = '(' . LAN_FORUM_0056 . ')';
    }
    return vartrue($status);
}
开发者ID:rmuzzini,项目名称:e107,代码行数:7,代码来源:forum.php

示例14: intval

         }
         $qry = "\n\t\t\tSELECT t.thread_name, f.forum_name, f.forum_class from #forum_t AS t\n\t\t\tLEFT JOIN #forum AS f ON f.forum_id = t.thread_forum_id\n\t\t\tWHERE t.thread_id = " . intval($tmp[0]);
         $sql->db_Select_gen($qry);
         $forum = $sql->db_Fetch();
         $online_location_page = ONLINE_EL13 . " .:. " . $forum['forum_name'] . "->" . ONLINE_EL14 . " .:. " . $forum['thread_name'] . "->" . ONLINE_EL15 . ": " . $t_page;
         $online_location = str_replace("php.", "php?", $online_location);
         if (!check_class($forum['forum_class'])) {
             $class_check = FALSE;
             $online_location_page = ONLINE_EL13 . ": \"" . CLASSRESTRICTED . "\"";
         }
     } elseif (strstr($online_location, "_viewforum")) {
         $sql->db_Select("forum", "forum_name, forum_class", "forum_id=" . intval($tmp[0]));
         $forum = $sql->db_Fetch();
         $online_location_page = ONLINE_EL13 . " .:. " . $forum['forum_name'];
         $online_location = str_replace("php.", "php?", $online_location);
         if (!check_class($forum['forum_class'])) {
             $class_check = FALSE;
             $online_location_page = ONLINE_EL13 . ": \"" . CLASSRESTRICTED . "\"";
         }
     } elseif (strstr($online_location, "_post")) {
         $sql->db_Select("forum_t", "thread_name, thread_forum_id", "thread_forum_id=" . intval($tmp[0]) . " AND thread_parent=0");
         $forum_t = $sql->db_Fetch();
         $sql->db_Select("forum", "forum_name", "forum_id=" . $forum_t['thread_forum_id']);
         $forum = $sql->db_Fetch();
         $online_location_page = ONLINE_EL12 . ": " . ONLINE_EL13 . " .:. " . $forum['forum_name'] . "->" . ONLINE_EL14 . " .:. " . $forum_t['thread_name'];
         $online_location = e_PLUGIN . "forum/forum_viewtopic.php?{$tmp['0']}.{$tmp['1']}";
     }
 }
 if (strstr($online_location, "admin")) {
     $class_check = FALSE;
     $online_location_page = ADMINAREA;
开发者ID:notzen,项目名称:e107,代码行数:31,代码来源:online.php

示例15: r_emote

    if ($pref['cb_emote'] && $pref['smiley_activate']) {
        $texta .= "\n\t\t<input class='btn btn-default button' type='button' style='cursor:pointer' size='30' value='" . CHATBOX_L14 . "' onclick=\"expandit('emote')\" />\n\t\t<div class='well' style='display:none' id='emote'>" . r_emote() . "</div>\n";
    }
    $texta .= "</div>\n</form>\n";
}
if ($emessage != "") {
    $texta .= "<div style='text-align:center'><b>" . $emessage . "</b></div>";
}
if (!($text = $e107cache->retrieve("nq_chatbox"))) {
    global $pref, $tp;
    $pref['chatbox_posts'] = $pref['chatbox_posts'] ? $pref['chatbox_posts'] : 10;
    $chatbox_posts = $pref['chatbox_posts'];
    if (!isset($pref['cb_mod'])) {
        $pref['cb_mod'] = e_UC_ADMIN;
    }
    define("CB_MOD", check_class($pref['cb_mod']));
    $qry = "\n\tSELECT c.*, u.user_name, u.user_image FROM #chatbox AS c\n\tLEFT JOIN #user AS u ON SUBSTRING_INDEX(c.cb_nick,'.',1) = u.user_id\n\tORDER BY c.cb_datestamp DESC LIMIT 0, " . intval($chatbox_posts);
    global $CHATBOXSTYLE;
    if ($CHATBOXSTYLE) {
        $legacySrch = array('{USERNAME}', '{MESSAGE}', '{TIMEDATE}');
        $legacyRepl = array('{CB_USERNAME}', '{CB_MESSAGE}', '{CB_TIMEDATE}');
        $CHATBOX_TEMPLATE['start'] = "";
        $CHATBOX_TEMPLATE['item'] = str_replace($legacySrch, $legacyRepl, $CHATBOXSTYLE);
        $CHATBOX_TEMPLATE['end'] = "";
    } else {
        $tp->parseTemplate("{SETIMAGE: w=40}", true);
        // set thumbnail size.
        // FIXME - move to template
        $CHATBOX_TEMPLATE['start'] = "<ul class='media-list unstyled'>";
        $CHATBOX_TEMPLATE['item'] = "<li class='media'>\n\t\t\t\t\t\t\t\t\t\t<span class='media-object pull-left'>{CB_AVATAR}</span> \n\t\t\t\t\t\t\t\t\t\t<div class='media-body'><b>{CB_USERNAME}</b>&nbsp;\n\t\t\t\t\t\t\t\t\t\t<small class='muted smalltext'>{CB_TIMEDATE}</small><br />\n\t\t\t\t\t\t\t\t\t\t<p>{CB_MESSAGE}</p>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</li>\n";
        $CHATBOX_TEMPLATE['end'] = "</ul>";
开发者ID:gitye,项目名称:e107,代码行数:31,代码来源:chatbox_menu.php


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