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


PHP SEC_getTokenExpiryNotice函数代码示例

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


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

示例1: getRouteEditor

/**
 * Shows the URL routing editor
 * This will show a URL routing edit form.
 *
 * @param    int $rid ID of URL routing rule to edit
 * @return   string          HTML for URL routing editor
 */
function getRouteEditor($rid = 0)
{
    global $_CONF, $_TABLES, $LANG_ROUTER, $LANG_ADMIN, $MESSAGE, $securityToken;
    $retval = '';
    $A = array('rid' => $rid, 'method' => Router::HTTP_REQUEST_GET, 'rule' => '', 'route' => '', 'priority' => Router::DEFAULT_PRIORITY);
    $rid = intval($rid, 10);
    if ($rid > 0) {
        if (DB_count($_TABLES['routes'], 'rid', $rid) == 1) {
            $sql = "SELECT * FROM {$_TABLES['routes']} WHERE rid =" . DB_escapeString($rid);
            $result = DB_query($sql);
            $A = DB_fetchArray($result);
        } else {
            // Non-existent route
            $rid = 0;
            $A['rid'] = $rid;
        }
    }
    $T = COM_newTemplate($_CONF['path_layout'] . 'admin/router');
    $T->set_file('editor', 'routereditor.thtml');
    $routerStart = COM_startBlock($LANG_ROUTER[10], '', COM_getBlockTemplate('_admin_block', 'header')) . LB . SEC_getTokenExpiryNotice($securityToken);
    $T->set_var('start_router_editor', $routerStart);
    if ($rid > 0) {
        $deleteButton = '<input type="submit" value="' . $LANG_ADMIN['delete'] . '" name="mode"%s' . XHTML . '>';
        $jsConfirm = ' onclick="return confirm(\'' . $MESSAGE[76] . '\');"';
        $T->set_var(array('delete_option' => sprintf($deleteButton, $jsConfirm), 'delete_option_no_confirmation' => sprintf($deleteButton, ''), 'allow_delete' => true));
    }
    $T->set_var(array('rid' => $A['rid'], 'method' => $A['method'], 'rule' => $A['rule'], 'route' => $A['route'], 'priority' => $A['priority'], 'gltoken_name' => CSRF_TOKEN, 'gltoken' => $securityToken));
    $T->set_var(array('lang_router_rid' => $LANG_ROUTER[3], 'lang_router_method' => $LANG_ROUTER[4], 'lang_router_rule' => $LANG_ROUTER[5], 'lang_router_route' => $LANG_ROUTER[6], 'lang_router_priority' => $LANG_ROUTER[7], 'lang_router_notice' => $LANG_ROUTER[20], 'lang_save' => $LANG_ADMIN['save'], 'lang_cancel' => $LANG_ADMIN['cancel'], 'lang_delete' => $LANG_ADMIN['delete'], 'confirm_message' => $MESSAGE[76]));
    $T->set_var('end_block', COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer')));
    $T->parse('output', 'editor');
    $retval .= $T->finish($T->get_var('output'));
    return $retval;
}
开发者ID:mystralkk,项目名称:geeklog,代码行数:40,代码来源:router.php

示例2: fncDisply

function fncDisply($pi_name)
{
    global $_CONF;
    global $LANG_DATABOX_ADMIN;
    $tmplfld = DATABOX_templatePath('admin', 'default', $pi_name);
    $templates = new Template($tmplfld);
    $templates->set_file(array('list' => 'backuprestore.thtml'));
    $templates->set_var('about_thispage', $LANG_DATABOX_ADMIN['about_admin_backuprestore']);
    $templates->set_var('site_admin_url', $_CONF['site_admin_url']);
    $token = SEC_createToken();
    $retval .= SEC_getTokenExpiryNotice($token);
    $templates->set_var('gltoken_name', CSRF_TOKEN);
    $templates->set_var('gltoken', $token);
    $templates->set_var('xhtml', XHTML);
    $templates->set_var('script', THIS_SCRIPT);
    $templates->set_var('config', $LANG_DATABOX_ADMIN['config']);
    $templates->set_var('config_backup', $LANG_DATABOX_ADMIN['config_backup']);
    $templates->set_var('config_init', $LANG_DATABOX_ADMIN['config_init']);
    $templates->set_var('config_restore', $LANG_DATABOX_ADMIN['config_restore']);
    $templates->set_var('config_update', $LANG_DATABOX_ADMIN['config_update']);
    $templates->set_var('config_backup_help', $LANG_DATABOX_ADMIN['config_backup_help']);
    $templates->set_var('config_init_help', $LANG_DATABOX_ADMIN['config_init_help']);
    $templates->set_var('config_restore_help', $LANG_DATABOX_ADMIN['config_restore_help']);
    $templates->set_var('config_update_help', $LANG_DATABOX_ADMIN['config_update_help']);
    $templates->set_var('datamaster', $LANG_DATABOX_ADMIN['datamaster']);
    $templates->set_var('data_clear', $LANG_DATABOX_ADMIN['data_clear']);
    $templates->set_var('data_allclear', $LANG_DATABOX_ADMIN['data_allclear']);
    $templates->set_var('data_backup', $LANG_DATABOX_ADMIN['data_backup']);
    $templates->set_var('data_restore', $LANG_DATABOX_ADMIN['data_restore']);
    $err_backup_file = "";
    if (file_exists($_CONF["path_data"] . "databoxconfig_bak.php")) {
        $templates->set_var('restore_disable', "");
        if (is_writable($_CONF["path_data"] . "databoxconfig_bak.php")) {
        } else {
            $err_backup_file = $LANG_DATABOX_ADMIN['err_backup_file_non_writable'];
        }
    } else {
        $templates->set_var('restore_disabled', "disabled");
        $err_backup_file = $LANG_DATABOX_ADMIN['err_backup_file_not_exist'];
    }
    $templates->set_var('err_backup_file', $err_backup_file);
    $templates->parse('output', 'list');
    $content = $templates->finish($templates->get_var('output'));
    $retval .= $content;
    return $retval;
}
开发者ID:mistgrass,项目名称:geeklog-ivywe,代码行数:46,代码来源:backuprestore.php

示例3: LIB_Edit

function LIB_Edit($pi_name, $id, $edt_flg, $msg = '', $errmsg = "", $mode = "edit")
{
    global $_CONF;
    global $_TABLES;
    global $LANG_ADMIN;
    global $MESSAGE;
    global $LANG_ACCESS;
    global $_USER;
    $lang_box_admin = "LANG_" . strtoupper($pi_name) . "_ADMIN";
    global ${$lang_box_admin};
    $lang_box_admin = ${$lang_box_admin};
    $lang_box = "LANG_" . strtoupper($pi_name);
    global ${$lang_box};
    $lang_box = ${$lang_box};
    $table = $_TABLES[strtoupper($pi_name) . '_mst'];
    $table2 = $_TABLES[strtoupper($pi_name) . '_def_field'];
    $retval = '';
    $delflg = false;
    if (!empty($msg)) {
        $retval .= COM_showMessage($msg, $pi_name);
        $retval .= $errmsg;
        // clean 'em up
        $kind = COM_applyFilter($_POST['kind']);
        $no = COM_applyFilter($_POST['no'], true);
        $value = COM_applyFilter($_POST['value']);
        $value2 = COM_applyFilter($_POST['value2']);
        $disp = COM_applyFilter($_POST['disp']);
        $orderno = COM_applyFilter($_POST['orderno'], true);
        $relno = COM_applyFilter($_POST['relno'], true);
        $uuid = $_USER['uid'];
    } else {
        if (empty($id)) {
            $id = 0;
            $kind = "";
            $no = "";
            $value = "";
            $value2 = "";
            $disp = "";
            $orderno = "";
            $relno = "";
            $uuid = 0;
            $udatetime = "";
            //"";
        } else {
            $sql = "SELECT ";
            $sql .= " *";
            $sql .= " ,UNIX_TIMESTAMP(udatetime) AS udatetime_un" . LB;
            $sql .= " FROM ";
            $sql .= $table;
            $sql .= " WHERE ";
            $sql .= " id = {$id}";
            $result = DB_query($sql);
            $A = DB_fetchArray($result);
            $kind = COM_stripslashes($A['kind']);
            $no = COM_stripslashes($A['no']);
            $value = COM_stripslashes($A['value']);
            $value2 = COM_stripslashes($A['value2']);
            $disp = COM_stripslashes($A['disp']);
            $orderno = COM_stripslashes($A['orderno']);
            $relno = COM_stripslashes($A['relno']);
            $uuid = COM_stripslashes($A['uuid']);
            $wary = COM_getUserDateTimeFormat(COM_stripslashes($A['udatetime_un']));
            $udatetime = $wary[0];
            // データがあれば削除させない
            if ($edt_flg == FALSE) {
                $delflg = true;
            }
        }
    }
    if ($mode === "copy") {
        $id = 0;
        //作成日付
        $created = 0;
        $created_month = 0;
        $created_day = 0;
        $created_year = 0;
        $created_hour = 0;
        $created_minute = 0;
        //
        $delflg = false;
    }
    $tmplfld = DATABOX_templatePath('admin', 'default', $pi_name);
    $templates = new Template($tmplfld);
    $templates->set_file('editor', "mst_editor.thtml");
    //--
    $templates->set_var('about_thispage', $lang_box_admin['about_admin_mst']);
    $templates->set_var('lang_must', $lang_box_admin['must']);
    $templates->set_var('site_url', $_CONF['site_url']);
    $templates->set_var('site_admin_url', $_CONF['site_admin_url']);
    //--
    $token = SEC_createToken();
    $retval .= SEC_getTokenExpiryNotice($token);
    $templates->set_var('gltoken_name', CSRF_TOKEN);
    $templates->set_var('gltoken', $token);
    $templates->set_var('xhtml', XHTML);
    $templates->set_var('script', THIS_SCRIPT);
    //
    $templates->set_var('lang_link_admin', $lang_box_admin['link_admin']);
    $templates->set_var('lang_link_admin_top', $lang_box_admin['link_admin_top']);
    //id
//.........这里部分代码省略.........
开发者ID:mistgrass,项目名称:geeklog-ivywe,代码行数:101,代码来源:lib_mst.php

示例4: edittopic

/**
 * Show topic administration form
 *
 * @param    string  tid     ID of topic to edit
 * @return   string          HTML for the topic editor
 */
function edittopic($tid = '')
{
    global $_CONF, $_GROUPS, $_TABLES, $_USER, $LANG04, $LANG27, $LANG_ACCESS, $LANG_ADMIN, $MESSAGE, $_SCRIPTS;
    $retval = '';
    if (empty($tid)) {
        // new topic - set defaults
        $A = array('tid' => '', 'topic' => '', 'sortnum' => 0, 'parent_id' => TOPIC_ROOT, 'inherit' => 1, 'hidden' => 0, 'limitnews' => '', 'is_default' => 0, 'archive_flag' => 0);
    } else {
        $result = DB_query("SELECT * FROM {$_TABLES['topics']} WHERE tid ='{$tid}'");
        $A = DB_fetchArray($result);
        $access = SEC_hasAccess($A['owner_id'], $A['group_id'], $A['perm_owner'], $A['perm_group'], $A['perm_members'], $A['perm_anon']);
        if ($access == 0 || $access == 2) {
            $retval .= COM_showMessageText($LANG27[13], $LANG27[12]);
            COM_accessLog("User {$_USER['username']} tried to illegally create or edit topic {$tid}.");
            return $retval;
        }
    }
    $token = SEC_createToken();
    $retval .= COM_startBlock($LANG27[1], '', COM_getBlockTemplate('_admin_block', 'header'));
    $retval .= SEC_getTokenExpiryNotice($token);
    if (!is_array($A) || empty($A['owner_id'])) {
        $A['owner_id'] = $_USER['uid'];
        // this is the one instance where we default the group
        // most topics should belong to the Topic Admin group
        if (isset($_GROUPS['Topic Admin'])) {
            $A['group_id'] = $_GROUPS['Topic Admin'];
        } else {
            $A['group_id'] = SEC_getFeatureGroup('topic.edit');
        }
        SEC_setDefaultPermissions($A, $_CONF['default_permissions_topic']);
        $access = 3;
    }
    $topic_templates = COM_newTemplate($_CONF['path_layout'] . 'admin/topic');
    $topic_templates->set_file('editor', 'topiceditor.thtml');
    if (!empty($tid) && SEC_hasRights('topic.edit')) {
        $delButton = '<input type="submit" value="' . $LANG_ADMIN['delete'] . '" name="mode"%s' . XHTML . '>';
        $jsConfirm = ' onclick="return confirm(\'' . $MESSAGE[76] . '\');"';
        $topic_templates->set_var('delete_option', sprintf($delButton, $jsConfirm));
        $topic_templates->set_var('delete_option_no_confirmation', sprintf($delButton, ''));
        $topic_templates->set_var('allow_delete', true);
        $topic_templates->set_var('lang_delete', $LANG_ADMIN['delete']);
        $topic_templates->set_var('confirm_message', $MESSAGE[76]);
        $topic_templates->set_var('warning_msg', $LANG27[6]);
    }
    if ($_CONF['titletoid'] && empty($tid)) {
        $_SCRIPTS->setJavaScriptFile('title_2_id', '/javascript/title_2_id.js');
        $topic_templates->set_var('titletoid', true);
    }
    $topic_templates->set_var('lang_topicid', $LANG27[2]);
    $topic_templates->set_var('topic_id', $A['tid']);
    $topic_templates->set_var('lang_parent_id', $LANG27[32]);
    $topic_templates->set_var('parent_id_options', TOPIC_getTopicListSelect($A['parent_id'], 1, false, $A['tid'], true));
    $topic_templates->set_var('lang_inherit', $LANG27[33]);
    $topic_templates->set_var('lang_inherit_info', $LANG27[34]);
    if ($A['inherit'] == 1) {
        $topic_templates->set_var('inherit_checked', 'checked="checked"');
    } else {
        $topic_templates->set_var('inherit_checked', '');
    }
    $topic_templates->set_var('lang_hidden', $LANG27[35]);
    $topic_templates->set_var('lang_hidden_info', $LANG27[36]);
    if ($A['hidden'] == 1) {
        $topic_templates->set_var('hidden_checked', 'checked="checked"');
    } else {
        $topic_templates->set_var('hidden_checked', '');
    }
    $topic_templates->set_var('lang_donotusespaces', $LANG27[5]);
    $topic_templates->set_var('lang_accessrights', $LANG_ACCESS['accessrights']);
    $topic_templates->set_var('lang_owner', $LANG_ACCESS['owner']);
    $ownername = COM_getDisplayName($A['owner_id']);
    $topic_templates->set_var('owner_username', DB_getItem($_TABLES['users'], 'username', "uid = {$A['owner_id']}"));
    $topic_templates->set_var('owner_name', $ownername);
    $topic_templates->set_var('owner', $ownername);
    $topic_templates->set_var('owner_id', $A['owner_id']);
    $topic_templates->set_var('lang_group', $LANG_ACCESS['group']);
    $topic_templates->set_var('lang_save', $LANG_ADMIN['save']);
    $topic_templates->set_var('lang_cancel', $LANG_ADMIN['cancel']);
    $topic_templates->set_var('group_dropdown', SEC_getGroupDropdown($A['group_id'], $access));
    $topic_templates->set_var('lang_permissions', $LANG_ACCESS['permissions']);
    $topic_templates->set_var('lang_permissions_key', $LANG_ACCESS['permissionskey']);
    $topic_templates->set_var('lang_perm_key', $LANG_ACCESS['permissionskey']);
    $topic_templates->set_var('permissions_msg', $LANG_ACCESS['permmsg']);
    $topic_templates->set_var('lang_permissions_msg', $LANG_ACCESS['permmsg']);
    $topic_templates->set_var('permissions_editor', SEC_getPermissionsHTML($A['perm_owner'], $A['perm_group'], $A['perm_members'], $A['perm_anon']));
    // show sort order only if they specified sortnum as the sort method
    if ($_CONF['sortmethod'] !== 'alpha') {
        $topic_templates->set_var('lang_sortorder', $LANG27[10]);
        if ($A['sortnum'] == 0) {
            $A['sortnum'] = '';
        }
        $topic_templates->set_var('sort_order', '<input type="text" size="5" maxlength="5" name="sortnum" value="' . $A['sortnum'] . '"' . XHTML . '>');
    } else {
        $topic_templates->set_var('lang_sortorder', $LANG27[14]);
        $topic_templates->set_var('sort_order', $LANG27[15] . '<input type="hidden" name="sortnum" value="' . $A['sortnum'] . '"' . XHTML . '>');
//.........这里部分代码省略.........
开发者ID:mystralkk,项目名称:geeklog,代码行数:101,代码来源:topic.php

示例5: storyeditor


//.........这里部分代码省略.........
        }
    }
    if ($_CONF['wikitext_editor']) {
        $postmode_list .= ',wikitext';
        if ($story->EditElements('postmode') == 'wikitext') {
            $post_options .= '<option value="wikitext" selected="selected">' . $LANG24[88] . '</option>';
        } else {
            $post_options .= '<option value="wikitext">' . $LANG24[88] . '</option>';
        }
    }
    $story_templates->set_var('post_options', $post_options);
    $postmode_array = explode(',', $postmode_list);
    $allowed_html = '';
    foreach ($postmode_array as $pm) {
        $allowed_html .= COM_allowedHTML('story.edit', false, 1, $pm);
    }
    $allowed_tags = array('code', 'raw');
    if ($_CONF['allow_page_breaks'] == 1) {
        $allowed_tags = array_merge($allowed_tags, array('page_break'));
    }
    $allowed_html .= COM_allowedAutotags(false, $allowed_tags);
    $story_templates->set_var('lang_allowed_html', $allowed_html);
    $fileinputs = '';
    $saved_images = '';
    if ($_CONF['maximagesperarticle'] > 0) {
        $story_templates->set_var('lang_images', $LANG24[47]);
        $icount = DB_count($_TABLES['article_images'], 'ai_sid', $story->getSid());
        if ($icount > 0) {
            $result_articles = DB_query("SELECT * FROM {$_TABLES['article_images']} WHERE ai_sid = '" . $story->getSid() . "'");
            for ($z = 1; $z <= $icount; $z++) {
                $I = DB_fetchArray($result_articles);
                $saved_images .= $z . ') ' . COM_createLink($I['ai_filename'], $_CONF['site_url'] . '/images/articles/' . $I['ai_filename']) . '&nbsp;&nbsp;&nbsp;' . $LANG_ADMIN['delete'] . ': <input type="checkbox" name="delete[' . $I['ai_img_num'] . ']"' . XHTML . '><br' . XHTML . '>';
            }
        }
        $newallowed = $_CONF['maximagesperarticle'] - $icount;
        for ($z = $icount + 1; $z <= $_CONF['maximagesperarticle']; $z++) {
            $fileinputs .= $z . ') <input type="file" dir="ltr" name="file' . $z . '"' . XHTML . '>';
            if ($z < $_CONF['maximagesperarticle']) {
                $fileinputs .= '<br' . XHTML . '>';
            }
        }
        $fileinputs .= '<br' . XHTML . '>' . $LANG24[51];
        if ($_CONF['allow_user_scaling'] == 1) {
            $fileinputs .= $LANG24[27];
        }
        $fileinputs .= $LANG24[28] . '<br' . XHTML . '>';
    }
    // Add JavaScript
    $_SCRIPTS->setJavaScriptFile('story_editor', '/javascript/story_editor.js');
    if ($_CONF['titletoid']) {
        $_SCRIPTS->setJavaScriptFile('title_2_id', '/javascript/title_2_id.js');
        $story_templates->set_var('titletoid', true);
    }
    $_SCRIPTS->setJavaScriptFile('postmode_control', '/javascript/postmode_control.js');
    // Loads jQuery UI datepicker and timepicker-addon
    $_SCRIPTS->setJavaScriptLibrary('jquery.ui.slider');
    //    $_SCRIPTS->setJavaScriptLibrary('jquery.ui.button');
    $_SCRIPTS->setJavaScriptLibrary('jquery.ui.datepicker');
    $_SCRIPTS->setJavaScriptLibrary('jquery-ui-i18n');
    $_SCRIPTS->setJavaScriptLibrary('jquery-ui-timepicker-addon');
    $_SCRIPTS->setJavaScriptLibrary('jquery-ui-timepicker-addon-i18n');
    //    $_SCRIPTS->setJavaScriptLibrary('jquery-ui-slideraccess');
    $_SCRIPTS->setJavaScriptFile('datetimepicker', '/javascript/datetimepicker.js');
    $langCode = COM_getLangIso639Code();
    $toolTip = $MESSAGE[118];
    $imgUrl = $_CONF['site_url'] . '/images/calendar.png';
    $_SCRIPTS->setJavaScript("jQuery(function () {" . "  geeklog.hour_mode = {$_CONF['hour_mode']};" . "  geeklog.datetimepicker.set('publish', '{$langCode}', '{$toolTip}', '{$imgUrl}');" . "  geeklog.datetimepicker.set('expire', '{$langCode}', '{$toolTip}', '{$imgUrl}');" . "  geeklog.datetimepicker.set('cmt_close', '{$langCode}', '{$toolTip}', '{$imgUrl}');" . "});", TRUE, TRUE);
    // Setup Advanced Editor
    COM_setupAdvancedEditor('/javascript/storyeditor_adveditor.js');
    $story_templates->set_var('saved_images', $saved_images);
    $story_templates->set_var('image_form_elements', $fileinputs);
    $story_templates->set_var('lang_hits', $LANG24[18]);
    $story_templates->set_var('story_hits', $story->EditElements('hits'));
    $story_templates->set_var('lang_comments', $LANG24[19]);
    $story_templates->set_var('story_comments', $story->EditElements('comments'));
    $story_templates->set_var('lang_trackbacks', $LANG24[29]);
    $story_templates->set_var('story_trackbacks', $story->EditElements('trackbacks'));
    $story_templates->set_var('lang_emails', $LANG24[39]);
    $story_templates->set_var('story_emails', $story->EditElements('numemails'));
    if ($mode == 'clone') {
        $story_templates->set_var('story_id', COM_makesid());
    } else {
        $story_templates->set_var('story_id', $story->getSid());
        $story_templates->set_var('old_story_id', $story->EditElements('originalSid'));
    }
    $story_templates->set_var('lang_sid', $LANG24[12]);
    $story_templates->set_var('lang_save', $LANG_ADMIN['save']);
    $story_templates->set_var('lang_preview', $LANG_ADMIN['preview']);
    $story_templates->set_var('lang_cancel', $LANG_ADMIN['cancel']);
    $story_templates->set_var('lang_delete', $LANG_ADMIN['delete']);
    $story_templates->set_var('gltoken_name', CSRF_TOKEN);
    $token = SEC_createToken();
    $story_templates->set_var('gltoken', $token);
    $story_templates->parse('output', 'editor');
    $display .= COM_startBlock($LANG24[5], '', COM_getBlockTemplate('_admin_block', 'header'));
    $display .= SEC_getTokenExpiryNotice($token, $LANG24[91]);
    $display .= $story_templates->finish($story_templates->get_var('output'));
    $display .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));
    return $display;
}
开发者ID:geeklog-cms,项目名称:geeklog,代码行数:101,代码来源:story.php

