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


PHP cot_redirect函数代码示例

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


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

示例1: cot_pfs_createfolder

/**
 * Create a new PFS folder, return new folder ID
 *
 * @param int $ownerid Owners user ID
 * @param string $title Folder title
 * @param string $desc Folder description
 * @param int $parentid Parent folder ID
 * @param boolean $ispublic Public?
 * @param boolean $isgallery Gallery?
 * @return int
 */
function cot_pfs_createfolder($ownerid, $title = '', $desc = '', $parentid = '', $ispublic = '', $isgallery = '')
{
    global $db, $db_pfs_folders, $cfg, $sys, $L, $err_msg;
    if ($title === '') {
        $title = cot_import('ntitle', 'P', 'TXT');
    }
    if ($desc === '') {
        $desc = cot_import('ndesc', 'P', 'TXT');
    }
    if ($parentid === '') {
        $parentid = cot_import('nparentid', 'P', 'INT');
    }
    if ($ispublic === '') {
        $ispublic = cot_import('nispublic', 'P', 'BOL');
    }
    if ($isgallery === '') {
        $isgallery = cot_import('nisgallery', 'P', 'BOL');
    }
    if (empty($title)) {
        $err_msg[] = $L['pfs_foldertitlemissing'];
        return 0;
    }
    $newpath = cot_translit_encode(mb_strtolower($title));
    if ($parentid > 0) {
        $newpath = cot_pfs_folderpath($parentid, TRUE) . $newpath;
        $sql = $db->query("SELECT pff_id FROM {$db_pfs_folders} WHERE pff_userid=" . (int) $ownerid . " AND pff_id=" . (int) $parentid);
        $sql->rowCount() > 0 or cot_die();
    }
    if ($cfg['pfs']['pfsuserfolder']) {
        cot_pfs_mkdir($pfs_dir_user . $newpath) or cot_redirect(cot_url('message', 'msg=500&redirect=' . base64_encode('pfs.php'), '', true));
        cot_pfs_mkdir($thumbs_dir_user . $newpath) or cot_redirect(cot_url('message', 'msg=500&redirect=' . base64_encode('pfs.php'), '', true));
    }
    $db->insert($db_pfs_folders, array('pff_parentid' => (int) $parentid, 'pff_userid' => (int) $ownerid, 'pff_title' => $title, 'pff_date' => (int) $sys['now'], 'pff_updated' => (int) $sys['now'], 'pff_desc' => $desc, 'pff_path' => $newpath, 'pff_ispublic' => (int) $ispublic, 'pff_isgallery' => (int) $isgallery, 'pff_count' => 0));
    return $db->lastInsertId();
}
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:46,代码来源:pfs.functions.php

示例2: COUNT

