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


PHP cot_url函数代码示例

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


在下文中一共展示了cot_url函数的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: unsubscribeUrl

 /**
  * Урл для отписки
  * @return string
  */
 public function unsubscribeUrl()
 {
     $ret = cot_url('subscribe', array('m' => 'user', 'a' => 'unsubscribe', 'code' => $this->_data['unsubscr_code']));
     if (!cot_url_check($ret)) {
         $ret = cot::$cfg['mainurl'] . '/' . $ret;
     }
     return $ret;
 }
开发者ID:Alex300,项目名称:subscribe,代码行数:12,代码来源:Subscriber.php

示例3: form_structure_editor

function form_structure_editor($id)
{
    global $cot_structure, $cot_extrafields, $db_structure, $structure, $L, $R;
    $row = $cot_structure->category($id);
    if (empty($row)) {
        return null;
    }
    $ii++;
    $structure_id = $row['structure_id'];
    $structure_code = $row['structure_code'];
    $n = $row['structure_area'];
    $dozvil = $row['structure_count'] > 0 ? false : true;
    $is_module = cot_module_active($n);
    $t = new XTemplate(cot_tplfile('cateditor.admin.edit', 'plug'));
    $t->assign(array('ADMIN_STRUCTURE_HEADER' => $row['structure_title'], 'ADMIN_STRUCTURE_DEL_URL' => $dozvil ? cot_confirm_url(cot_url('admin', 'm=other&p=cateditor&n=' . $n . '&a=delete&id=' . $row['structure_id'] . '&' . cot_xg()), 'admin') : '', 'ADMIN_STRUCTURE_UPDATE_FORM_URL' => cot_url('admin', 'm=other&p=cateditor&n=' . $n . '&id=' . $structure_id . '&a=update'), 'ADMIN_STRUCTURE_ID' => $row['structure_id'], 'ADMIN_STRUCTURE_CODE' => cot_inputbox('text', 'rstructurecode', $structure_code, 'size="10" maxlength="255"'), 'ADMIN_STRUCTURE_PATHFIELDIMG' => mb_strpos($row['structure_path'], '.') == 0 ? $R['admin_icon_join1'] : $R['admin_icon_join2'], 'ADMIN_STRUCTURE_PATH' => cot_inputbox('text', 'rstructurepath', $row['structure_path'], 'size="12" maxlength="255"'), 'ADMIN_STRUCTURE_TPL' => cot_inputbox('text', 'rstructuretpl', $row['structure_tpl'], 'size="10" maxlength="255"'), 'ADMIN_STRUCTURE_TITLE' => cot_inputbox('text', 'rstructuretitle', $row['structure_title'], 'size="32" maxlength="255"'), 'ADMIN_STRUCTURE_DESC' => cot_inputbox('text', 'rstructuredesc', $row['structure_desc'], 'size="64" maxlength="255"'), 'ADMIN_STRUCTURE_ICON' => cot_inputbox('text', 'rstructureicon', $row['structure_icon'], 'size="64" maxlength="128"'), 'ADMIN_STRUCTURE_LOCKED' => cot_checkbox($row['structure_locked'], 'rstructurelocked'), 'ADMIN_STRUCTURE_COUNT' => $row['structure_count'], 'ADMIN_STRUCTURE_PARENT' => $cot_structure->select($cot_structure->get_parent($id), 'rstructureparent', true, 'disabled="disabled"'), 'ADMIN_STRUCTURE_JUMPTO_URL' => cot_url($n, 'c=' . $structure_code), 'ADMIN_STRUCTURE_RIGHTS_URL' => $is_module ? cot_url('admin', 'm=rightsbyitem&ic=' . $n . '&io=' . $structure_code) : '', 'ADMIN_STRUCTURE_ODDEVEN' => cot_build_oddeven($ii)));
    foreach ($cot_extrafields[$db_structure] as $exfld) {
        $exfld_val = cot_build_extrafields('rstructure' . $exfld['field_name'], $exfld, $row['structure_' . $exfld['field_name']]);
        $exfld_title = isset($L['structure_' . $exfld['field_name'] . '_title']) ? $L['structure_' . $exfld['field_name'] . '_title'] : $exfld['field_description'];
        $t->assign(array('ADMIN_STRUCTURE_' . strtoupper($exfld['field_name']) => $exfld_val, 'ADMIN_STRUCTURE_' . strtoupper($exfld['field_name']) . '_TITLE' => $exfld_title, 'ADMIN_STRUCTURE_EXTRAFLD' => $exfld_val, 'ADMIN_STRUCTURE_EXTRAFLD_TITLE' => $exfld_title));
        $t->parse('MAIN.EXTRAFLD');
    }
    require_once cot_incfile('configuration');
    $optionslist = cot_config_list($is_module ? 'module' : 'plug', $n, $structure_code);
    /* === Hook - Part1 : Set === */
    $extp = cot_getextplugins('admin.config.edit.loop');
    /* ===== */
    foreach ($optionslist as $row_c) {
        list($title, $hint) = cot_config_titles($row_c['config_name'], $row_c['config_text']);
        if ($row_c['config_type'] == COT_CONFIG_TYPE_SEPARATOR) {
            $t->assign('ADMIN_CONFIG_FIELDSET_TITLE', $title);
            $t->parse('MAIN.OPTIONS.CONFIG.ADMIN_CONFIG_ROW.ADMIN_CONFIG_FIELDSET_BEGIN');
        } else {
            $t->assign(array('ADMIN_CONFIG_ROW_CONFIG' => cot_config_input($row_c['config_name'], $row_c['config_type'], $row_c['config_value'], $row_c['config_variants']), 'ADMIN_CONFIG_ROW_CONFIG_TITLE' => $title, 'ADMIN_CONFIG_ROW_CONFIG_MORE_URL' => cot_url('admin', 'm=structure&n=' . $n . '&d=' . $durl . '&id=' . $structure_id . '&al=' . $structure_code . '&a=reset&v=' . $row_c['config_name'] . '&' . cot_xg()), 'ADMIN_CONFIG_ROW_CONFIG_MORE' => $hint));
            /* === Hook - Part2 : Include === */
            foreach ($extp as $pl) {
                include $pl;
            }
            /* ===== */
            $t->parse('MAIN.CONFIG.ADMIN_CONFIG_ROW.ADMIN_CONFIG_ROW_OPTION');
        }
        $t->parse('MAIN.CONFIG.ADMIN_CONFIG_ROW');
    }
    /* === Hook  === */
    foreach (cot_getextplugins('admin.config.edit.tags') as $pl) {
        include $pl;
    }
    /* ===== */
    $t->assign('CONFIG_HIDDEN', cot_inputbox('hidden', 'editconfig', $structure_code));
    $t->parse('MAIN.CONFIG');
    $t->parse('MAIN');
    return $t->text('MAIN');
}
开发者ID:esclkm,项目名称:cot-cateditor,代码行数:52,代码来源:cateditor.admin.edit.php