示例6: edittopic

/**
* Show topic administration form
*
* @param    string  tid     ID of topic to edit
* @return   string          HTML for the topic editor
*
*/
function edittopic($tid = '')
{
    global $_CONF, $_GROUPS, $_TABLES, $_USER, $LANG27, $LANG_ACCESS, $LANG_ADMIN, $MESSAGE;
    $retval = '';
    if (empty($tid)) {
        // new topic - set defaults
        $A = array();
        $A['tid'] = '';
        $A['topic'] = '';
        $A['sortnum'] = 0;
        $A['limitnews'] = '';
        // leave empty!
        $A['is_default'] = 0;
        $A['archive_flag'] = 0;
    } else {
        $result = DB_query("SELECT * FROM {$_TABLES['topics']} WHERE tid ='{$tid}'");
        $A = DB_fetchArray($result);
        $access = SEC_hasAccess($A['owner_id'], $A['group_id'], $A['perm_owner'], $A['perm_group'], $A['perm_members'], $A['perm_anon']);
        if ($access == 0 or $access == 2) {
            $retval .= COM_startBlock($LANG27[12], '', COM_getBlockTemplate('_msg_block', 'header'));
            $retval .= $LANG27[13];
            $retval .= COM_endBlock(COM_getBlockTemplate('_msg_block', 'footer'));
            COM_accessLog("User {$_USER['username']} tried to illegally create or edit topic {$tid}.");
            return $retval;
        }
    }
    $token = SEC_createToken();
    $retval .= COM_startBlock($LANG27[1], '', COM_getBlockTemplate('_admin_block', 'header'));
    $retval .= SEC_getTokenExpiryNotice($token);
    if (!is_array($A) || empty($A['owner_id'])) {
        $A['owner_id'] = $_USER['uid'];
        // this is the one instance where we default the group
        // most topics should belong to the Topic Admin group
        if (isset($_GROUPS['Topic Admin'])) {
            $A['group_id'] = $_GROUPS['Topic Admin'];
        } else {
            $A['group_id'] = SEC_getFeatureGroup('topic.edit');
        }
        SEC_setDefaultPermissions($A, $_CONF['default_permissions_topic']);
        $access = 3;
    }
    $topic_templates = new Template($_CONF['path_layout'] . 'admin/topic');
    $topic_templates->set_file('editor', 'topiceditor.thtml');
    $topic_templates->set_var('xhtml', XHTML);
    $topic_templates->set_var('site_url', $_CONF['site_url']);
    $topic_templates->set_var('site_admin_url', $_CONF['site_admin_url']);
    $topic_templates->set_var('layout_url', $_CONF['layout_url']);
    if (!empty($tid) && SEC_hasRights('topic.edit')) {
        $delbutton = '<input type="submit" value="' . $LANG_ADMIN['delete'] . '" name="mode"%s' . XHTML . '>';
        $jsconfirm = ' onclick="return confirm(\'' . $MESSAGE[76] . '\');"';
        $topic_templates->set_var('delete_option', sprintf($delbutton, $jsconfirm));
        $topic_templates->set_var('delete_option_no_confirmation', sprintf($delbutton, ''));
        $topic_templates->set_var('warning_msg', $LANG27[6]);
    }
    $topic_templates->set_var('lang_topicid', $LANG27[2]);
    $topic_templates->set_var('topic_id', $A['tid']);
    $topic_templates->set_var('lang_donotusespaces', $LANG27[5]);
    $topic_templates->set_var('lang_accessrights', $LANG_ACCESS['accessrights']);
    $topic_templates->set_var('lang_owner', $LANG_ACCESS['owner']);
    $ownername = COM_getDisplayName($A['owner_id']);
    $topic_templates->set_var('owner_username', DB_getItem($_TABLES['users'], 'username', "uid = {$A['owner_id']}"));
    $topic_templates->set_var('owner_name', $ownername);
    $topic_templates->set_var('owner', $ownername);
    $topic_templates->set_var('owner_id', $A['owner_id']);
    $topic_templates->set_var('lang_group', $LANG_ACCESS['group']);
    $topic_templates->set_var('lang_save', $LANG_ADMIN['save']);
    $topic_templates->set_var('lang_cancel', $LANG_ADMIN['cancel']);
    $topic_templates->set_var('group_dropdown', SEC_getGroupDropdown($A['group_id'], $access));
    $topic_templates->set_var('lang_permissions', $LANG_ACCESS['permissions']);
    $topic_templates->set_var('lang_permissions_key', $LANG_ACCESS['permissionskey']);
    $topic_templates->set_var('lang_perm_key', $LANG_ACCESS['permissionskey']);
    $topic_templates->set_var('permissions_msg', $LANG_ACCESS['permmsg']);
    $topic_templates->set_var('lang_permissions_msg', $LANG_ACCESS['permmsg']);
    $topic_templates->set_var('permissions_editor', SEC_getPermissionsHTML($A['perm_owner'], $A['perm_group'], $A['perm_members'], $A['perm_anon']));
    // show sort order only if they specified sortnum as the sort method
    if ($_CONF['sortmethod'] != 'alpha') {
        $topic_templates->set_var('lang_sortorder', $LANG27[10]);
        if ($A['sortnum'] == 0) {
            $A['sortnum'] = '';
        }
        $topic_templates->set_var('sort_order', '<input type="text" size="3" maxlength="3" name="sortnum" value="' . $A['sortnum'] . '"' . XHTML . '>');
    } else {
        $topic_templates->set_var('lang_sortorder', $LANG27[14]);
        $topic_templates->set_var('sort_order', $LANG27[15]);
    }
    $topic_templates->set_var('lang_storiesperpage', $LANG27[11]);
    if ($A['limitnews'] == 0) {
        $topic_templates->set_var('story_limit', '');
    } else {
        $topic_templates->set_var('story_limit', $A['limitnews']);
    }
    $topic_templates->set_var('default_limit', $_CONF['limitnews']);
    $topic_templates->set_var('lang_defaultis', $LANG27[16]);
//.........这里部分代码省略.........
开发者ID:hostellerie,项目名称:nexpro,代码行数:101,代码来源:topic.php

示例7: staticpageeditor_form


//.........这里部分代码省略.........
    $sp_template->set_var('owner', $owner_name);
    $sp_template->set_var('owner_name', $owner_name);
    $sp_template->set_var('owner_username', $owner_username);
    if ($A['owner_id'] > 1) {
        $profile_link = $_CONF['site_url'] . '/users.php?mode=profile&amp;uid=' . $A['owner_id'];
        $sp_template->set_var('start_owner_anchortag', '<a href="' . $profile_link . '">');
        $sp_template->set_var('end_owner_anchortag', '</a>');
        $sp_template->set_var('owner_link', COM_createLink($owner_name, $profile_link));
        $photo = '';
        if ($_CONF['allow_user_photo']) {
            $photo = DB_getItem($_TABLES['users'], 'photo', "uid = {$A['owner_id']}");
            if (!empty($photo)) {
                $camera_icon = '<img src="' . $_CONF['layout_url'] . '/images/smallcamera.' . $_IMAGE_TYPE . '" alt=""' . XHTML . '>';
                $sp_template->set_var('camera_icon', COM_createLink($camera_icon, $profile_link));
            }
        }
        if (empty($photo)) {
            $sp_template->set_var('camera_icon', '');
        }
    } else {
        $sp_template->set_var('start_owner_anchortag', '');
        $sp_template->set_var('end_owner_anchortag', '');
        $sp_template->set_var('owner_link', $owner_name);
    }
    $sp_template->set_var('lang_group', $LANG_ACCESS['group']);
    $sp_template->set_var('group_dropdown', SEC_getGroupDropdown($A['group_id'], $access));
    $sp_template->set_var('permissions_editor', SEC_getPermissionsHTML($A['perm_owner'], $A['perm_group'], $A['perm_members'], $A['perm_anon']));
    $sp_template->set_var('lang_permissions', $LANG_ACCESS['permissions']);
    $sp_template->set_var('lang_perm_key', $LANG_ACCESS['permissionskey']);
    $sp_template->set_var('permissions_msg', $LANG_ACCESS['permmsg']);
    $sp_template->set_var('lang_permissions_msg', $LANG_ACCESS['permmsg']);
    $token = SEC_createToken();
    $start_block = COM_startBlock($LANG_STATIC['staticpageeditor'], '', COM_getBlockTemplate('_admin_block', 'header'));
    $start_block .= SEC_getTokenExpiryNotice($token);
    $sp_template->set_var('start_block_editor', $start_block);
    $sp_template->set_var('lang_save', $LANG_ADMIN['save']);
    $sp_template->set_var('lang_cancel', $LANG_ADMIN['cancel']);
    $sp_template->set_var('lang_preview', $LANG_ADMIN['preview']);
    if (SEC_hasRights('staticpages.delete') && $mode != 'clone' && !empty($A['sp_old_id'])) {
        $delbutton = '<input type="submit" value="' . $LANG_ADMIN['delete'] . '" name="mode"%s' . XHTML . '>';
        $jsconfirm = ' onclick="return confirm(\'' . $MESSAGE[76] . '\');"';
        $sp_template->set_var('delete_option', sprintf($delbutton, $jsconfirm));
        $sp_template->set_var('delete_option_no_confirmation', sprintf($delbutton, ''));
    } else {
        $sp_template->set_var('delete_option', '');
    }
    $sp_template->set_var('lang_writtenby', $LANG_STATIC['writtenby']);
    $sp_template->set_var('username', DB_getItem($_TABLES['users'], 'username', "uid = {$A['owner_id']}"));
    $authorname = COM_getDisplayName($A['owner_id']);
    $sp_template->set_var('name', $authorname);
    $sp_template->set_var('author', $authorname);
    $sp_template->set_var('lang_url', $LANG_STATIC['url']);
    $sp_template->set_var('lang_id', $LANG_STATIC['id']);
    $sp_template->set_var('sp_uid', $A['owner_id']);
    $sp_template->set_var('sp_id', $A['sp_id']);
    $sp_template->set_var('sp_old_id', $A['sp_old_id']);
    $sp_template->set_var('example_url', COM_buildURL($_CONF['site_url'] . '/staticpages/index.php?page=' . $A['sp_id']));
    $sp_template->set_var('lang_centerblock', $LANG_STATIC['centerblock']);
    $sp_template->set_var('lang_centerblock_help', $LANG_ADMIN['help_url']);
    $sp_template->set_var('lang_centerblock_include', $LANG21[51]);
    $sp_template->set_var('lang_centerblock_desc', $LANG21[52]);
    $sp_template->set_var('centerblock_help', $A['sp_help']);
    $sp_template->set_var('lang_centerblock_msg', $LANG_STATIC['centerblock_msg']);
    if (isset($A['sp_centerblock']) && $A['sp_centerblock'] == 1) {
        $sp_template->set_var('centerblock_checked', 'checked="checked"');
    } else {
开发者ID:milk54,项目名称:geeklog-japan,代码行数:67,代码来源:index.php

示例8: editgroup

/**
* Shows the group editor form
*
* @param    string      $grp_id     ID of group to edit
* @return   string      HTML for group editor
*
*/
function editgroup($grp_id = '')
{
    global $_TABLES, $_CONF, $_USER, $LANG_ACCESS, $LANG_ADMIN, $MESSAGE, $LANG28, $_GROUP_VERBOSE;
    require_once $_CONF['path_system'] . 'lib-admin.php';
    $retval = '';
    $thisUsersGroups = SEC_getUserGroups();
    if (!empty($grp_id) && $grp_id > 0 && !in_array($grp_id, $thisUsersGroups) && !SEC_groupIsRemoteUserAndHaveAccess($grp_id, $thisUsersGroups)) {
        if (!SEC_inGroup('Root') && DB_getItem($_TABLES['groups'], 'grp_name', "grp_id = {$grp_id}") == 'Root') {
            $retval .= COM_showMessageText($LANG_ACCESS['canteditroot'], $LANG_ACCESS['groupeditor']);
            COM_accessLog("User {$_USER['username']} tried to edit the Root group with insufficient privileges.");
        } else {
            $retval .= COM_showMessageText($LANG_ACCESS['canteditgroup'], $LANG_ACCESS['groupeditor']);
        }
        return $retval;
    }
    $group_templates = COM_newTemplate($_CONF['path_layout'] . 'admin/group');
    $group_templates->set_file('editor', 'groupeditor.thtml');
    $group_templates->set_var('lang_save', $LANG_ADMIN['save']);
    $group_templates->set_var('lang_cancel', $LANG_ADMIN['cancel']);
    $group_templates->set_var('lang_admingroup', $LANG28[49]);
    $group_templates->set_var('lang_admingrp_msg', $LANG28[50]);
    $group_templates->set_var('lang_defaultgroup', $LANG28[88]);
    $group_templates->set_var('lang_defaultgrp_msg', $LANG28[89]);
    $group_templates->set_var('lang_applydefault_msg', $LANG28[90]);
    $group_templates->set_var('lang_groupname', $LANG_ACCESS['groupname']);
    $group_templates->set_var('lang_description', $LANG_ACCESS['description']);
    $group_templates->set_var('lang_securitygroups', $LANG_ACCESS['securitygroups']);
    $group_templates->set_var('lang_rights', $LANG_ACCESS['rights']);
    $showall = 0;
    if (isset($_REQUEST['chk_showall']) && $_REQUEST['chk_showall'] == 1) {
        $showall = 1;
    }
    $group_templates->set_var('show_all', $showall);
    if (!empty($grp_id)) {
        $result = DB_query("SELECT grp_id,grp_name,grp_descr,grp_gl_core,grp_default FROM {$_TABLES['groups']} WHERE grp_id ='{$grp_id}'");
        $A = DB_fetchArray($result);
        if ($A['grp_gl_core'] > 0) {
            $group_templates->set_var('chk_adminuse', 'checked="checked"');
        }
        if ($A['grp_default'] != 0) {
            $group_templates->set_var('chk_defaultuse', 'checked="checked"');
        }
    } else {
        // new group, so it's obviously not a core group
        $A['grp_gl_core'] = 0;
        $A['grp_default'] = 0;
    }
    $token = SEC_createToken();
    $retval .= COM_startBlock($LANG_ACCESS['groupeditor'], '', COM_getBlockTemplate('_admin_block', 'header'));
    $retval .= SEC_getTokenExpiryNotice($token);
    if (!empty($grp_id)) {
        // Groups tied to Geeklog's functionality shouldn't be deleted
        if ($A['grp_gl_core'] != 1) {
            $delbutton = '<input type="submit" value="' . $LANG_ADMIN['delete'] . '" name="mode"%s' . XHTML . '>';
            $jsconfirm = ' onclick="return confirm(\'' . $MESSAGE[76] . '\');"';
            $group_templates->set_var('delete_option', sprintf($delbutton, $jsconfirm));
            $group_templates->set_var('delete_option_no_confirmation', sprintf($delbutton, ''));
            $group_templates->set_var('group_core', 0);
        } else {
            $group_templates->set_var('group_core', 1);
        }
        $group_templates->set_var('group_id', $A['grp_id']);
    } else {
        $group_templates->set_var('group_core', 0);
    }
    if ($A['grp_gl_core'] != 1) {
        $group_templates->set_var('groupname_inputtype', 'text');
        $group_templates->set_var('groupname_static', '');
    } else {
        $group_templates->set_var('groupname_inputtype', 'hidden');
        $group_templates->set_var('groupname_static', $A['grp_name']);
    }
    if (isset($A['grp_name'])) {
        $group_templates->set_var('group_name', $A['grp_name']);
        switch ($A['grp_name']) {
            case 'All Users':
            case 'Logged-in Users':
            case 'Remote Users':
                $group_templates->set_var('hide_defaultoption', ' style="display:none;"');
                break;
            default:
                $group_templates->set_var('hide_defaultoption', '');
                break;
        }
    } else {
        $group_templates->set_var('group_name', '');
    }
    if (isset($A['grp_descr'])) {
        $group_templates->set_var('group_description', $A['grp_descr']);
    } else {
        $group_templates->set_var('group_description', '');
    }
    $selected = '';
//.........这里部分代码省略.........
开发者ID:milk54,项目名称:geeklog-japan,代码行数:101,代码来源:group.php

示例9: fncNew

function fncNew($template)
{
    global $_CONF;
    global $LANG_DATABOX_ADMIN;
    global $LANG_ADMIN;
    $pi_name = "databox";
    $retval = '';
    //-----
    $tmplfld = DATABOX_templatePath('mydata', $template, $pi_name);
    $templates = new Template($tmplfld);
    $templates->set_file('editor', "selectset.thtml");
    $templates->set_var('site_url', $_CONF['site_url']);
    $templates->set_var('site_admin_url', $_CONF['site_admin_url']);
    $token = SEC_createToken();
    $retval .= SEC_getTokenExpiryNotice($token);
    $templates->set_var('gltoken_name', CSRF_TOKEN);
    $templates->set_var('gltoken', $token);
    $templates->set_var('xhtml', XHTML);
    $script = THIS_SCRIPT;
    if ($template != "") {
        $script .= "?template=" . $template;
    }
    $templates->set_var('script', $script);
    //fieldset_id
    $fieldset_id = 0;
    $templates->set_var('lang_fieldset', $LANG_DATABOX_ADMIN['fieldset']);
    $list_fieldset = DATABOX_getoptionlist("fieldset", $fieldset_id, 0, $pi_name, "", 0);
    $templates->set_var('list_fieldset', $list_fieldset);
    $templates->set_var('lang_inst_newdata', $LANG_DATABOX_ADMIN['inst_newdata']);
    $templates->set_var('lang_new', $LANG_DATABOX_ADMIN['new']);
    $templates->set_var('lang_cancel', $LANG_ADMIN['cancel']);
    $templates->parse('output', 'editor');
    $retval .= $templates->finish($templates->get_var('output'));
    return $retval;
}
开发者ID:mistgrass,项目名称:geeklog-ivywe,代码行数:35,代码来源:data.php

示例10: fncEdit


//.........这里部分代码省略.........
            $template = $defaulttemplatesdirectory;
        } elseif ($set_defaulttemplatesdirectory != "") {
            $template = $set_defaulttemplatesdirectory;
        } else {
            $template = "default";
        }
    }
    $tmplfld = DATABOX_templatePath('myprofile', 'default', $pi_name);
    $templates = new Template($tmplfld);
    $templates->set_file(array('editor' => 'profile_editor.thtml', 'row' => 'row.thtml', 'col' => "profile_col_detail.thtml"));
    // Loads jQuery UI datepicker geeklog >=2.1.0
    $_SCRIPTS->setJavaScriptLibrary('jquery.ui.datepicker');
    $_SCRIPTS->setJavaScriptLibrary('jquery-ui-i18n');
    $_SCRIPTS->setJavaScriptLibrary('jquery-ui-timepicker-addon');
    $_SCRIPTS->setJavaScriptLibrary('jquery-ui-timepicker-addon-i18n');
    $_SCRIPTS->setJavaScriptFile('datepicker', '/javascript/datepicker.js');
    $_SCRIPTS->setJavaScriptFile('datetimepicker', '/javascript/datetimepicker.js');
    $langCode = COM_getLangIso639Code();
    $toolTip = $MESSAGE[118];
    $imgUrl = $_CONF['site_url'] . '/images/calendar.png';
    //--
    if ($_CONF['meta_tags'] > 0 && $_USERBOX_CONF['meta_tags'] > 0) {
        $templates->set_var('hide_meta', '');
    } else {
        $templates->set_var('hide_meta', ' style="display:none;"');
    }
    $templates->set_var('maxlength_description', $_USERBOX_CONF['maxlength_description']);
    $templates->set_var('about_thispage', $LANG_USERBOX_ADMIN['about_myprofile_profile']);
    $templates->set_var('lang_must', $LANG_USERBOX_ADMIN['must']);
    $templates->set_var('site_url', $_CONF['site_url']);
    $templates->set_var('site_admin_url', $_CONF['site_admin_url']);
    $templates->set_var('lang_view', $LANG_USERBOX_ADMIN['view']);
    $token = SEC_createToken();
    $retval .= SEC_getTokenExpiryNotice($token);
    $templates->set_var('gltoken_name', CSRF_TOKEN);
    $templates->set_var('gltoken', $token);
    $templates->set_var('xhtml', XHTML);
    $templates->set_var('script', THIS_SCRIPT);
    $templates->set_var('dateformat', $_USERBOX_CONF['dateformat']);
    //
    $templates->set_var('lang_link_admin', $LANG_USERBOX_ADMIN['link_admin']);
    $templates->set_var('lang_link_admin_top', $LANG_USERBOX_ADMIN['link_admin_top']);
    $templates->set_var('lang_link_public', $LANG_USERBOX_ADMIN['link_public']);
    $templates->set_var('lang_link_list', $LANG_USERBOX_ADMIN['link_list']);
    $templates->set_var('lang_link_detail', $LANG_USERBOX_ADMIN['link_detail']);
    //fieldset_id
    $templates->set_var('lang_fieldset', $LANG_USERBOX_ADMIN['fieldset']);
    $templates->set_var('fieldset_id', $fieldset_id);
    $templates->set_var('fieldset_name', $fieldset_name);
    //id
    $templates->set_var('lang_id', $LANG_USERBOX_ADMIN['id']);
    //@@@@@ $templates->set_var('help_id', $LANG_USERBOX_ADMIN['help']);
    $templates->set_var('id', $id);
    //$LANG28 = array(
    //    2 => 'ユーザID',
    //    3 => 'ユーザ名', username
    //    4 => '氏名', fullname
    $templates->set_var('lang_uid', $LANG28['2']);
    $templates->set_var('lang_username', $LANG28['3']);
    $templates->set_var('username', $username);
    $templates->set_var('lang_fullname', $LANG28['4']);
    $templates->set_var('fullname', $fullname);
    //下書
    $templates->set_var('lang_draft', $LANG_USERBOX_ADMIN['draft']);
    if ($draft_flag == 1) {
        $templates->set_var('draft_flag', "checked=checked");
开发者ID:mistgrass,项目名称:geeklog-ivywe,代码行数:67,代码来源:profile.php

示例11: adminShowEditor

 /**
  * Show editor
  *
  * @param array $A
  */
 public static function adminShowEditor(array $A = array())
 {
     global $_CONF, $_FINPUT, $LANG_ADMIN, $LANG_LANG, $MESSAGE, $_TABLES;
     self::checkAccessRights();
     $id = $_FINPUT->get('id', $_FINPUT->post('id', 0));
     $id = intval($id, 10);
     if ($id < 1) {
         $id = 0;
     }
     if ($id === 0) {
         $A = self::getEmptyRecord();
     } elseif (count($A) === 0) {
         $sql = "SELECT * FROM {$_TABLES['language_items']} WHERE id = {$id} ";
         $resultSet = DB_query($sql);
         if (DB_numRows($resultSet) == 1) {
             $A = DB_fetchArray($resultSet, false);
         } else {
             $id = 0;
             $A = self::getEmptyRecord();
         }
     } else {
         $id = $A['id'];
     }
     // Get UI language options
     $languageOptions = '';
     $currentLanguage = COM_getLanguage();
     foreach (glob($_CONF['path_language'] . '*.php') as $language) {
         $language = basename($language);
         $language = str_replace('.php', '', $language);
         $isCurrent = $language === $currentLanguage ? ' selected="selected"' : '';
         $languageOptions .= "<option{$isCurrent}>{$language}</option>" . PHP_EOL;
     }
     $isNew = $id === 0;
     if ($isNew) {
         $deleteOption = '';
         $allow_delete = false;
     } else {
         $deleteOption = '<li><input type="submit" value="' . $LANG_ADMIN['delete'] . '" name="mode" class="submit" onclick="return confirm(\'' . $MESSAGE[76] . '\');"' . XHTML . '</li>';
         $allow_delete = true;
     }
     $token = SEC_createToken(self::SEC_TOKEN_LIFESPAN);
     $content = COM_startBlock($LANG_LANG['language_editor'], '', COM_getBlockTemplate('_admin_block', 'header'));
     $content .= SEC_getTokenExpiryNotice($token);
     $editor = COM_newTemplate($_CONF['path_layout'] . 'admin/language');
     $editor->set_file('language_editor', 'language_editor.thtml');
     $editor->set_var(array('id' => $A['id'], 'id_to_display' => $isNew ? 'N/A' : $A['id'], 'var_name' => $A['var_name'], 'language' => $A['language'], 'language_options' => $languageOptions, 'name' => $A['name'], 'value' => $A['value'], 'site_admin_url' => $_CONF['site_admin_url'], 'delete_option' => $deleteOption, 'allow_delete' => $allow_delete, 'lang_language_editor' => $LANG_LANG['language_editor'], 'lang_id' => $LANG_LANG['id'], 'lang_var_name' => $LANG_LANG['var_name'], 'lang_language' => $LANG_LANG['language'], 'lang_name' => $LANG_LANG['name'], 'lang_value' => $LANG_LANG['value'], 'lang_save' => $LANG_ADMIN['save'], 'lang_delete' => $LANG_ADMIN['delete'], 'lang_cancel' => $LANG_ADMIN['cancel'], 'confirm_message' => $MESSAGE[76], 'token_name' => CSRF_TOKEN, 'token_value' => $token));
     $editor->parse('output', 'language_editor');
     $content .= $editor->finish($editor->get_var('output'));
     $content .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));
     $display = COM_createHTMLDocument($content, array('pagetitle' => 'Language Items'));
     COM_output($display);
 }