$is_user_check = 'IF(o.online_userid > 0,1,0) as is_user';
$limit = $maxuserssperpage ? "LIMIT {$d}, {$maxuserssperpage}" : '';
$sql_users = $db->query("\n\tSELECT DISTINCT u.*, o.*, {$is_user_check}\n\tFROM {$db_online} AS o\n\t{$join_condition} {$where}\n\tORDER BY is_user DESC, online_lastseen DESC {$limit}\n");
$sql_users_count = $db->query("SELECT COUNT(*) as cnt, {$is_user_check} FROM {$db_online} as o {$where} GROUP BY is_user");
$who_guests = 0;
$who_users = 0;
foreach ($sql_users_count as $row) {
    if ($row['is_user']) {
        $who_users = (int) $row['cnt'];
    } else {
        $who_guests = (int) $row['cnt'];
    }
}
$totallines = $who_users + $who_guests;
if (!$cfg['easypagenav'] && $durl > 0 && $maxuserssperpage > 0 && $durl % $maxuserssperpage > 0 || $d > 0 && $d >= $totallines) {
    cot_redirect(cot_url('whosonline'));
}
$pagenav = cot_pagenav('whosonline', array('d' => $durl), $d, $totallines, $maxuserssperpage);
/* === Hooks - Part1 : Set === */
$users_loop_hook = cot_getextplugins('whosonline.users.loop');
$guests_loop_hook = cot_getextplugins('whosonline.guests.loop');
/* ===== */
if ($maxuserssperpage) {
    $fpu = $who_users / $maxuserssperpage;
    if ($durl > ceil($fpu)) {
        $guest_start_num = $maxuserssperpage - $who_users % $maxuserssperpage + ($durl - 1 - ceil($fpu)) * $maxuserssperpage;
    }
}
foreach ($sql_users->fetchAll() as $row) {
    if ($hiddenusers && in_array($row['user_id'], $hiddenusers)) {
        if (cot_auth('plug', 'hiddengroups', '1')) {
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:31,代码来源:whosonline.php

示例3: cot_message

        include $pl;
    }
    /* ===== */
    $sql = $db->query("TRUNCATE {$db_trash}");
    cot_message('adm_trashcan_prune');
    cot_redirect(cot_url('admin', 'm=other&p=trashcan', '', true));
} elseif ($a == 'restore') {
    cot_check_xg();
    /* === Hook === */
    foreach (cot_getextplugins('trashcan.admin.restore') as $pl) {
        include $pl;
    }
    /* ===== */
    cot_trash_restore($id);
    cot_message('adm_trashcan_restored');
    cot_redirect(cot_url('admin', 'm=other&p=trashcan', '', true));
}
$tr_t = new XTemplate(cot_tplfile($info ? 'trashcan.info.admin' : 'trashcan.admin', 'plug', true));
$totalitems = (int) $db->query("SELECT COUNT(*) FROM {$db_trash} WHERE tr_parentid=0")->fetchColumn();
$pagenav = cot_pagenav('admin', 'm=other&p=trashcan', $d, $totalitems, $maxperpage, 'd', '', $cfg['jquery'] && $cfg['turnajax']);
$sql_query = $info ? "AND tr_id={$id} LIMIT 1" : "ORDER by tr_id DESC LIMIT {$d}, " . $maxperpage;
$sql = $db->query("SELECT t.*, u.user_name FROM {$db_trash} AS t\n\tLEFT JOIN {$db_users} AS u ON t.tr_trashedby=u.user_id\n\tWHERE tr_parentid=0 {$sql_query}");
$ii = 0;
/* === Hook - Part1 : Set === */
$extp = cot_getextplugins('trashcan.admin.loop');
/* ===== */
foreach ($sql->fetchAll() as $row) {
    $ii++;
    switch ($row['tr_type']) {
        case 'comment':
            $icon = $R['admin_icon_comments'];
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:31,代码来源:trashcan.admin.php

示例4: defined

<?php

/**
 * [BEGIN_COT_EXT]
 * Hooks=users.register.add.validate
 * [END_COT_EXT]
 */
/**
 * plugin User Group Selector for Cotonti Siena
 * 
 * @package usergroupselector
 * @version 1.0.0
 * @author CMSWorks Team
 * @copyright Copyright (c) CMSWorks.ru, littledev.ru
 * @license BSD
 *  */
defined('COT_CODE') or die('Wrong URL.');
require_once cot_langfile('usergroupselector', 'plug');
$usergroup = cot_import('usergroup', 'G', 'ALP');
if (cot_error_found() && !empty($usergroup)) {
    cot_redirect(cot_url('users', 'm=register&usergroup=' . $usergroup, '', true));
}
开发者ID:Andreyjktl,项目名称:cot-freelance,代码行数:22,代码来源:usergroupselector.users.register.add.validate.php

示例5: cot_die_message

    include $pl;
}
/* ===== */
if ($id > 0 || !empty($al)) {
    $where = !empty($al) ? "item_alias='" . $al . "'" : 'item_id=' . $id;
    $sql = $db->query("SELECT f.*, u.* FROM {$db_folio} AS f \n\t\tLEFT JOIN {$db_users} AS u ON u.user_id=f.item_userid WHERE {$where} LIMIT 1");
}
if (!$id && empty($al) || !$sql || $sql->rowCount() == 0) {
    cot_die_message(404, TRUE);
}
$item = $sql->fetch();
list($usr['auth_read'], $usr['auth_write'], $usr['isadmin']) = cot_auth('folio', $item['item_cat'], 'RWA');
cot_block($usr['auth_read']);
if ($item['item_state'] != 0 && !$usr['isadmin'] && $usr['id'] != $item['item_userid']) {
    cot_log("Attempt to directly access an un-validated", 'sec');
    cot_redirect(cot_url('message', "msg=930", '', true));
    exit;
}
if ($usr['id'] != $item['item_userid'] && (!$usr['isadmin'] || $cfg['folio']['count_admin'])) {
    $item['item_count']++;
    $db->update($db_folio, array('item_count' => $item['item_count']), "item_id=" . (int) $item['item_id']);
}
$title_params = array('TITLE' => empty($item['item_metatitle']) ? $item['item_title'] : $item['item_metatitle'], 'CATEGORY' => $structure['folio'][$item['item_cat']]['title']);
$out['subtitle'] = cot_title($cfg['folio']['title_folio'], $title_params);
$out['desc'] = !empty($item['item_metadesc']) ? $item['item_metadesc'] : cot_cutstring(strip_tags(cot_parse($item['item_text'], $cfg['folio']['markup'], $item['item_parser'])), 160);
$out['meta_keywords'] = !empty($item['item_keywords']) ? $item['item_keywords'] : $structure['folio'][$item['item_cat']]['keywords'];
// Building the canonical URL
$pageurl_params = array('c' => $item['item_cat']);
empty($al) ? $pageurl_params['id'] = $id : ($pageurl_params['al'] = $al);
$out['canonical_uri'] = cot_url('folio', $pageurl_params);
$mskin = cot_tplfile(array('folio', $structure['folio'][$item['item_cat']]['tpl']));
开发者ID:ASDAFF,项目名称:cot-freelance,代码行数:31,代码来源:folio.main.php

示例6: foreach

                /* === Hook for the plugins === */
                foreach (cot_getextplugins('users.register.validate.rejected') as $pl) {
                    include $pl;
                }
                /* ===== */
                cot_redirect(cot_url('message', 'msg=109', '', true));
            }
        } elseif ($row['user_maingrp'] == -1) {
            $sql = $db->update($db_users, array('user_maingrp' => $row['user_sid']), "user_id='" . $row['user_id'] . "' AND user_lostpass='{$v}'");
            cot_redirect(cot_url('message', 'msg=106', '', true));
        }
    } else {
        $env['status'] = '403 Forbidden';
        cot_shield_update(7, "Account validation");
        cot_log("Wrong validation URL", 'sec');
        cot_redirect(cot_url('message', 'msg=157', '', true));
    }
}
$mskin = cot_tplfile('users.register', 'module');
/* === Hook === */
foreach (cot_getextplugins('users.register.main') as $pl) {
    include $pl;
}
/* ===== */
$out['subtitle'] = $L['aut_registertitle'];
$out['head'] .= $R['code_noindex'];
require_once $cfg['system_dir'] . '/header.php';
$t = new XTemplate($mskin);
require_once cot_incfile('forms');
$t->assign(array('USERS_REGISTER_TITLE' => $L['aut_registertitle'], 'USERS_REGISTER_SUBTITLE' => $L['aut_registersubtitle'], 'USERS_REGISTER_ADMINEMAIL' => $cot_adminemail, 'USERS_REGISTER_SEND' => cot_url('users', 'm=register&a=add'), 'USERS_REGISTER_USER' => cot_inputbox('text', 'rusername', $ruser['user_name'], array('size' => 24, 'maxlength' => 100)), 'USERS_REGISTER_EMAIL' => cot_inputbox('text', 'ruseremail', $ruser['user_email'], array('size' => 24, 'maxlength' => 64)), 'USERS_REGISTER_PASSWORD' => cot_inputbox('password', 'rpassword1', '', array('size' => 12, 'maxlength' => 32)), 'USERS_REGISTER_PASSWORDREPEAT' => cot_inputbox('password', 'rpassword2', '', array('size' => 12, 'maxlength' => 32)), 'USERS_REGISTER_COUNTRY' => cot_selectbox_countries($ruser['user_country'], 'rcountry'), 'USERS_REGISTER_TIMEZONE' => cot_selectbox_timezone($ruser['user_timezone'], 'rusertimezone'), 'USERS_REGISTER_GENDER' => cot_selectbox_gender($ruser['user_gender'], 'rusergender'), 'USERS_REGISTER_BIRTHDATE' => cot_selectbox_date(0, 'short', 'ruserbirthdate', cot_date('Y', $sys['now']), cot_date('Y', $sys['now']) - 100, false)));
// Extra fields
开发者ID:Roffun,项目名称:Cotonti,代码行数:31,代码来源:users.register.php

