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


PHP cot_block函数代码示例

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


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

示例1: indexAction

 public function indexAction()
 {
     global $structure;
     if (!cot_module_active('rss')) {
         cot_die_message(404, TRUE);
     }
     $c = cot_import('c', 'G', 'TXT');
     if (!empty($c)) {
         if (!isset($structure['advboard'][$c])) {
             cot_die_message(404, TRUE);
         }
         list(cot::$usr['auth_read'], cot::$usr['auth_write'], cot::$usr['isadmin']) = cot_auth('advboard', $c);
         cot_block(cot::$usr['auth_read']);
     }
     $rss_title = cot::$L['advboard_rss_feed'] . cot::$cfg['maintitle'];
     $rss_link = cot::$cfg['mainurl'];
     $rss_description = cot::$cfg['subtitle'];
     $domain = cot::$sys['domain'];
     $condition = array(array('state', advboard_model_Advert::PUBLISHED), array('begin', cot::$sys['now'], '<='), array('SQL', "expire = 0 OR expire > " . cot::$sys['now']));
     if (!empty($c)) {
         $rss_title = cot::$L['advboard_rss_feed'] . $structure['advboard'][$c]['title'] . ' - ' . cot::$cfg['maintitle'];
         $condition[] = array('category', $c);
     }
     $advertisement = advboard_model_Advert::find($condition, cot::$cfg['rss']['rss_maxitems'], 0, array(array('sort', 'desc')));
     $t = new XTemplate(cot_tplfile('rss'));
     $now = cot::$sys['now'];
     $now += cot::$usr['timezone'] * 3600;
     $t->assign(array('RSS_ENCODING' => cot::$cfg['rss']['rss_charset'], 'RSS_TITLE' => htmlspecialchars($rss_title), 'RSS_LINK' => $rss_link, 'RSS_LANG' => cot::$cfg['defaultlang'], 'RSS_DESCRIPTION' => htmlspecialchars($rss_description), 'RSS_DATE' => $this->fixPubDate(date("r", $now))));
     if (!empty($advertisement)) {
         foreach ($advertisement as $advert) {
             $url = $advert->url;
             if (!cot_url_check($url)) {
                 $url = COT_ABSOLUTE_URL . $url;
             }
             $date = '';
             if (!empty($advert->created)) {
                 $date = strtotime($advert->created);
                 $date += cot::$usr['timezone'] * 3600;
                 $date = date('r', $date);
                 $date = $this->fixPubDate($date);
             }
             $text = $advert->text;
             $textlength = intval(cot::$cfg['rss']['rss_pagemaxsymbols']);
             if ($textlength > 0 && mb_strlen($text) > $textlength) {
                 $text = cot_string_truncate($text, $textlength, true, false, cot::$R['advboard_cuttext']);
             }
             $t->assign(array('RSS_ROW_TITLE' => htmlspecialchars($advert->title), 'RSS_ROW_DESCRIPTION' => $this->convertRelativeUrls($text), 'RSS_ROW_DATE' => $date, 'RSS_ROW_LINK' => $url));
             $t->parse('MAIN.ITEM_ROW');
         }
     }
     $t->parse('MAIN');
     //        ob_clean();
     header('Content-type: text/xml; charset=UTF-8');
     echo $t->text('MAIN');
     exit;
 }
开发者ID:ASDAFF,项目名称:advboard,代码行数:56,代码来源:Rss.php