示例4: karma_gadget

function karma_gadget($user_id, $user_karma, $location, $location_id, $module = false)
{
    global $usr, $cfg, $karma_cache, $color;
    $color = explode(",", $cfg['plugin']['karma']['karma_color']);
    if (!$karma_cache[$user_id]) {
        $negative = !$cfg['plugin']['karma']['neg_rec'] && $usr['profile']['user_karma'] < 0 ? false : true;
        $k_add = cot_auth('plug', 'karma', 'W') && $usr['id'] > 0 && $location != 'self' ? true : "";
        $karmat = new XTemplate(cot_tplfile(array('karma', 'gadget'), true));
        $module = urlencode($module);
        $karmat->assign(array("PAGE_KARMA_D" => number_format($user_karma, '1', '.', ' '), "PAGE_KARMA_ADD" => $user_id != $usr['id'] && $k_add ? cot_url('plug', 'r=karma&act=change&lct=' . $location . '&value=add&fp=' . $location_id . '&mod=' . $module) : false, "PAGE_KARMA_DEL" => $user_id != $usr['id'] && $negative && $k_add ? cot_url('plug', 'r=karma&act=change&lct=' . $location . '&value=del&fp=' . $location_id . '&mod=' . $module) : false, "PAGE_KARMA_URL" => $k_add || $location == 'self' ? cot_url('plug', 'r=karma&act=show&fp=' . $user_id) : false, "PAGE_KARMA_MINI" => $cfg['plugin']['karma']['karma_com'] ? '' : 'karma_mini'));
        $karmat->parse('MAIN');
        $karma_cache[$user_id] = $karmat->text('MAIN');
    }
    return $karma_cache[$user_id];
}
开发者ID:Dr2005alex,项目名称:cot_karma,代码行数:15,代码来源:karma.functions.php

示例5: form_structure_new