示例7: cot_payments_create_order

/**
 * Создание платежки
 * @param string $area тип услуги, по-умолчанию пополнение счета
 * @param int $summ стоимость
 * @param array $options дополнительные параметры
 */
function cot_payments_create_order($area = 'balance', $summ, $options = array())
{
    global $db_payments, $db_payments_balance, $db, $sys, $cfg, $usr;
    if (empty($summ)) {
        cot_redirect(cot_url('payments', 'm=error&msg=3', '', true));
    }
    $payinfo['pay_userid'] = $usr['id'];
    $payinfo['pay_area'] = $area;
    $payinfo['pay_summ'] = $summ;
    $payinfo['pay_cdate'] = $sys['now'];
    $payinfo['pay_status'] = 'new';
    if (count($options) > 0) {
        foreach ($options as $i => $opt) {
            $payinfo['pay_' . $i] = $opt;
        }
    }
    // Создание платежного поручения для системы
    $db->insert($db_payments, $payinfo);
    $id = $db->lastInsertId();
    cot_redirect(cot_url('payments', 'm=billing&pid=' . $id, '', true));
}
开发者ID:Andreyjktl,项目名称:cot-freelance,代码行数:27,代码来源:payments.functions.php

示例8: cot_message

         $errors ? cot_message('adm_partially_updated', 'warning') : cot_message('Updated');
     } else {
         if (!$errors) {
             cot_message('adm_already_updated');
         }
     }
 } elseif ($a == 'reset' && !empty($v)) {
     cot_config_reset($p, $v, $o, '');
     $optionslist = cot_config_list($o, $p, '');
     /* === Hook  === */
     foreach (cot_getextplugins('admin.config.edit.reset.done') as $pl) {
         include $pl;
     }
     /* ===== */
     $cache && $cache->clear();
     cot_redirect(cot_url('admin', array('m' => 'config', 'n' => 'edit', 'o' => $o, 'p' => $p), '', true));
 }
 if ($o == 'core') {
     $adminpath[] = array(cot_url('admin', 'm=config'), $L['Configuration']);
     $adminpath[] = array(cot_url('admin', 'm=config&n=edit&o=' . $o . '&p=' . $p), $L['core_' . $p]);
 } else {
     $adminpath[] = array(cot_url('admin', 'm=extensions'), $L['Extensions']);
     $plmod = $o == 'module' ? 'mod' : 'pl';
     $ext_info = cot_get_extensionparams($p, $o == 'module');
     $adminpath[] = array(cot_url('admin', "m=extensions&a=details&{$plmod}={$p}"), $ext_info['name']);
     $adminpath[] = array(cot_url('admin', 'm=config&n=edit&o=' . $o . '&p=' . $p), $L['Configuration']);
 }
 /* === Hook  === */
 foreach (cot_getextplugins('admin.config.edit.main') as $pl) {
     include $pl;
 }