示例2: cot_url

            case 1:
                $r_url = cot_url('message', 'msg=300', '', true);
                break;
            case 2:
                cot_message($L['page_savedasdraft']);
                $r_url = cot_url('page', 'm=edit&id=' . $id, '', true);
                break;
        }
        cot_redirect($r_url);
    } else {
        cot_redirect(cot_url('page', "m=edit&id={$id}", '', true));
    }
}
$pag = $row_page;
$pag['page_status'] = cot_page_status($pag['page_state'], $pag['page_begin'], $pag['page_expire']);
cot_block($usr['isadmin'] || $usr['auth_write'] && $usr['id'] == $pag['page_ownerid']);
$out['subtitle'] = $L['page_edittitle'];
$out['head'] .= $R['code_noindex'];
$sys['sublocation'] = $structure['page'][$pag['page_cat']]['title'];
$mskin = cot_tplfile(array('page', 'edit', $structure['page'][$pag['page_cat']]['tpl']));
/* === Hook === */
foreach (cot_getextplugins('page.edit.main') as $pl) {
    include $pl;
}
/* ===== */
require_once $cfg['system_dir'] . '/header.php';
$t = new XTemplate($mskin);
$pageedit_array = array('PAGEEDIT_PAGETITLE' => $L['page_edittitle'], 'PAGEEDIT_SUBTITLE' => $L['page_editsubtitle'], 'PAGEEDIT_FORM_SEND' => cot_url('page', "m=edit&a=update&id=" . $pag['page_id']), 'PAGEEDIT_FORM_ID' => $pag['page_id'], 'PAGEEDIT_FORM_STATE' => $pag['page_state'], 'PAGEEDIT_FORM_STATUS' => $pag['page_status'], 'PAGEEDIT_FORM_LOCALSTATUS' => $L['page_status_' . $pag['page_status']], 'PAGEEDIT_FORM_CAT' => cot_selectbox_structure('page', $pag['page_cat'], 'rpagecat'), 'PAGEEDIT_FORM_CAT_SHORT' => cot_selectbox_structure('page', $pag['page_cat'], 'rpagecat', $c), 'PAGEEDIT_FORM_KEYWORDS' => cot_inputbox('text', 'rpagekeywords', $pag['page_keywords'], array('size' => '32', 'maxlength' => '255')), 'PAGEEDIT_FORM_METATITLE' => cot_inputbox('text', 'rpagemetatitle', $pag['page_metatitle'], array('size' => '64', 'maxlength' => '255')), 'PAGEEDIT_FORM_METADESC' => cot_textarea('rpagemetadesc', $pag['page_metadesc'], 2, 64, array('maxlength' => '255')), 'PAGEEDIT_FORM_ALIAS' => cot_inputbox('text', 'rpagealias', $pag['page_alias'], array('size' => '32', 'maxlength' => '255')), 'PAGEEDIT_FORM_TITLE' => cot_inputbox('text', 'rpagetitle', $pag['page_title'], array('size' => '64', 'maxlength' => '255')), 'PAGEEDIT_FORM_DESC' => cot_textarea('rpagedesc', $pag['page_desc'], 2, 64, array('maxlength' => '255')), 'PAGEEDIT_FORM_AUTHOR' => cot_inputbox('text', 'rpageauthor', $pag['page_author'], array('size' => '24', 'maxlength' => '100')), 'PAGEEDIT_FORM_DATE' => cot_selectbox_date($pag['page_date'], 'long', 'rpagedate') . ' ' . $usr['timetext'], 'PAGEEDIT_FORM_DATENOW' => cot_checkbox(0, 'rpagedatenow'), 'PAGEEDIT_FORM_BEGIN' => cot_selectbox_date($pag['page_begin'], 'long', 'rpagebegin') . ' ' . $usr['timetext'], 'PAGEEDIT_FORM_EXPIRE' => cot_selectbox_date($pag['page_expire'], 'long', 'rpageexpire') . ' ' . $usr['timetext'], 'PAGEEDIT_FORM_UPDATED' => cot_date('datetime_full', $pag['page_updated']) . ' ' . $usr['timetext'], 'PAGEEDIT_FORM_FILE' => cot_selectbox($pag['page_file'], 'rpagefile', range(0, 2), array($L['No'], $L['Yes'], $L['Members_only']), false), 'PAGEEDIT_FORM_URL' => cot_inputbox('text', 'rpageurl', $pag['page_url'], array('size' => '56', 'maxlength' => '255')), 'PAGEEDIT_FORM_SIZE' => cot_inputbox('text', 'rpagesize', $pag['page_size'], array('size' => '56', 'maxlength' => '255')), 'PAGEEDIT_FORM_TEXT' => cot_textarea('rpagetext', $pag['page_text'], 24, 120, '', 'input_textarea_editor'), 'PAGEEDIT_FORM_DELETE' => cot_radiobox(0, 'rpagedelete', array(1, 0), array($L['Yes'], $L['No'])), 'PAGEEDIT_FORM_PARSER' => cot_selectbox($pag['page_parser'], 'rpageparser', cot_get_parsers(), cot_get_parsers(), false));
if ($usr['isadmin']) {
    $pageedit_array += array('PAGEEDIT_FORM_OWNERID' => cot_inputbox('text', 'rpageownerid', $pag['page_ownerid'], array('size' => '24', 'maxlength' => '24')), 'PAGEEDIT_FORM_PAGECOUNT' => cot_inputbox('text', 'rpagecount', $pag['page_count'], array('size' => '8', 'maxlength' => '8')), 'PAGEEDIT_FORM_FILECOUNT' => cot_inputbox('text', 'rpagefilecount', $pag['page_filecount'], array('size' => '8', 'maxlength' => '8')));
}
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:31,代码来源:page.edit.php