function form_structure_new($parentid = '')
{
    global $cot_structure, $cot_extrafields, $db_structure, $structure, $L, $R;
    $t = new XTemplate(cot_tplfile('cateditor.admin.new', 'plug'));
    $t->assign(array('ADMIN_STRUCTURE_URL_FORM_ADD' => cot_url('admin', 'm=other&p=cateditor&n=' . $n . '&a=add'), 'ADMIN_STRUCTURE_CODE' => cot_inputbox('text', 'rstructurecode', null, 'size="16"'), 'ADMIN_STRUCTURE_PARENT' => $cot_structure->select($parentid, 'rstructureparent'), 'ADMIN_STRUCTURE_TITLE' => cot_inputbox('text', 'rstructuretitle', null, 'size="64" maxlength="100"'), 'ADMIN_STRUCTURE_DESC' => cot_inputbox('text', 'rstructuredesc', null, 'size="64" maxlength="255"'), 'ADMIN_STRUCTURE_ICON' => cot_inputbox('text', 'rstructureicon', null, 'size="64" maxlength="128"'), 'ADMIN_STRUCTURE_LOCKED' => cot_checkbox(null, 'rstructurelocked'), 'ADMIN_STRUCTURE_TPL' => cot_inputbox('text', 'rstructuretpl', null, 'size="10" maxlength="255"')));
    // Extra fields
    foreach ($cot_extrafields[$db_structure] as $exfld) {
        $exfld_val = cot_build_extrafields('rstructure' . $exfld['field_name'], $exfld, null);
        $exfld_title = isset($L['structure_' . $exfld['field_name'] . '_title']) ? $L['structure_' . $exfld['field_name'] . '_title'] : $exfld['field_description'];
        $t->assign(array('ADMIN_STRUCTURE_' . strtoupper($exfld['field_name']) => $exfld_val, 'ADMIN_STRUCTURE_' . strtoupper($exfld['field_name']) . '_TITLE' => $exfld_title, 'ADMIN_STRUCTURE_EXTRAFLD' => $exfld_val, 'ADMIN_STRUCTURE_EXTRAFLD_TITLE' => $exfld_title));
        $t->parse('MAIN.EXTRAFLD');
    }
    $t->parse('MAIN');
    return $t->text('MAIN');
}
开发者ID:esclkm,项目名称:cot-cateditor,代码行数:15,代码来源:cateditor.admin.new.php

示例6: cot_i18n_build_catpath

/**
 * Builds internationalized category path
 *
 * @param string $area Area code
 * @param string $cat Category code
 * @param string $locale Locale code
 * @return string
 */
function cot_i18n_build_catpath($area, $cat, $locale)
{
    global $structure, $cfg, $i18n_structure;
    $tmp = array();
    $pathcodes = explode('.', $structure[$area][$cat]['path']);
    foreach ($pathcodes as $k => $x) {
        if ($x != 'system') {
            if (empty($i18n_structure[$x][$locale]['title'])) {
                $title = $structure[$area][$x]['title'];
                $url = cot_url($area, 'c=' . $x);
            } else {
                $title = $i18n_structure[$x][$locale]['title'];
                $url = cot_url($area, 'c=' . $x . '&l=' . $locale);
            }
            $tmp[] = array($url, $title);
        }
    }
    return $tmp;
}
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:27,代码来源:i18n.functions.php

示例7: cot_get_paytop

function cot_get_paytop($area = '', $count = 0, $order = "s.service_id DESC")
{
    global $db, $cfg, $sys, $db_payments_services, $db_users;
    $pt_cfg = cot_cfg_paytop();
    if ($count == 0) {
        $count = $pt_cfg[$area]['count'];
    }
    if (empty($area) && !isset($pt_cfg[$area]['cost'])) {
        return false;
    }
    $t1 = new XTemplate(cot_tplfile(array('paytop', 'list', $area), 'plug'));
    $paytopcount = $db->query("SELECT COUNT(*) FROM {$db_payments_services} as s\n\t\tLEFT JOIN {$db_users} AS u ON u.user_id=s.service_userid\n\t\tWHERE u.user_id>0 AND s.service_area='paytop." . $db->prep($area) . "' AND service_expire > " . $sys['now'])->fetchColumn();
    $paytops = $db->query("SELECT * FROM {$db_payments_services} as s\n\t\tLEFT JOIN {$db_users} AS u ON u.user_id=s.service_userid\n\t\tWHERE u.user_id>0 AND s.service_area='paytop." . $db->prep($area) . "' AND service_expire > " . $sys['now'] . " ORDER BY {$order} LIMIT " . $count)->fetchAll();
    $jj = 0;
    foreach ($paytops as $tur) {
        $jj++;
        $t1->assign(cot_generate_usertags($tur, 'TOP_ROW_'));
        $t1->assign(array('TOP_ROW_JJ' => $jj, 'TOP_ROW_EXPIRE' => $tur['service_expire']));
        $t1->parse('MAIN.TOP_ROW');
    }
    $t1->assign(array('PAYTOP_BUY_URL' => cot_url('plug', 'e=paytop&area=' . $area), 'PAYTOP_COUNT' => $paytopcount));
    $t1->parse('MAIN');
    return $t1->text('MAIN');
}
开发者ID:Andreyjktl,项目名称:cot-freelance,代码行数:24,代码来源:paytop.functions.php