开发者ID:Logodeveloper,项目名称:Cotonti,代码行数:31,代码来源:admin.config.php

示例9: cot_stat_inc

                        if ($stats_enabled) {
                            cot_stat_inc('totalmailpmnot');
                        }
                    }
                }
            }
            /* === Hook === */
            foreach (cot_getextplugins('pm.send.send.done') as $pl) {
                include $pl;
            }
            /* ===== */
            if ($stats_enabled) {
                cot_stat_inc('totalpms');
            }
            cot_shield_update(30, "New private message (" . $totalrecipients . ")");
            cot_redirect(cot_url('pm', 'f=sentbox', '', true));
        }
    }
}
if (!empty($to)) {
    $totalrecipients = 0;
    if (mb_substr(mb_strtolower($to), 0, 1) == 'g' && $usr['maingrp'] == 5) {
        $group = cot_import(mb_substr($to, 1, 8), 'D', 'INT');
        if ($group > 1) {
            $sql_pm_users = $db->query("SELECT user_id, user_name FROM {$db_users} WHERE user_maingrp = {$group} ORDER BY user_name ASC");
        }
    } else {
        $touser_src = explode('-', $to);
        $touser_req = count($touser_src);
        foreach ($touser_src as $k => $i) {
            $userid = cot_import($i, 'D', 'INT');
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:31,代码来源:pm.send.php

示例10: cot_forums_sectionsetlast

        }
        if (!$rtopic['ft_mode']) {
            cot_forums_sectionsetlast($s, "fs_postcount+1", "fs_topiccount+1");
        }
        cot_extrafield_movefiles();
        /* === Hook === */
        foreach (cot_getextplugins('forums.newtopic.newtopic.done') as $pl) {
            include $pl;
        }
        /* ===== */
        if ($cache) {
            $cfg['cache_forums'] && $cache->page->clear('forums');
            $cfg['cache_index'] && $cache->page->clear('index');
        }
        cot_shield_update(45, "New topic");
        cot_redirect(cot_url('forums', "m=posts&q={$q}&n=last", '#bottom', true));
    }
}
$toptitle = cot_breadcrumbs(cot_forums_buildpath($s), $cfg['homebreadcrumb']);
$toptitle .= $usr['isadmin'] ? $R['forums_code_admin_mark'] : '';
$sys['sublocation'] = $structure['forums'][$s]['title'];
$out['subtitle'] = $L['forums_newtopic'];
$out['head'] .= $R['code_noindex'];
/* === Hook === */
foreach (cot_getextplugins('forums.newtopic.main') as $pl) {
    include $pl;
}
/* ===== */
require_once cot_incfile('forms');
require_once $cfg['system_dir'] . '/header.php';
$mskin = cot_tplfile(array('forums', 'newtopic', $structure['forums'][$s]['tpl']));
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:31,代码来源:forums.newtopic.php