开发者ID:Geeklog-Core,项目名称:geeklog,代码行数:57,代码来源:language.class.php

示例12: LIB_Edit

function LIB_Edit($pi_name, $id, $edt_flg, $msg = '', $errmsg = "", $mode = "edit")
{
    global $_CONF;
    global $_TABLES;
    global $LANG_ADMIN;
    global $MESSAGE;
    global $LANG_ACCESS;
    global $_USER;
    $lang_box_admin = "LANG_" . strtoupper($pi_name) . "_ADMIN";
    global ${$lang_box_admin};
    $lang_box_admin = ${$lang_box_admin};
    $lang_box = "LANG_" . strtoupper($pi_name);
    global ${$lang_box};
    $lang_box = ${$lang_box};
    $table = $_TABLES[strtoupper($pi_name) . '_def_category'];
    $table2 = $_TABLES[strtoupper($pi_name) . '_category'];
    //$lang_box_noyes="LANG_".strtoupper($pi_name)."_NOYES";
    //global $$lang_box_noyes;
    //$lang_box_noyes=$$lang_box_noyes;
    $retval = '';
    $delflg = false;
    $wkcnt = DB_count($table2, "category_id", $id);
    if (!empty($msg)) {
        $retval .= COM_showMessage($msg, $pi_name);
        $retval .= $errmsg;
        // clean 'em up
        $code = COM_applyFilter($_POST['code']);
        $name = COM_applyFilter($_POST['name']);
        $description = COM_applyFilter($_POST['description']);
        $defaulttemplatesdirectory = COM_applyFilter($_POST['defaulttemplatesdirectory']);
        //@@@@@@
        $parent_id = COM_applyFilter($_POST['parent_id'], true);
        $categorygroup_id = COM_applyFilter($_POST['group'], true);
        //@@@@@@
        $orderno = COM_applyFilter($_POST['orderno']);
        $uuid = $_USER['uid'];
    } else {
        if (empty($id)) {
            $id = 0;
            $code = "";
            $name = "";
            $description = "";
            $defaulttemplatesdirectory = "";
            $categorygroup_id = "";
            $parent_id = "";
            $orderno = "";
            $uuid = 0;
            $udatetime = "";
            //"";
        } else {
            $sql = "SELECT ";
            $sql .= " *";
            $sql .= " FROM ";
            $sql .= $table;
            $sql .= " WHERE ";
            $sql .= " category_id = {$id}";
            $result = DB_query($sql);
            $A = DB_fetchArray($result);
            $code = COM_stripslashes($A['code']);
            $name = COM_stripslashes($A['name']);
            $description = COM_stripslashes($A['description']);
            $defaulttemplatesdirectory = COM_stripslashes($A['defaulttemplatesdirectory']);
            $parent_id = COM_stripslashes($A['parent_id']);
            $categorygroup_id = COM_stripslashes($A['categorygroup_id']);
            $orderno = COM_stripslashes($A['orderno']);
            $uuid = COM_stripslashes($A['uuid']);
            $udatetime = COM_stripslashes($A['udatetime']);
            // データがあれば削除させない
            if ($edt_flg == FALSE) {
                $delflg = true;
            }
        }
    }
    if ($mode === "copy") {
        $id = 0;
        //作成日付
        $created = 0;
        $created_month = 0;
        $created_day = 0;
        $created_year = 0;
        $created_hour = 0;
        $created_minute = 0;
        //
        $delflg = false;
    }
    $retval .= COM_startBlock($lang_box_admin['edit'], '', COM_getBlockTemplate('_admin_block', 'header'));
    $tmplfld = DATABOX_templatePath('admin', 'default', $pi_name);
    $templates = new Template($tmplfld);
    $templates->set_file('editor', "category_editor.thtml");
    //--
    $templates->set_var('about_thispage', $lang_box_admin['about_admin_category']);
    $templates->set_var('lang_must', $lang_box_admin['must']);
    $templates->set_var('site_url', $_CONF['site_url']);
    $templates->set_var('site_admin_url', $_CONF['site_admin_url']);
    //--
    $token = SEC_createToken();
    $retval .= SEC_getTokenExpiryNotice($token);
    $templates->set_var('gltoken_name', CSRF_TOKEN);
    $templates->set_var('gltoken', $token);
    $templates->set_var('xhtml', XHTML);
//.........这里部分代码省略.........
开发者ID:mistgrass,项目名称:geeklog-ivywe,代码行数:101,代码来源:lib_category.php

示例13: fncEdit

function fncEdit($message = "", $wkymlmguserflg = false)
{
    global $_CONF;
    global $_TABLES;
    global $LANG_ASSIST_ADMIN;
    global $LANG_ADMIN;
    global $_ASSIST_CONF;
    global $LANG_ASSIST_INTROBODY;
    global $LANG_ASSIST_TOENV;
    global $LANG31;
    global $_SCRIPTS;
    $retval = '';
    //メッセージ表示
    if (!empty($message)) {
        $retval .= COM_startBlock($LANG_ASSIST_ADMIN['msg'], '', COM_getBlockTemplate('_msg_block', 'header'));
        $retval .= $message;
        $retval .= COM_endBlock(COM_getBlockTemplate('_msg_block', 'footer'));
        // clean 'em up
        $fromname = COM_applyFilter($_POST['fromname']);
        $replyto = COM_applyFilter($_POST['replyto']);
        $sprefix = COM_applyFilter($_POST['sprefix']);
        $sid = COM_applyFilter($_POST['sid']);
        $testto = COM_applyFilter($_POST['testto']);
        $uidfrom = COM_applyFilter($_POST['uidfrom'], true);
        $uidto = COM_applyFilter($_POST['uidto'], true);
        // hiroron start 2010/07/13
        $dt_year = COM_applyFilter($_POST['datetime_year'], true);
        $dt_month = COM_applyFilter($_POST['datetime_month'], true);
        $dt_day = COM_applyFilter($_POST['datetime_day'], true);
        $dt_hour = COM_applyFilter($_POST['datetime_hour'], true);
        $dt_minute = COM_applyFilter($_POST['datetime_minute'], true);
        $datetime_value = COM_convertDate2Timestamp($dt_year . '-' . $dt_month . '-' . $dt_day, $dt_hour . ':' . $dt_minute . ':00');
        // 冒頭文 本文 introbody
        $introbody = COM_applyFilter($_POST['introbody'], true);
        //送信先環境
        $toenv = COM_applyFilter($_POST['toenv'], true);
        //送信先グループ
        $selectgroup = COM_applyFilter($_POST['selectgroup'], true);
        // ユーザの受信許可設定を無視して送る
        $overstyr = COM_applyFilter($_POST['overstyr'], true);
        //一括予約
        $bulkmm = COM_applyFilter($_POST['bulkmm'], true);
        $bulkcnt = COM_applyFilter($_POST['bulkcnt'], true);
    } else {
        $fromname = DB_getItem($_TABLES['vars'], 'value', "name = 'assist_fromname'");
        $fromname = COM_stripslashes($fromname);
        if ($fromname == "") {
            $fromname = $_CONF['site_name'];
        }
        $replyto = DB_getItem($_TABLES['vars'], 'value', "name = 'assist_replyto'");
        $replyto = COM_stripslashes($replyto);
        if ($replyto == "") {
            $replyto = $_CONF['site_mail'];
        }
        $sprefix = DB_getItem($_TABLES['vars'], 'value', "name = 'assist_sprefix'");
        $sprefix = COM_stripslashes($sprefix);
        $sid = DB_getItem($_TABLES['vars'], 'value', "name = 'assist_sid'");
        $sid = COM_stripslashes($sid);
        $testto = DB_getItem($_TABLES['vars'], 'value', "name = 'assist_testto'");
        $testto = COM_stripslashes($testto);
        $uidfrom = DB_getItem($_TABLES['vars'], 'value', "name = 'assist_uidfrom'");
        $uidfrom = COM_stripslashes($uidfrom);
        $uidto = DB_getItem($_TABLES['vars'], 'value', "name = 'assist_uidto'");
        $uidto = COM_stripslashes($uidto);
        // hiroron start 2010/07/13
        $datetime_value = DB_getItem($_TABLES['vars'], 'value', "name = 'assist_re_datetime'");
        // 冒頭文 本文 introbody
        $introbody = DB_getItem($_TABLES['vars'], 'value', "name = 'assist_introbody'");
        //送信先環境
        $toenv = DB_getItem($_TABLES['vars'], 'value', "name = 'assist_toenv'");
        //送信先グループ
        $selectgroup = DB_getItem($_TABLES['vars'], 'value', "name = 'assist_selectgroup'");
        // ユーザの受信許可設定を無視して送る
        $overstyr = DB_getItem($_TABLES['vars'], 'value', "name = 'assist_overstyr'");
        $bulkmm = DB_getItem($_TABLES['vars'], 'value', "name = 'assist_bulkmm'");
        $bulkcnt = DB_getItem($_TABLES['vars'], 'value', "name = 'assist_bulkcnt'");
    }
    $retval .= COM_startBlock($LANG_ASSIST_ADMIN['edit'], '', COM_getBlockTemplate('_admin_block', 'header'));
    $pi_name = "assist";
    $tmplfld = assist_templatePath('admin', 'default', $pi_name);
    $templates = new Template($tmplfld);
    // Loads jQuery UI datepicker
    if (version_compare(VERSION, '2.0.0') >= 0) {
        $_SCRIPTS->setJavaScriptLibrary('jquery.ui.datepicker');
        $_SCRIPTS->setJavaScriptLibrary('jquery-ui-i18n');
        $_SCRIPTS->setJavaScriptFile('datepicker', '/javascript/datepicker.js');
        $langCode = COM_getLangIso639Code();
        $toolTip = 'Click and select a date';
        // Should be translated
        $imgUrl = $_CONF['site_url'] . '/images/calendar.png';
        $_SCRIPTS->setJavaScript("jQuery(function () {" . "  geeklog.datepicker.set('datetime', '{$langCode}', '{$toolTip}', '{$imgUrl}');" . "});", TRUE, TRUE);
    }
    $templates->set_file('editor', "newsletter.thtml");
    //--
    $templates->set_var('lang_must', $LANG_ASSIST_ADMIN['must']);
    $templates->set_var('site_url', $_CONF['site_url']);
    $templates->set_var('site_admin_url', $_CONF['site_admin_url']);
    $token = SEC_createToken();
    $retval .= SEC_getTokenExpiryNotice($token);
    $templates->set_var('gltoken_name', CSRF_TOKEN);
//.........这里部分代码省略.........
开发者ID:mistgrass,项目名称:geeklog-ivywe,代码行数:101,代码来源:newsletter.php

示例14: LIB_editgroups

function LIB_editgroups($pi_name, $id)
{
    global $_CONF;
    global $_TABLES;
    global $LANG_ADMIN;
    global $LANG09;
    $lang_box_admin = "LANG_" . strtoupper($pi_name) . "_ADMIN";
    global ${$lang_box_admin};
    $lang_box_admin = ${$lang_box_admin};
    $lang_box = "LANG_" . strtoupper($pi_name);
    global ${$lang_box};
    $lang_box = ${$lang_box};
    //global  $_USER;
    global $LANG_ACCESS;
    global $LANG28;
    require_once $_CONF['path_system'] . 'lib-admin.php';
    $retval = '';
    $table = $_TABLES[strtoupper($pi_name) . '_def_fieldset'];
    $fieldset_name = DB_getItem($table, 'name', "fieldset_id = {$id}");
    $fieldset_listing_url = $_CONF['site_admin_url'] . "/plugins/" . THIS_SCRIPT;
    //MENU1:管理画面
    $url2 = $_CONF['site_url'] . '/admin/plugins/' . $pi_name . '/fieldset.php';
    $menu_arr[] = array('url' => $url2, 'text' => $lang_box_admin['fieldsetlist']);
    $menu_arr[] = array('url' => $_CONF['site_admin_url'], 'text' => $LANG_ADMIN['admin_home']);
    $retval .= COM_startBlock($lang_box_admin['admin_list'] . " - {$fieldset_name}", '', COM_getBlockTemplate('_admin_block', 'header'));
    $function = "plugin_geticon_" . $pi_name;
    $icon = $function();
    $retval .= ADMIN_createMenu($menu_arr, $lang_box_admin['inst_fieldsetgroups'], $icon);
    $tmplfld = DATABOX_templatePath('admin', 'default', $pi_name);
    $templates = new Template($tmplfld);
    $templates->set_file('editor', "fieldset_groups.thtml");
    //--
    $templates->set_var('site_url', $_CONF['site_url']);
    $templates->set_var('site_admin_url', $_CONF['site_admin_url']);
    $token = SEC_createToken();
    $retval .= SEC_getTokenExpiryNotice($token);
    $templates->set_var('gltoken_name', CSRF_TOKEN);
    $templates->set_var('gltoken', $token);
    $templates->set_var('xhtml', XHTML);
    $templates->set_var('script', THIS_SCRIPT);
    //
    $templates->set_var('lang_link_admin', $lang_box_admin['link_admin']);
    $templates->set_var('lang_link_admin_top', $lang_box_admin['link_admin_top']);
    $templates->set_var('LANG_fieldsetgroups', $lang_box_admin['fieldsetgroupsregistered']);
    $templates->set_var('fieldsetgroups', LIB_selectGroups($pi_name, $id, true));
    $templates->set_var('LANG_grouplist', $lang_box_admin['grouplist']);
    $templates->set_var('group_list', LIB_selectGroups($pi_name, $id));
    $templates->set_var('LANG_add', $LANG_ACCESS['add']);
    $templates->set_var('LANG_remove', $LANG_ACCESS['remove']);
    $templates->set_var('lang_save', $LANG_ADMIN['save']);
    $templates->set_var('lang_cancel', $LANG_ADMIN['cancel']);
    $templates->set_var('id', $id);
    $templates->parse('output', 'editor');
    $retval .= $templates->finish($templates->get_var('output'));
    $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));
    return $retval;
}
开发者ID:mistgrass,项目名称:geeklog-ivywe,代码行数:57,代码来源:lib_fieldset.php