示例8: cot_sbr_sendpost

function cot_sbr_sendpost($id, $text, $to, $from = 0, $type = '', $mail = false, $rfiles = array())
{
    global $db, $db_sbr_posts, $db_sbr, $db_sbr_files, $db_users, $sys, $cfg, $L, $R;
    $rpost['post_sid'] = $id;
    $rpost['post_text'] = $text;
    $rpost['post_date'] = $sys['now'];
    $rpost['post_from'] = $from;
    $rpost['post_to'] = $to;
    $rpost['post_type'] = $type;
    /* === Hook === */
    foreach (cot_getextplugins('sbr.post.add.query') as $pl) {
        include $pl;
    }
    /* ===== */
    if ($db->insert($db_sbr_posts, $rpost)) {
        $postid = $db->lastInsertId();
        $sbr_path = $cfg['plugin']['sbr']['filepath'] . '/' . $id . '/';
        if (!file_exists($sbr_path)) {
            mkdir($sbr_path);
            @chmod($sbr_path, $cfg['dir_perms']);
        }
        for ($j = 0; $j < 10; $j++) {
            if ($rfiles['size'][$j] > 0 && $rfiles['error'][$j] == 0) {
                $u_tmp_name_file = $rfiles['tmp_name'][$j];
                $u_type_file = $rfiles['type'][$j];
                $u_name_file = $rfiles['name'][$j];
                $u_size_file = $rfiles['size'][$j];
                $u_name_file = str_replace("\\'", '', $u_name_file);
                $u_name_file = trim(str_replace("\"", '', $u_name_file));
                $dotpos = strrpos($u_name_file, ".") + 1;
                $f_extension = substr($u_name_file, $dotpos, 5);
                if (!empty($u_tmp_name_file)) {
                    $fcheck = cot_file_check($u_tmp_name_file, $u_name_file, $f_extension);
                    if ($fcheck == 1) {
                        if (in_array($f_extension, explode(',', $cfg['plugin']['sbr']['extensions']))) {
                            $u_newname_file = $postid . "_" . md5(uniqid(rand(), true)) . "." . $f_extension;
                            $file = $sbr_path . $u_newname_file;
                            move_uploaded_file($u_tmp_name_file, $file);
                            @chmod($file, 0766);
                            $rfile['file_sid'] = $id;
                            $rfile['file_url'] = $file;
                            $rfile['file_title'] = $u_name_file;
                            $rfile['file_area'] = 'post';
                            $rfile['file_code'] = $postid;
                            $rfile['file_ext'] = $f_extension;
                            $rfile['file_size'] = floor($u_size_file / 1024);
                            $db->insert($db_sbr_files, $rfile);
                        }
                    }
                }
            }
        }
        // Отправка сообщения на почту!
        if ($mail) {
            $sbr = $db->query("SELECT * FROM {$db_sbr} WHERE sbr_id=" . $id)->fetch();
            if (!empty($to)) {
                $recipients[] = $db->query("SELECT * FROM {$db_users} WHERE user_id=" . $to)->fetch();
            } else {
                $recipients[] = $db->query("SELECT * FROM {$db_users} WHERE user_id=" . $sbr['sbr_performer'])->fetch();
                $recipients[] = $db->query("SELECT * FROM {$db_users} WHERE user_id=" . $sbr['sbr_employer'])->fetch();
            }
            if (!empty($from)) {
                $sender = $db->query("SELECT * FROM {$db_users} WHERE user_id=" . $from)->fetch();
            }
            foreach ($recipients as $recipient) {
                if (!empty($from)) {
                    $rsubject = cot_rc($L['sbr_mail_posts_header'], array('sbr_id' => $id, 'sbr_title' => $sbr['sbr_title']));
                    $rbody = cot_rc($L['sbr_mail_posts_body'], array('user_name' => $recipient['user_name'], 'sender_name' => $sender['user_name'], 'post_text' => $text, 'sitename' => $cfg['maintitle'], 'link' => COT_ABSOLUTE_URL . cot_url('sbr', "id=" . $id, '', true)));
                } else {
                    $rsubject = cot_rc($L['sbr_mail_notification_header'], array('sbr_id' => $id, 'sbr_title' => $sbr['sbr_title']));
                    $rbody = cot_rc($L['sbr_mail_notification_body'], array('user_name' => $recipient['user_name'], 'post_text' => $text, 'sitename' => $cfg['maintitle'], 'link' => COT_ABSOLUTE_URL . cot_url('sbr', "id=" . $id, '', true)));
                }
                cot_mail($recipient['user_email'], $rsubject, $rbody, '', false, null, true);
            }
        }
        /* === Hook === */
        foreach (cot_getextplugins('sbr.post.add.done') as $pl) {
            include $pl;
        }
        /* ===== */
        return $db->lastInsertId();
    }
    return false;
}
开发者ID:cotemplate,项目名称:cot-sbr,代码行数:84,代码来源:sbr.functions.php