示例3: defined

/* ====================
[BEGIN_COT_EXT]
Hooks=tools
[END_COT_EXT]
==================== */
/**
 * Trashcan interface
 *
 * @package TrashCan
 * @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('plug', 'trashcan');
cot_block($usr['isadmin']);
require_once cot_incfile('users', 'module');
cot_module_active('page') && (require_once cot_incfile('page', 'module'));
cot_module_active('forums') && (require_once cot_incfile('forums', 'module'));
$cfg['comments'] && (require_once cot_incfile('comments', 'plug'));
require_once cot_incfile('trashcan', 'plug');
require_once cot_langfile('trashcan', 'plug');
$adminhelp = $L['adm_help_trashcan'];
$adminsubtitle = $L['Trashcan'];
$id = cot_import('id', 'G', 'INT');
$maxperpage = $cfg['maxrowsperpage'] && is_numeric($cfg['maxrowsperpage']) && $cfg['maxrowsperpage'] > 0 ? $cfg['maxrowsperpage'] : 15;
list($pg, $d, $durl) = cot_import_pagenav('d', $maxperpage);
$info = $a == 'info' ? 1 : 0;
/* === Hook === */
foreach (cot_getextplugins('trashcan.admin.first') as $pl) {
    include $pl;
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:30,代码来源:trashcan.admin.php

示例4: defined

 * @version 2.5.2
 * @author CMSWorks Team
 * @copyright Copyright (c) CMSWorks.ru, littledev.ru
 * @license BSD
 */
defined('COT_CODE') or die('Wrong URL');
$id = cot_import('id', 'G', 'INT');
$r = cot_import('r', 'G', 'ALP');
list($usr['auth_read'], $usr['auth_write'], $usr['isadmin']) = cot_auth('projects', 'any', 'RWA');
cot_block($usr['auth_write']);
$item = $db->query("SELECT p.*, u.* FROM {$db_projects} AS p LEFT JOIN {$db_users} AS u ON u.user_id=p.item_userid WHERE item_id=" . (int) $id)->fetch();
if ($item['item_id'] != (int) $id) {
    cot_die_message(404, TRUE);
}
list($usr['auth_read'], $usr['auth_write'], $usr['isadmin']) = cot_auth('projects', $item['item_cat']);
cot_block($usr['isadmin'] || $usr['auth_write'] && $usr['id'] == $item['item_userid']);
/* === Hook === */
foreach (cot_getextplugins('projects.preview.first') as $pl) {
    include $pl;
}
/* ===== */
if ($a == 'save') {
    cot_check_xg();
    /* === Hook === */
    foreach (cot_getextplugins('projects.preview.save.first') as $pl) {
        include $pl;
    }
    /* ===== */
    $prj = array();
    if ($cfg['projects']['prevalidate'] && !$usr['isadmin']) {
        $prj['item_state'] = 2;
开发者ID:Andreyjktl,项目名称:cot-freelance,代码行数:31,代码来源:projects.preview.php

示例5: defined

 */
defined('COT_CODE') or die('Wrong URL');
require_once cot_incfile('auth');
$v = cot_import('v', 'G', 'ALP');
$y = cot_import('y', 'G', 'INT');
$token = cot_import('token', 'G', 'ALP');
list($usr['auth_read'], $usr['auth_write'], $usr['isadmin']) = cot_auth('users', 'a');
if ($cfg['users']['disablereg'] && !$usr['isadmin']) {
    cot_die_message(117, TRUE);
}
/* === Hook === */
foreach (cot_getextplugins('users.register.first') as $pl) {
    include $pl;
}
/* ===== */
cot_block($usr['id'] == 0 || $usr['isadmin']);
if ($a == 'add') {
    cot_shield_protect();
    $ruser = array();
    /* === Hook for the plugins === */
    foreach (cot_getextplugins('users.register.add.first') as $pl) {
        include $pl;
    }
    /* ===== */
    $ruser['user_name'] = cot_import('rusername', 'P', 'TXT', 100, TRUE);
    $ruser['user_email'] = cot_import('ruseremail', 'P', 'TXT', 64, TRUE);
    $rpassword1 = cot_import('rpassword1', 'P', 'HTM', 32);
    $rpassword2 = cot_import('rpassword2', 'P', 'HTM', 32);
    $ruser['user_country'] = cot_import('rcountry', 'P', 'TXT');
    $ruser['user_timezone'] = cot_import('rusertimezone', 'P', 'TXT');
    $ruser['user_timezone'] = !$ruser['user_timezone'] ? $cfg['defaulttimezone'] : $ruser['user_timezone'];
开发者ID:Roffun,项目名称:Cotonti,代码行数:31,代码来源:users.register.php

示例6: defined

defined('COT_CODE') or die('Wrong URL');
$id = cot_import('id', 'G', 'INT');
$key = cot_import('key', 'G', 'TXT');
list($usr['auth_read'], $usr['auth_write'], $usr['isadmin']) = cot_auth('plug', 'marketorders');
cot_block($usr['auth_read']);
if ($id > 0) {
    $sql = $db->query("SELECT * FROM {$db_market_orders}  AS o\n\t\tLEFT JOIN {$db_market} AS m ON m.item_id=o.order_pid\n\t\tWHERE order_status!='new' AND order_id=" . $id . " LIMIT 1");
}
if (!$id || !$sql || $sql->rowCount() == 0) {
    cot_die_message(404, TRUE);
}
$marketorder = $sql->fetch();
cot_block($usr['isadmin'] || $usr['id'] == $marketorder['order_userid'] || $usr['id'] == $marketorder['order_seller'] || !empty($key) && $usr['id'] == 0);
if ($usr['id'] == 0) {
    $hash = sha1($marketorder['order_email'] . '&' . $marketorder['order_id']);
    cot_block($key == $hash);
}
/* === Hook === */
$extp = cot_getextplugins('marketorders.order.first');
foreach ($extp as $pl) {
    include $pl;
}
/* ===== */
$out['subtitle'] = $L['marketorders_title'];
$out['head'] .= $R['code_noindex'];
$mskin = cot_tplfile(array('marketorders', 'order', $structure['market'][$marketorder['item_cat']]['tpl']), 'plug');
/* === Hook === */
foreach (cot_getextplugins('marketorders.order.main') as $pl) {
    include $pl;
}
/* ===== */
开发者ID:CrazyFreeMan,项目名称:cot-marketorders,代码行数:31,代码来源:marketorders.order.php

示例7: deleteAction

 public function deleteAction()
 {
     $id = cot_import('id', 'G', 'INT');
     // id Объявления
     $b = cot_import('b', 'G', 'HTM');
     // Куда вернуться
     /* === Hook === */
     foreach (cot_getextplugins('advboard.delete.first') as $pl) {
         include $pl;
     }
     /* ===== */
     // Права на любую категорию доски объявлений
     list(cot::$usr['auth_read'], cot::$usr['auth_write'], cot::$usr['isadmin']) = cot_auth('advboard', 'any');
     cot_block(cot::$usr['auth_write']);
     $advert = advboard_model_Advert::getById($id);
     if (!$advert) {
         cot_die_message(404, TRUE);
     }
     if (!cot::$usr['isadmin']) {
         if ($advert->user != cot::$usr['id']) {
             cot_die_message(404, TRUE);
         }
     }
     $title = $advert->title;
     $userId = $advert->user;
     $advert->delete();
     /* === Hook === */
     foreach (cot_getextplugins('advboard.delete.done') as $pl) {
         include $pl;
     }
     /* ===== */
     if (!empty($b)) {
         $b = unserialize(base64_decode($b));
     } elseif (!empty($_SESSION['cot_com_back']) && !empty($_SESSION['cot_com_back']['advboard'])) {
         $b = $_SESSION['cot_com_back']['advboard'];
         unset($_SESSION['cot_com_back']['advboard']);
     }
     if (empty($b)) {
         $b = array('m' => 'user');
         if ($userId != cot::$usr['id']) {
             $b['uid'] = $userId;
         }
     }
     cot_message(sprintf(cot::$L['advboard_deleted'], $title));
     cot_redirect(cot_url('advboard', $b, '', true));
 }
开发者ID:ASDAFF,项目名称:advboard,代码行数:46,代码来源:Main.php

示例8: defined

 * @author CMSWorks Team
 * @copyright Copyright (c) CMSWorks.ru
 * @license BSD
 */
defined('COT_CODE') or die('Wrong URL');
$id = cot_import('id', 'G', 'INT');
list($usr['auth_read'], $usr['auth_write'], $usr['isadmin']) = cot_auth('plug', 'marketorders');
cot_block($usr['auth_read']);
if ($id > 0) {
    $sql = $db->query("SELECT * FROM {$db_market_orders}  AS o\n\t\tLEFT JOIN {$db_market} AS m ON m.item_id=o.order_pid\n\t\tWHERE order_id=" . $id . " LIMIT 1");
}
if (!$id || !$sql || $sql->rowCount() == 0) {
    cot_die_message(404, TRUE);
}
$marketorder = $sql->fetch();
cot_block($marketorder['order_status'] == 'paid' && $marketorder['order_userid'] == $usr['id']);
/* === Hook === */
$extp = cot_getextplugins('marketorders.addclaim.first');
foreach ($extp as $pl) {
    include $pl;
}
/* ===== */
if ($a == 'add') {
    cot_shield_protect();
    /* === Hook === */
    foreach (cot_getextplugins('marketorders.addclaim.add.first') as $pl) {
        include $pl;
    }
    /* ===== */
    $rorder['order_claimtext'] = cot_import('rclaimtext', 'P', 'TXT');
    /* === Hook === */
开发者ID:CrazyFreeMan,项目名称:cot-marketorders,代码行数:31,代码来源:marketorders.addclaim.php

示例9: XTemplate

}
/* ===== */
$t = new XTemplate(cot_tplfile('payments.billing', 'module'));
/* === Hook === */
foreach (cot_getextplugins('payments.billing.main') as $pl) {
    include $pl;
}
/* ===== */
$pid = cot_import('pid', 'G', 'INT');
if (empty($pid)) {
    cot_redirect(cot_url('payments', 'm=error&msg=2', '', true));
}
// Получаем информацию о заказе
if ($pinfo = cot_payments_payinfo($pid)) {
    // Блокируем доступ к несобственным платежкам
    cot_block($usr['id'] == $pinfo['pay_userid']);
    // Если счета пользователей	 включены, то проверяем баланс
    if ($cfg['payments']['balance_enabled'] && $pinfo['pay_area'] != 'balance' && $usr['id'] > 0) {
        $ubalance = cot_payments_getuserbalance($usr['id']);
        if ($ubalance >= $pinfo['pay_summ']) {
            if (cot_payments_updatestatus($pid, 'paid')) {
                cot_payments_updateuserbalance($usr['id'], -$pinfo['pay_summ'], $pid);
                /* === Hook === */
                foreach (cot_getextplugins('payments.billing.paid.done') as $pl) {
                    include $pl;
                }
                /* ===== */
                if (!empty($pinfo['pay_redirect'])) {
                    $pinfo['pay_redirect'] = $pinfo['pay_redirect'] . '&' . cot_xg();
                    cot_redirect($pinfo['pay_redirect']);
                } else {
开发者ID:ASDAFF,项目名称:cot-freelance,代码行数:31,代码来源:payments.billing.php

示例10: defined

<?php

/**
 * Structure translation tool
 *
 * @package I18n
 * @copyright (c) Cotonti Team
 * @license https://github.com/Cotonti/Cotonti/blob/master/License.txt
 */
defined('COT_CODE') or die('Wrong URL.');
cot_block($i18n_admin);
$maxperpage = $cfg['maxrowsperpage'] && is_numeric($cfg['maxrowsperpage']) && $cfg['maxrowsperpage'] > 0 ? $cfg['maxrowsperpage'] : 15;
list($pg, $d, $durl) = cot_import_pagenav('d', $maxperpage);
$out['subtitle'] = $L['i18n_structure'];
/* === Hook === */
foreach (cot_getextplugins('i18n.structure.first') as $pl) {
    include $pl;
}
/* =============*/
// Refresh i18n struct data
cot_i18n_load_structure();
$cache && $cache->db->store('structure', $i18n_structure, 'i18n');
if (empty($i18n_locale) || $i18n_locale == $cfg['defaultlang']) {
    // Locale selection
    $t = new XTemplate(cot_tplfile('i18n.locales', 'plug'));
    foreach ($i18n_locales as $lc => $title) {
        if ($lc != $cfg['defaultlang']) {
            $t->assign(array('I18N_LOCALE_ROW_URL' => cot_url('plug', "e=i18n&m=structure&l={$lc}", false, true), 'I18N_LOCALE_ROW_TITLE' => $title));
            $t->parse('MAIN.I18N_LOCALE_ROW');
        }
    }
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:31,代码来源:i18n.structure.php

示例11: defined

<?php

/**
 * Location Selector for Cotonti
 *
 * @package locationselector
 * @version 2.0.0
 * @author CMSWorks Team
 * @copyright Copyright (c) CMSWorks.ru, littledev.ru
 * @license BSD
 */
defined('COT_CODE') or die('Wrong URL');
list($pn, $d, $d_url) = cot_import_pagenav('d', $cfg['maxrowsperpage']);
$id = cot_import('id', 'G', 'INT');
cot_block($id);
if ($a == 'del') {
    $cid = cot_import('cid', 'G', 'INT');
    $db->delete($db_ls_cities, "city_id=" . (int) $cid);
    $cache && $cache->clear();
    cot_redirect(cot_url('admin', 'm=other&p=locationselector&n=city&id=' . $id, '', true));
    exit;
}
if ($a == 'add') {
    $rnames = cot_import('rname', 'P', 'TXT');
    $rnames = str_replace("\r\n", "\n", $rnames);
    $rnames = explode("\n", $rnames);
    if (count($rnames) > 0) {
        $region = $db->query("SELECT * FROM {$db_ls_regions} WHERE region_id=" . $id . "")->fetch();
        foreach ($rnames as $rname) {
            if (!empty($rname)) {
                $rinput = array();
开发者ID:Andreyjktl,项目名称:cot-freelance,代码行数:31,代码来源:locationselector.city.php

示例12: defined

<?php

/**
 * projects module
 *
 * @package projects
 * @version 2.5.2
 * @author CMSWorks Team
 * @copyright Copyright (c) CMSWorks.ru, littledev.ru
 * @license BSD
 */
defined('COT_CODE') or die('Wrong URL.');
list($usr['auth_read'], $usr['auth_write'], $usr['isadmin'], $usr['auth_offers']) = cot_auth('projects', 'any', 'RWA1');
cot_block($usr['auth_offers']);
$choise = cot_import('choise', 'G', 'ALP');
if ($cfg['projects']['offersperpage'] > 0) {
    list($pn, $d, $d_url) = cot_import_pagenav('d', $cfg['projects']['offersperpage']);
}
/* === Hook === */
foreach (cot_getextplugins('projects.useroffers.first') as $pl) {
    include $pl;
}
/* ===== */
$t = new XTemplate(cot_tplfile(array('projects', 'useroffers')));
$out['subtitle'] = $L['offers_useroffers'];
$where['userid'] = "o.offer_userid=" . $usr['id'];
switch ($choise) {
    case 'none':
        $where['offer_choise'] = "o.offer_choise=''";
        break;
    case 'performer':
开发者ID:Andreyjktl,项目名称:cot-freelance,代码行数:31,代码来源:projects.useroffers.php

示例13: defined

<?php

/* ====================
[BEGIN_COT_EXT]
Hooks=standalone
[END_COT_EXT]
==================== */
/**
 * Standalone item translation tool
 *
 * @package I18n
 * @copyright (c) Cotonti Team
 * @license https://github.com/Cotonti/Cotonti/blob/master/License.txt
 */
defined('COT_CODE') or die('Wrong URL');
cot_block($i18n_write);
require_once cot_incfile('forms');
if ($m == 'structure') {
    include cot_incfile('i18n', 'plug', 'structure');
} elseif ($m == 'page') {
    include cot_incfile('i18n', 'plug', 'page');
} else {
    /* === Hook === */
    foreach (cot_getextplugins('i18n.standalone') as $pl) {
        include $pl;
    }
    /* =============*/
}
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:28,代码来源:i18n.php

示例14: cot_url

    $t->assign(array('POST_FORM_ACTION' => cot_url('sbr', 'id=' . $id . '&num=' . $num . '&a=addpost'), 'POST_FORM_TO' => cot_selectbox($to, 'to', $R['sbr_posts_to_values'], $R['sbr_posts_to_titles'])));
    cot_display_messages($t, 'MAIN.SBR.POSTS.POSTFORM');
    $t->parse('MAIN.SBR.POSTS.POSTFORM');
    $t->parse('MAIN.SBR.POSTS');
    /* === Hook === */
    foreach (cot_getextplugins('sbr.tags') as $pl) {
        include $pl;
    }
    /* ===== */
    $t->parse('MAIN.SBR');
}
if ($action == 'done') {
    // Действие доступно только для заказчика
    cot_block($role == 'employer');
    $t->assign(array('STAGEDONE_FORM_ACTION' => cot_url('sbr', 'id=' . $id . '&num=' . $num . '&a=done'), 'STAGEDONE_FORM_TEXT' => cot_textarea('rtext', $rtext, 5, 80)));
    cot_display_messages($t, 'MAIN.STAGEDONE');
    $t->parse('MAIN.STAGEDONE');
}
if ($action == 'claim') {
    $stage = $db->query("SELECT * FROM {$db_sbr_stages} WHERE stage_sid=" . $id . " AND stage_num=" . $num)->fetch();
    cot_block(!empty($role) && $sbr['sbr_status'] == 'process' && $stage['stage_status'] == 'process');
    $t->assign(array('CLAIM_FORM_ACTION' => cot_url('sbr', 'id=' . $id . '&num=' . $num . '&a=claim'), 'CLAIM_FORM_TEXT' => cot_textarea('rtext', $rtext, 5, 80)));
    cot_display_messages($t, 'MAIN.CLAIM');
    $t->parse('MAIN.CLAIM');
}
if ($action == 'decision') {
    cot_block($usr['isadmin'] && $sbr['sbr_status'] == 'claim');
    $t->assign(array('DECISION_FORM_ACTION' => cot_url('sbr', 'id=' . $id . '&num=' . $num . '&a=decision'), 'DECISION_FORM_TEXT' => cot_textarea('rdecisiontext', $rtext, 5, 80), 'DECISION_FORM_PAYPERFORMER' => cot_inputbox('text', 'payperformer', $payperformer), 'DECISION_FORM_PAYEMPLOYER' => cot_inputbox('text', 'payemployer', $payemployer)));
    cot_display_messages($t, 'MAIN.DECISION');
    $t->parse('MAIN.DECISION');
}
开发者ID:cotemplate,项目名称:cot-sbr,代码行数:31,代码来源:sbr.main.php

示例15: defined

<?php

/**
 * marketorders plugin
 *
 * @package marketorders
 * @version 1.0.0
 * @author CMSWorks Team
 * @copyright Copyright (c) CMSWorks.ru
 * @license BSD
 */
defined('COT_CODE') or die('Wrong URL');
$id = cot_import('id', 'G', 'INT');
$status = cot_import('status', 'G', 'ALP');
list($usr['auth_read'], $usr['auth_write'], $usr['isadmin']) = cot_auth('plug', 'marketorders');
cot_block($usr['id'] > 0 && $usr['auth_read']);
if ($cfg['plugin']['marketorders']['ordersperpage'] > 0) {
    list($pn, $d, $d_url) = cot_import_pagenav('d', $cfg['plugin']['marketorders']['ordersperpage']);
}
/* === Hook === */
$extp = cot_getextplugins('marketorders.purchases.first');
foreach ($extp as $pl) {
    include $pl;
}
/* ===== */
$out['subtitle'] = $L['market_purchases_title'];
$out['head'] .= $R['code_noindex'];
$mskin = cot_tplfile(array('marketorders', 'purchases'), 'plug');
/* === Hook === */
foreach (cot_getextplugins('marketorders.purchases.main') as $pl) {
    include $pl;
开发者ID:CrazyFreeMan,项目名称:cot-marketorders,代码行数:31,代码来源:marketorders.purchases.php


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