示例11: cot_import

        $variants = cot_import($variantss[$name], 'D', "HTM");
        $default = cot_import($defaults[$name], 'D', "HTM");
        $type = cot_import($types[$name], 'D', "INT");
        cfg_editor::config_edit($c, $name, $order, $title, $desc, $type, $default, $variants);
    }
    cot_message('updated_success');
    $cache && $cache->clear();
    cot_redirect(cot_url('admin', array('m' => 'other', 'p' => 'configeditor', 'n' => 'edit', 'c' => $c), '', true));
}
if ($a == 'delete') {
    cot_check_xg();
    $name = cot_import('rname', 'G', "ALP");
    cfg_editor::config_delete($c, $name);
    cot_message('deleted_success');
    $cache && $cache->clear();
    cot_redirect(cot_url('admin', array('m' => 'other', 'p' => 'configeditor', 'n' => 'edit', 'c' => $c), '', true));
}
$rows = cfg_editor::config_list($c);
foreach ($rows as $row) {
    $readonly = array();
    if ($row['config_donor'] != 'configeditor') {
        $readonly = array('readonly' => 'readonly', 'disabled' => 'disabled');
    }
    $t->assign(array('FORM_EDIT_NAME' => $row['config_name'], 'FORM_EDIT_TITLE' => cot_inputbox('text', 'rtitle[' . $row['config_name'] . ']', isset($L['cfg_' . $row['config_name']]) ? $L['cfg_' . $row['config_name']] : $row['config_text'], array('maxlength' => '255') + $readonly), 'FORM_EDIT_DESC' => cot_textarea('rdesc[' . $row['config_name'] . ']', isset($L['cfg_' . $row['config_name'] . '_hint']) ? $L['cfg_' . $row['config_name'] . '_hint'] : $row['config_desc'], 2, 60, array('maxlength' => '255') + $readonly), 'FORM_EDIT_ORDER' => cot_inputbox('text', 'rorder[' . $row['config_name'] . ']', $row['config_order'], array('maxlength' => '2') + $readonly), 'FORM_EDIT_VARIANTS' => cot_textarea('rvariants[' . $row['config_name'] . ']', $row['config_variants'], 2, 60, array('maxlength' => '255') + $readonly), 'FORM_EDIT_DEFAULT' => cot_textarea('rdefault[' . $row['config_name'] . ']', $row['config_default'], 2, 60, array('maxlength' => '255') + $readonly), 'FORM_EDIT_TYPE' => cot_selectbox($row['config_type'], 'rtype[' . $row['config_name'] . ']', array_keys($types_array), array_values($types_array), false, $readonly), 'FORM_EDIT_DELETE_URL' => $row['config_donor'] != 'configeditor' ? '' : cot_url('admin', array('m' => 'other', 'p' => 'configeditor', 'n' => 'edit', 'c' => $c, 'a' => 'delete', 'rname' => $row['config_name'], 'x' => $sys['xk']))));
    $t->parse('MAIN.ROW');
}
if (!count($rows)) {
    $t->parse('MAIN.NOROW');
}
$t->assign(array('FORM_EDIT_URL' => cot_url('admin', array('m' => 'other', 'p' => 'configeditor', 'n' => 'edit', 'a' => 'update', 'c' => $c)), 'FORM_ADD_URL' => cot_url('admin', array('m' => 'other', 'p' => 'configeditor', 'n' => 'edit', 'a' => 'add', 'c' => $c)), 'FORM_ADD_TITLE' => cot_inputbox('text', 'rtitle', '', array('maxlength' => '255')), 'FORM_ADD_NAME' => cot_inputbox('text', 'rname', '', array('size' => '20', 'maxlength' => '32')), 'FORM_ADD_DESC' => cot_textarea('rdesc', '', 2, 60), 'FORM_ADD_ORDER' => cot_inputbox('text', 'rorder', '', array('maxlength' => '2')), 'FORM_ADD_VARIANTS' => cot_textarea('rvariants', '', 2, 60), 'FORM_ADD_DEFAULT' => cot_textarea('rdefault', '', 2, 60), 'FORM_ADD_TYPE' => cot_selectbox(0, 'rtype', array_keys($types_array), array_values($types_array), false)));
cot_display_messages($t);
开发者ID:esclkm,项目名称:cot-configeditor,代码行数:31,代码来源:configeditor.admin.edit.php