示例9: cot_inputbox

         /* ===== */
         $t->assign('CONFIG_HIDDEN', cot_inputbox('hidden', 'editconfig', $structure_code));
         $t->parse('MAIN.OPTIONS.CONFIG');
     }
     $t->parse($id || !empty($al) ? 'MAIN.OPTIONS' : 'MAIN.DEFAULT.ROW');
 }
 if (!$id && empty($al)) {
     $t->assign(array('ADMIN_STRUCTURE_PAGINATION_PREV' => $pagenav['prev'], 'ADMIN_STRUCTURE_PAGNAV' => $pagenav['main'], 'ADMIN_STRUCTURE_PAGINATION_NEXT' => $pagenav['next'], 'ADMIN_STRUCTURE_TOTALITEMS' => $totalitems, 'ADMIN_STRUCTURE_COUNTER_ROW' => $ii));
     $t->parse('MAIN.DEFAULT');
     // flush post buffer if it contains Update Table data
     $uri = str_replace('&_ajax=1', '', $_SERVER['REQUEST_URI']);
     $hash = md5($uri);
     if (is_array($_SESSION['cot_buffer'][$hash]['rstructurecode'])) {
         unset($_SESSION['cot_buffer'][$hash]);
     }
     $t->assign(array('ADMIN_STRUCTURE_URL_FORM_ADD' => cot_url('admin', 'm=structure&n=' . $n . '&mode=' . $mode . '&a=add&d=' . $durl), 'ADMIN_STRUCTURE_CODE' => cot_inputbox('text', 'rstructurecode', null, 'size="16"'), 'ADMIN_STRUCTURE_PATH' => cot_inputbox('text', 'rstructurepath', null, 'size="16" maxlength="16"'), 'ADMIN_STRUCTURE_TITLE' => cot_inputbox('text', 'rstructuretitle', null, 'size="64" maxlength="100"'), 'ADMIN_STRUCTURE_DESC' => cot_inputbox('text', 'rstructuredesc', null, 'size="64" maxlength="255"'), 'ADMIN_STRUCTURE_ICON' => cot_inputbox('text', 'rstructureicon', null, 'size="64" maxlength="128"'), 'ADMIN_STRUCTURE_LOCKED' => cot_checkbox(null, 'rstructurelocked'), 'ADMIN_STRUCTURE_TPLMODE' => cot_radiobox(null, 'rtplmode', array('1', '2', '3'), array($L['adm_tpl_empty'], $L['adm_tpl_parent'], $L['adm_tpl_forced']), '', '<br />')));
     // Extra fields
     foreach ($cot_extrafields[$db_structure] as $exfld) {
         $exfld_val = cot_build_extrafields('rstructure' . $exfld['field_name'], $exfld, null);
         $exfld_title = isset($L['structure_' . $exfld['field_name'] . '_title']) ? $L['structure_' . $exfld['field_name'] . '_title'] : $exfld['field_description'];
         $t->assign(array('ADMIN_STRUCTURE_' . strtoupper($exfld['field_name']) => $exfld_val, 'ADMIN_STRUCTURE_' . strtoupper($exfld['field_name']) . '_TITLE' => $exfld_title, 'ADMIN_STRUCTURE_EXTRAFLD' => $exfld_val, 'ADMIN_STRUCTURE_EXTRAFLD_TITLE' => $exfld_title));
         $t->parse('MAIN.NEWCAT.EXTRAFLD');
     }
     $t->parse('MAIN.NEWCAT');
 }
 cot_display_messages($t);
 /* === Hook  === */
 foreach (cot_getextplugins('admin.structure.tags') as $pl) {
     include $pl;
 }
 /* ===== */