示例15: fncexportform

function fncexportform()
{
    global $_CONF;
    global $_USERBOX_CONF;
    global $LANG_USERBOX_ADMIN;
    global $LANG_ADMIN;
    $pi_name = "userbox";
    //-----
    $tmpl = new Template($_CONF['path'] . "plugins/" . THIS_PLUGIN . "/templates/admin/");
    $tmpl->set_file(array('exportform' => 'exportform.thtml'));
    $tmpl->set_var('site_admin_url', $_CONF['site_admin_url']);
    $token = SEC_createToken();
    $retval .= SEC_getTokenExpiryNotice($token);
    $tmpl->set_var('gltoken_name', CSRF_TOKEN);
    $tmpl->set_var('gltoken', $token);
    $tmpl->set_var('xhtml', XHTML);
    $tmpl->set_var('script', THIS_SCRIPT);
    $tmpl->set_var('actionname', $LANG_USERBOX_ADMIN['export']);
    $tmpl->set_var('lang_inst', $LANG_USERBOX_ADMIN['inst_dataexport']);
    //fieldset_id
    $fieldset_id = "all";
    $tmpl->set_var('lang_fieldset', $LANG_USERBOX_ADMIN['fieldset']);
    $list_fieldset = DATABOX_getoptionlist("fieldset", $fieldset_id, 0, $pi_name, "", "all");
    $tmpl->set_var('list_fieldset', $list_fieldset);
    $tmpl->set_var('lang_export', $LANG_USERBOX_ADMIN["export"]);
    $tmpl->set_var('lang_cancel', $LANG_ADMIN['cancel']);
    $tmpl->parse('output', 'exportform');
    $exportform = $tmpl->finish($tmpl->get_var('output'));
    $retval .= $exportform;
    return $retval;
}
开发者ID:mistgrass,项目名称:geeklog-ivywe,代码行数:31,代码来源:profile.php


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