示例12: cot_uriredir_redirect

/**
 * Checks URI-redir for xg before redirect
 *
 * @param string $uri Target URI
 */
function cot_uriredir_redirect($uri)
{
    if (mb_strpos($uri, '&x=') !== false || mb_strpos($uri, '?x=') !== false) {
        $uri = cot_url('index');
        // xg, not redirect to form action/GET or to command from GET
    }
    cot_redirect($uri);
}
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:13,代码来源:functions.php

示例13: empty

            case 0:
                $urlparams = empty($ritem['item_alias']) ? array('c' => $ritem['item_cat'], 'id' => $id) : array('c' => $ritem['item_cat'], 'al' => $ritem['item_alias']);
                $r_url = cot_url('folio', $urlparams, '', true);
                break;
            case 1:
                $r_url = cot_url('folio', 'm=preview&id=' . $id, '', true);
                break;
            case 2:
                $urlparams = empty($ritem['item_alias']) ? array('c' => $ritem['item_cat'], 'id' => $id) : array('c' => $ritem['item_cat'], 'al' => $ritem['item_alias']);
                $r_url = cot_url('folio', $urlparams, '', true);
                break;
        }
        cot_redirect($r_url);
        exit;
    } else {
        cot_redirect(cot_url('folio', 'm=add&c=' . $c, '', true));
    }
}
if (empty($ritem['item_cat']) && !empty($c)) {
    $ritem['item_cat'] = $c;
    $usr['isadmin'] = cot_auth('folio', $ritem['item_cat'], 'A');
}
if (empty($ritem['item_type']) && !empty($type)) {
    $ritem['item_type'] = $type;
}
$out['subtitle'] = $L['folio_add_work_title'];
$out['head'] .= $R['code_noindex'];
$sys['sublocation'] = $structure['folio'][$c]['title'];
$mskin = cot_tplfile(array('folio', 'add', $structure['folio'][$ritem['item_cat']]['tpl']));
/* === Hook === */
foreach (cot_getextplugins('folio.add.main') as $pl) {
开发者ID:Andreyjktl,项目名称:cot-freelance,代码行数:31,代码来源:folio.add.php

示例14: cot_breadcrumbs

$catpath_short = $c == 'all' || $c == 'system' || $c == 'unvalidated' || $c == 'saved_drafts' ? '' : cot_breadcrumbs($shortpath, $cfg['homebreadcrumb']);
/* === Hook === */
foreach (cot_getextplugins('page.list.query') as $pl) {
    include $pl;
}
/* ===== */
if (empty($sql_page_string)) {
    $where = array_filter($where);
    $where = $where ? 'WHERE ' . implode(' AND ', $where) : '';
    $sql_page_count = "SELECT COUNT(*) FROM {$db_pages} as p {$join_condition} LEFT JOIN {$db_users} AS u ON u.user_id=p.page_ownerid {$where}";
    $sql_page_string = "SELECT p.*, u.* {$join_columns}\n\t\tFROM {$db_pages} as p {$join_condition}\n\t\tLEFT JOIN {$db_users} AS u ON u.user_id=p.page_ownerid\n\t\t{$where}\n\t\tORDER BY {$orderby} LIMIT {$d}, " . $cfg['page']['maxrowsperpage'];
}
$totallines = $db->query($sql_page_count, $params)->fetchColumn();
$sqllist = $db->query($sql_page_string, $params);
if (!$cfg['easypagenav'] && $durl > 0 && $cfg['page']['maxrowsperpage'] > 0 && $durl % $cfg['page']['maxrowsperpage'] > 0 || $d > 0 && $d >= $totallines) {
    cot_redirect(cot_url('page', $list_url_path + array('dc' => $dcurl)));
}
$pagenav = cot_pagenav('page', $list_url_path + array('dc' => $dcurl), $d, $totallines, $cfg['page']['maxrowsperpage']);
$out['desc'] = htmlspecialchars(strip_tags($cat['desc']));
$out['subtitle'] = $cat['title'];
if (!empty($cfg['page']['cat_' . $c]['keywords'])) {
    $out['keywords'] = $cfg['page']['cat_' . $c]['keywords'];
}
if (!empty($cfg['page']['cat_' . $c]['metadesc'])) {
    $out['desc'] = $cfg['page']['cat_' . $c]['metadesc'];
}
if (!empty($cfg['page']['cat_' . $c]['metatitle'])) {
    $out['subtitle'] = $cfg['page']['cat_' . $c]['metatitle'];
}
// Building the canonical URL
$out['canonical_uri'] = cot_url('page', $pageurl_params);
开发者ID:Roffun,项目名称:Cotonti,代码行数:31,代码来源:page.list.php

示例15: switch

        switch ($rpage['page_state']) {
            case 0:
                $urlparams = empty($rpage['page_alias']) ? array('c' => $rpage['page_cat'], 'id' => $id) : array('c' => $rpage['page_cat'], 'al' => $rpage['page_alias']);
                $r_url = cot_url('page', $urlparams, '', true);
                break;
            case 1:
                $r_url = cot_url('message', 'msg=300', '', true);
                break;
            case 2:
                cot_message('page_savedasdraft');
                $r_url = cot_url('page', 'm=edit&id=' . $id, '', true);
                break;
        }
        cot_redirect($r_url);
    } else {
        cot_redirect(cot_url('page', 'm=add&c=' . $c, '', true));
    }
}
// Page cloning support
$clone = cot_import('clone', 'G', 'INT');
if ($clone > 0) {
    $rpage = $db->query("SELECT * FROM {$db_pages} WHERE page_id = ?", $clone)->fetch();
}
if (empty($rpage['page_cat']) && !empty($c)) {
    $rpage['page_cat'] = $c;
    $usr['isadmin'] = cot_auth('page', $rpage['page_cat'], 'A');
}
$out['subtitle'] = $L['page_addsubtitle'];
$out['head'] .= $R['code_noindex'];
$sys['sublocation'] = $structure['page'][$c]['title'];
$mskin = cot_tplfile(array('page', 'add', $structure['page'][$rpage['page_cat']]['tpl']));
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:31,代码来源:page.add.php


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