开发者ID:Logodeveloper,项目名称:valencia,代码行数:31,代码来源:admin.structure.php

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

示例11: foreach

foreach (cot_getextplugins('market.list.query') as $pl) {
    include $pl;
}
/* ===== */
$t = new XTemplate($mskin);
$where = $where ? 'WHERE ' . implode(' AND ', $where) : '';
$order = $order ? 'ORDER BY ' . implode(', ', $order) : '';
$totalitems = $db->query("SELECT COUNT(*) FROM {$db_market} AS m {$join_condition} \n\tLEFT JOIN {$db_users} AS u ON u.user_id=m.item_userid\n\t" . $where . "")->fetchColumn();
$sqllist = $db->query("SELECT m.*, u.* {$join_columns} \n\tFROM {$db_market} AS m {$join_condition}\n\tLEFT JOIN {$db_users} AS u ON u.user_id=m.item_userid \n\t" . $where . "\n\t" . $order . "\n\tLIMIT {$d}, " . $maxrowsperpage);
$pagenav = cot_pagenav('market', $list_url_path, $d, $totalitems, $maxrowsperpage);
$catpatharray[] = array(cot_url('market'), $L['market']);
if (!empty($c)) {
    $catpatharray = array_merge($catpatharray, cot_structure_buildpath('market', $c));
}
$catpath = cot_breadcrumbs($catpatharray, $cfg['homebreadcrumb'], true);
$t->assign(array("SEARCH_ACTION_URL" => cot_url('market', '', '', true), "SEARCH_SQ" => cot_inputbox('text', 'sq', htmlspecialchars($sq), 'class="schstring"'), "SEARCH_CAT" => cot_market_selectcat($c, 'c'), "SEARCH_SORTER" => cot_selectbox($sort, "sort", array('', 'costasc', 'costdesc'), array($L['market_mostrelevant'], $L['market_costasc'], $L['market_costdesc']), false), "PAGENAV_PAGES" => $pagenav['main'], "PAGENAV_PREV" => $pagenav['prev'], "PAGENAV_NEXT" => $pagenav['next'], "PAGENAV_COUNT" => $totalitems, "CATALOG" => cot_build_structure_market_tree('', array($c), 0), "BREADCRUMBS" => $catpath, "CATTITLE" => !empty($c) ? $structure['market'][$c]['title'] : '', "CATDESC" => !empty($c) ? $structure['market'][$c]['desc'] : ''));
foreach ($cot_extrafields[$db_market] as $exfld) {
    $uname = strtoupper($exfld['field_name']);
    $exfld_val = cot_build_extrafields($exfld['field_name'], $exfld, $shfld[$exfld['field_name']]);
    $exfld_title = isset($L['projects_' . $exfld['field_name'] . '_title']) ? $L['projects_' . $exfld['field_name'] . '_title'] : $exfld['field_description'];
    $t->assign(array('SEARCH_' . $uname => $exfld_val, 'SEARCH_' . $uname . '_TITLE' => $exfld_title));
}
/* === Hook === */
foreach (cot_getextplugins('market.list.search.tags') as $pl) {
    include $pl;
}
/* ===== */
$sqllist_rowset = $sqllist->fetchAll();
$sqllist_idset = array();
foreach ($sqllist_rowset as $item) {
    $sqllist_idset[$item['item_id']] = $item['item_alias'];
开发者ID:Andreyjktl,项目名称:cot-freelance,代码行数:31,代码来源:market.list.php

示例12: defined

 * @author CMSWorks Team
 * @copyright Copyright (c) CMSWorks.ru, littledev.ru
 * @license BSD
 *  */
defined('COT_CODE') or die('Wrong URL.');
if ($cfg['plugin']['tagslance']['projects']) {
    require_once cot_incfile('tags', 'plug');
    if (cot_plugin_active('i18n') && $i18n_enabled && $i18n_notmain) {
        $tags_extra = array('tag_locale' => $i18n_locale);
    } else {
        $tags_extra = null;
    }
    $item_id = $item['item_id'];
    if (!isset($tags_rowset_list)) {
        $tags_rowset_list = cot_tag_list(array_keys($sqllist_idset), 'projects', $tags_extra);
    }
    $tags = isset($tags_rowset_list[$item_id]) ? $tags_rowset_list[$item_id] : array();
    if (count($tags) > 0) {
        $tag_i = 0;
        foreach ($tags as $tag) {
            $tag_u = $cfg['plugin']['tags']['translit'] ? cot_translit_encode($tag) : $tag;
            $tl = $lang != 'en' && $tag_u != $tag ? 1 : null;
            $t_pr->assign(array('PRJ_ROW_TAGS_ROW_TAG' => $cfg['plugin']['tags']['title'] ? htmlspecialchars(cot_tag_title($tag)) : htmlspecialchars($tag), 'PRJ_ROW_TAGS_ROW_URL' => cot_url('plug', array('e' => 'tags', 'a' => 'projects', 't' => str_replace(' ', '-', $tag_u), 'tl' => $tl))));
            $t_pr->parse('PROJECTS.PRJ_ROWS.PRJ_ROW_TAGS_ROW');
            $tag_i++;
        }
    } else {
        $t_pr->assign(array('PRJ_ROW_NO_TAGS' => $L['tags_Tag_cloud_none']));
        $t_pr->parse('PROJECTS.PRJ_ROWS.PRJ_ROW_NO_TAGS');
    }
}
开发者ID:Andreyjktl,项目名称:cot-freelance,代码行数:31,代码来源:tagslance.projects.index.loop.php

示例13: cot_tplfile

if (empty($ritem['item_type']) && !empty($type)) {
    $ritem['item_type'] = $type;
}
$out['subtitle'] = $L['projects_add_project_title'];
$out['head'] .= $R['code_noindex'];
$sys['sublocation'] = $structure['projects'][$c]['title'];
$mskin = cot_tplfile(array('projects', 'add', $structure['projects'][$ritem['item_cat']]['tpl']));
/* === Hook === */
foreach (cot_getextplugins('projects.add.main') as $pl) {
    include $pl;
}
/* ===== */
$t = new XTemplate($mskin);
// Error and message handling
cot_display_messages($t);
$t->assign(array("PRJADD_FORM_SEND" => cot_url('projects', 'm=add&c=' . $c . '&type=' . $type . '&a=add'), "PRJADD_FORM_CAT" => cot_selectbox_structure('projects', $ritem['item_cat'], 'rcat'), "PRJADD_FORM_CATTITLE" => !empty($c) ? $structure['projects'][$c]['title'] : '', "PRJADD_FORM_TYPE" => is_array($projects_types) ? cot_selectbox($ritem['item_type'] ? $ritem['item_type'] : $cfg['projects']['default_type'], 'rtype', array_keys($projects_types), array_values($projects_types)) : 'empty', "PRJADD_FORM_TYPETITLE" => is_array($projects_types) && !empty($type) ? $projects_types[$type] : '', "PRJADD_FORM_TITLE" => cot_inputbox('text', 'rtitle', $ritem['item_title'], 'size="56"'), "PRJADD_FORM_ALIAS" => cot_inputbox('text', 'ralias', $ritem['item_alias'], array('size' => '32', 'maxlength' => '255')), "PRJADD_FORM_TEXT" => cot_textarea('rtext', $ritem['item_text'], 10, 60, 'id="formtext"', $prjeditor ? 'input_textarea_' . $prjeditor : ''), "PRJADD_FORM_COST" => cot_inputbox('text', 'rcost', $ritem['item_cost'], 'size="10"'), "PRJADD_FORM_PARSER" => cot_selectbox($cfg['projects']['parser'], 'rparser', $parser_list, $parser_list, false)));
// Extra fields
foreach ($cot_extrafields[$db_projects] as $exfld) {
    $uname = strtoupper($exfld['field_name']);
    $exfld_val = cot_build_extrafields('ritem' . $exfld['field_name'], $exfld, $ritem['item_' . $exfld['field_name']]);
    $exfld_title = isset($L['projects_' . $exfld['field_name'] . '_title']) ? $L['projects_' . $exfld['field_name'] . '_title'] : $exfld['field_description'];
    $t->assign(array('PRJADD_FORM_' . $uname => $exfld_val, 'PRJADD_FORM_' . $uname . '_TITLE' => $exfld_title, 'PRJADD_FORM_EXTRAFLD' => $exfld_val, 'PRJADD_FORM_EXTRAFLD_TITLE' => $exfld_title));
    $t->parse('MAIN.EXTRAFLD');
}
/* === Hook === */
foreach (cot_getextplugins('projects.add.tags') as $pl) {
    include $pl;
}
/* ===== */
$t->parse('MAIN');
$module_body = $t->text('MAIN');
开发者ID:ASDAFF,项目名称:cot-freelance,代码行数:31,代码来源:projects.add.php

示例14: defined

<?php

/**
 * Administration panel - PHP Infos
 *
 * @package Cotonti
 * @copyright (c) Cotonti Team
 * @license https://github.com/Cotonti/Cotonti/blob/master/License.txt
 */
defined('COT_CODE') && defined('COT_ADMIN') or die('Wrong URL.');
list($usr['auth_read'], $usr['auth_write'], $usr['isadmin']) = cot_auth('admin', 'a');
cot_block($usr['auth_read']);
$t = new XTemplate(cot_tplfile('admin.infos', 'core'));
$adminpath[] = array(cot_url('admin', 'm=other'), $L['Other']);
$adminpath[] = array(cot_url('admin', 'm=infos'), $L['adm_infos']);
$adminhelp = $L['adm_help_versions'];
$adminsubtitle = $L['adm_infos'];
/* === Hook === */
foreach (cot_getextplugins('admin.infos.first') as $pl) {
    include $pl;
}
/* ===== */
@error_reporting(0);
$t->assign(array('ADMIN_INFOS_PHPVER' => function_exists('phpversion') ? phpversion() : $L['adm_help_config'], 'ADMIN_INFOS_ZENDVER' => function_exists('zend_version') ? zend_version() : $L['adm_help_config'], 'ADMIN_INFOS_INTERFACE' => function_exists('php_sapi_name') ? php_sapi_name() : $L['adm_help_config'], 'ADMIN_INFOS_CACHEDRIVERS' => is_array($cot_cache_drivers) ? implode(', ', $cot_cache_drivers) : '', 'ADMIN_INFOS_OS' => function_exists('php_uname') ? php_uname() : $L['adm_help_config'], 'ADMIN_INFOS_DATE' => cot_date('datetime_medium', $sys['now'], false), 'ADMIN_INFOS_GMDATE' => gmdate('Y-m-d H:i'), 'ADMIN_INFOS_GMTTIME' => $usr['gmttime'], 'ADMIN_INFOS_USRTIME' => $usr['localtime'], 'ADMIN_INFOS_TIMETEXT' => $usr['timetext']));
/* === Hook === */
foreach (cot_getextplugins('admin.infos.tags') as $pl) {
    include $pl;
}
/* ===== */
$t->parse('MAIN');
$adminmain = $t->text('MAIN');
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:31,代码来源:admin.infos.php

示例15: defined

    include $pl;
}
/* ===== */
$out['head'] .= $R['code_noindex'];
$out['subtitle'] = $title;
require_once $cfg['system_dir'] . '/header.php';
$tpl_type = defined('COT_ADMIN') ? 'core' : 'module';
$t = new XTemplate(cot_tplfile('message', $tpl_type));
if (COT_AJAX) {
    $t->assign('AJAX_MODE', true);
}
$errmsg = $title;
$title .= $usr['isadmin'] ? ' (#' . $msg . ')' : '';
$t->assign('MESSAGE_TITLE', $title);
$t->assign('MESSAGE_BODY', $body);
if ($msg == '920') {
    $confirm_no_url = preg_match("/^.+" . preg_quote($sys['domain'] . "/"), $_SERVER['HTTP_REFERER']) ? str_replace('&', '&amp;', $_SERVER['HTTP_REFERER']) : cot_url('index');
    if (preg_match('#[ "\':]#', base64_decode($redirect))) {
        $redirect = '';
    }
    $t->assign(array('MESSAGE_CONFIRM_YES' => base64_decode($redirect), 'MESSAGE_CONFIRM_NO' => $confirm_no_url));
    $t->parse('MAIN.MESSAGE_CONFIRM');
}
/* === Hook === */
foreach (cot_getextplugins('message.tags') as $pl) {
    include $pl;
}
/* ===== */
$t->parse('MAIN');
$t->out('MAIN');
require_once $cfg['system_dir'] . '/footer.php';
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:31,代码来源:message.php


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