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


PHP cot_rc函数代码示例

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


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

示例1: karma_error

/**
 * Вывод сообщений пользователю
 * @param string $rc - ресурс.
 * @param string $message - сообщение.
 * @param bool $header - подключение скрипта в тпл.
 * @return num - возвращаем обработанное сообщение.
 */
function karma_error($rc, $message, $header = false)
{
    global $kr;
    $kr->assign("TEXT_ERROR", cot_rc($rc, array('txt' => $message)));
    if ($header) {
        $kr->parse("MAIN.ERROR.HEADER");
    }
    $kr->parse("MAIN.ERROR");
    return $kr->text("MAIN.ERROR");
}
开发者ID:Dr2005alex,项目名称:cot_karma,代码行数:17,代码来源:karma.functions.php

示例2: cot_rc

 }
 // Выплата Заказчику
 if ($payemployer > 0) {
     $payinfo['pay_userid'] = $sbr['sbr_employer'];
     $payinfo['pay_area'] = 'balance';
     $payinfo['pay_code'] = 'sbr:' . $id . ';stage:' . $num;
     $payinfo['pay_summ'] = $payemployer;
     $payinfo['pay_cdate'] = $sys['now'];
     $payinfo['pay_pdate'] = $sys['now'];
     $payinfo['pay_adate'] = $sys['now'];
     $payinfo['pay_status'] = 'done';
     $payinfo['pay_desc'] = cot_rc($L['sbr_claim_payments_employer_desc'], array('sbr_title' => $sbr['sbr_title'], 'stage_title' => $stage['stage_title'], 'stage_num' => $stage['stage_num']));
     $db->insert($db_payments, $payinfo);
 }
 cot_sbr_sendpost($id, cot_rc($L['sbr_posts_performer_stage_claim_decision_payment'], array('sbr_title' => $sbr['sbr_title'], 'stage_title' => $stage['stage_title'], 'stage_num' => $stage['stage_num'], 'payperformer' => !empty($payperformer) ? $payperformer : 0, 'payemployer' => !empty($payemployer) ? $payemployer : 0, 'decision' => $rtext, 'valuta' => $cfg['payments']['valuta'])), $sbr['sbr_performer'], 0, 'warning', true);
 cot_sbr_sendpost($id, cot_rc($L['sbr_posts_employer_stage_claim_decision_payment'], array('sbr_title' => $sbr['sbr_title'], 'stage_title' => $stage['stage_title'], 'stage_num' => $stage['stage_num'], 'payperformer' => !empty($payperformer) ? $payperformer : 0, 'payemployer' => !empty($payemployer) ? $payemployer : 0, 'decision' => $rtext, 'valuta' => $cfg['payments']['valuta'])), $sbr['sbr_employer'], 0, 'warning', true);
 // Запуск следующего этапа на исполнение, если он существует
 $nextstagenum = $num + 1;
 if ($nstageid = $db->query("SELECT stage_id FROM {$db_sbr_stages} WHERE stage_sid=" . $id . " AND stage_num=" . $nextstagenum)->fetchColumn()) {
     $nstage['stage_begin'] = $sys['now'];
     $nstage['stage_status'] = 'process';
     $db->update($db_sbr_stages, $nstage, "stage_id=" . $nstageid);
 }
 //  Если нет этапов на исполнении, то завершить сделку полностью
 $notstartedstages = (bool) $db->query("SELECT COUNT(*) FROM {$db_sbr_stages} WHERE stage_sid=" . $id . " AND stage_status='process'")->fetchColumn();
 if (!$notstartedstages) {
     $rsbr['sbr_done'] = $sys['now'];
     $rsbr['sbr_status'] = 'done';
     $db->update($db_sbr, $rsbr, "sbr_id=" . $id);
     cot_sbr_sendpost($id, $L['sbr_posts_performer_done'], $sbr['sbr_performer'], 0, 'success', true);
     cot_sbr_sendpost($id, $L['sbr_posts_employer_done'], $sbr['sbr_employer'], 0, 'success', true);
开发者ID:cotemplate,项目名称:cot-sbr,代码行数:31,代码来源:sbr.main.php

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

示例4: array

        include $pl;
    }
    /* ===== */
    $prj = array();
    if ($cfg['projects']['prevalidate'] && !$usr['isadmin']) {
        $prj['item_state'] = 2;
        $r_url = empty($ritem['item_alias']) ? cot_url('projects', 'c=' . $ritem['item_cat'] . '&id=' . $id, '', true) : cot_url('projects', 'c=' . $ritem['item_cat'] . '&al=' . $ritem['item_alias'], '', true);
        if (!$usr['isadmin']) {
            $rbody = cot_rc($L['project_senttovalidation_mail_body'], array('user_name' => $item['user_name'], 'prj_name' => $item['item_title'], 'sitename' => $cfg['maintitle'], 'link' => COT_ABSOLUTE_URL . $r_url));
            cot_mail($item['user_email'], $L['project_senttovalidation_mail_subj'], $rbody);
        }
    } else {
        $prj['item_state'] = 0;
        $r_url = empty($item['item_alias']) ? cot_url('projects', 'c=' . $item['item_cat'] . '&id=' . $id, '', true) : cot_url('projects', 'c=' . $item['item_cat'] . '&al=' . $item['item_alias'], '', true);
        if (!$usr['isadmin']) {
            $rbody = cot_rc($L['project_added_mail_body'], array('user_name' => $item['user_name'], 'prj_name' => $item['item_title'], 'sitename' => $cfg['maintitle'], 'link' => COT_ABSOLUTE_URL . cot_url('projects', 'id=' . $id, '', true)));
            cot_mail($item['user_email'], $L['project_added_mail_subj'], $rbody);
        }
    }
    $db->update($db_projects, $prj, "item_id=" . (int) $id);
    cot_projects_sync($item['item_cat']);
    /* === Hook === */
    foreach (cot_getextplugins('projects.preview.save.done') as $pl) {
        include $pl;
    }
    /* ===== */
    cot_redirect($r_url);
    exit;
}
$out['subtitle'] = $L['projects'];
$mskin = cot_tplfile(array('projects', 'preview', $structure['projects'][$item['item_cat']]['tpl']));
开发者ID:Andreyjktl,项目名称:cot-freelance,代码行数:31,代码来源:projects.preview.php

示例5: cot_rc

                    $rbody = cot_rc($L['project_added_mail_body'], array('user_name' => $usr['profile']['user_name'], 'prj_name' => $ritem['item_title'], 'sitename' => $cfg['maintitle'], 'link' => COT_ABSOLUTE_URL . $r_url));
                    cot_mail($usr['profile']['user_email'], $L['project_added_mail_subj'], $rbody);
                }
                break;
            case 1:
                $r_url = cot_url('projects', '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('projects', $urlparams, '', true);
                if (!$usr['isadmin']) {
                    $rbody = cot_rc($L['project_senttovalidation_mail_body'], array('user_name' => $usr['profile']['user_name'], 'prj_name' => $ritem['item_title'], 'sitename' => $cfg['maintitle'], 'link' => COT_ABSOLUTE_URL . $r_url));
                    cot_mail($usr['profile']['user_email'], $L['project_senttovalidation_mail_subj'], $rbody);
                }
                if ($cfg['projects']['notif_admin_moderate']) {
                    $nbody = cot_rc($L['project_notif_admin_moderate_mail_body'], array('user_name' => $usr['profile']['user_name'], 'prj_name' => $ritem['item_title'], 'sitename' => $cfg['maintitle'], 'link' => COT_ABSOLUTE_URL . $r_url));
                    cot_mail($cfg['adminemail'], $L['project_notif_admin_moderate_mail_subj'], $nbody);
                }
                break;
        }
        cot_redirect($r_url);
        exit;
    } else {
        cot_redirect(cot_url('projects', 'm=add&c=' . $c . '&type=' . $type, '', true));
    }
}
if (empty($ritem['item_cat']) && !empty($c)) {
    $ritem['item_cat'] = $c;
    $usr['isadmin'] = cot_auth('projects', $ritem['item_cat'], 'A');
}
if (empty($ritem['item_type']) && !empty($type)) {
开发者ID:ASDAFF,项目名称:cot-freelance,代码行数:31,代码来源:projects.add.php

示例6: cot_incfile

}
if (cot_module_active('forums')) {
    require_once cot_incfile('forums', 'module');
    $tag_areas[] = 'forums';
}
// Sorting order
$o = cot_import('order', 'P', 'ALP');
if (empty($o)) {
    $o = mb_strtolower($cfg['plugin']['tags']['sort']);
}
$tag_order = '';
$tag_orders = array('Title', 'Date', 'Category');
foreach ($tag_orders as $order) {
    $ord = mb_strtolower($order);
    $selected = $ord == $o ? 'selected="selected"' : '';
    $tag_order .= cot_rc('input_option', array('value' => $ord, 'selected' => $selected, 'title' => $L[$order]));
}
/* == Hook for the plugins == */
foreach (cot_getextplugins('tags.first') as $pl) {
    include $pl;
}
/* ===== */
if ($cfg['plugin']['tags']['noindex']) {
    $out['head'] .= $R['code_noindex'];
}
$out['subtitle'] = empty($qs) ? $L['Tags'] : htmlspecialchars(strip_tags($qs)) . ' - ' . $L['tags_Search_results'];
$t->assign(array('TAGS_ACTION' => cot_url('plug', 'e=tags&a=' . $a), 'TAGS_HINT' => $L['tags_Query_hint'], 'TAGS_QUERY' => htmlspecialchars($qs), 'TAGS_ORDER' => $tag_order));
if ($a == 'pages' && cot_module_active('page')) {
    if (empty($qs)) {
        // Form and cloud
        cot_tag_search_form('pages');
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:31,代码来源:tags.php

示例7: defined

[BEGIN_COT_EXT]
Hooks=tools
[END_COT_EXT]
==================== */
/**
 * Creates aliases in existing pages with empty alias
 *
 * @package AutoAlias
 * @copyright (c) Cotonti Team
 * @license https://github.com/Cotonti/Cotonti/blob/master/License.txt
 */
defined('COT_CODE') or die('Wrong URL');
require_once cot_incfile('autoalias2', 'plug');
require_once cot_langfile('autoalias2', 'plug');
$t = new XTemplate(cot_tplfile('autoalias2.admin', 'plug', true));
$adminsubtitle = $L['AutoAlias'];
if ($a == 'create') {
    $count = 0;
    $res = $db->query("SELECT page_id, page_title FROM {$db_pages} WHERE page_alias = ''");
    foreach ($res->fetchAll() as $row) {
        autoalias2_update($row['page_title'], $row['page_id']);
        $count++;
    }
    $res->closeCursor();
    cot_message(cot_rc('aliases_written', $count));
    cot_redirect(cot_url('admin', 'm=other&p=autoalias2', '', true));
}
$t->assign('AUTOALIAS_CREATE', cot_url('admin', 'm=other&p=autoalias2&a=create'));
cot_display_messages($t);
$t->parse();
$plugin_body = $t->text('MAIN');
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:31,代码来源:autoalias2.admin.php

示例8: cot_mail

                cot_mail($customer['user_email'], $rsubject, $rbody);
                cot_redirect(cot_url('marketorders', 'm=order&id=' . $id, '', true));
                exit;
            }
            cot_redirect(cot_url('marketorders', 'm=order&id=' . $id, '', true));
            exit;
        }
        // Отменяем жалобу
        if ($a == 'cancelclaim') {
            $rorder['order_claim'] = 0;
            $rorder['order_status'] = 'paid';
            if ($db->update($db_market_orders, $rorder, 'order_id=' . $id)) {
                $customer = $db->query("SELECT * FROM {$db_users} WHERE user_id=" . $marketorder['order_userid'])->fetch();
                // Уведопляем покупателя об отклонении жалобы
                $rsubject = cot_rc($L['marketorders_cancelclaim_mail_tocustomer_header'], array('order_id' => $marketorder['order_id'], 'product_title' => $marketorder['item_title']));
                $rbody = cot_rc($L['marketorders_cancelclaim_mail_tocustomer_body'], array('product_title' => $marketorder['item_title'], 'order_id' => $marketorder['order_id'], 'sitename' => $cfg['maintitle'], 'link' => COT_ABSOLUTE_URL . cot_url('marketorders', "id=" . $marketorder['order_id'], '', true)));
                /* === Hook === */
                foreach (cot_getextplugins('marketorders.order.cancelclaim.done') as $pl) {
                    include $pl;
                }
                /* ===== */
                cot_mail($customer['user_email'], $rsubject, $rbody);
            }
            cot_redirect(cot_url('marketorders', 'm=order&id=' . $id, '', true));
            exit;
        }
        $t->parse('MAIN.CLAIM.ADMINCLAIM');
    }
    $t->parse('MAIN.CLAIM');
}
/* === Hook === */
开发者ID:CrazyFreeMan,项目名称:cot-marketorders,代码行数:31,代码来源:marketorders.order.php

示例9: embedFooter

 /**
  * A shortcut for plain output of an embedded stylesheet/javascript in the footer of the page
  *
  * Example: Resources::embedFooter(" alert('ssssss') ");
  *
  * @param string $code Stylesheet or javascript code
  * @param string $type Resource type: 'js' or 'css'
  * @param int $order
  */
 public static function embedFooter($code, $type = 'js', $order = 50)
 {
     static::$footerRc[$type . '_embed'][$order][] = cot_rc("code_rc_{$type}_embed", array('code' => $code));
 }
开发者ID:Cotonti,项目名称:valencia,代码行数:13,代码来源:resources.php

示例10: cot_shield_protect

/**
 * Warn user of shield protection
 *
 */
function cot_shield_protect()
{
    global $sys, $shield_limit, $shield_action, $L;
    if ($shield_limit > $sys['now']) {
        cot_die_message(403, true, $L['shield_title'], cot_rc('shield_protect', array('sec' => $shield_limit - $sys['now'], 'action' => $shield_action)));
    }
}
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:11,代码来源:functions.php

示例11: defined

<?php

defined('COT_CODE') or die('Wrong URL');
/* ====================
[BEGIN_COT_EXT]
Hooks=usertags.main
Order=11
[END_COT_EXT]
==================== */
if ($user_data['user_id'] > 0 && empty($user_data['user_avatar'])) {
    switch ($user_data['user_gender']) {
        case 'M':
            $temp_array['AVATAR'] = cot_rc('ga_user_default_avatar_m');
            break;
        case 'F':
            $temp_array['AVATAR'] = cot_rc('ga_user_default_avatar_f');
            break;
        default:
            $temp_array['AVATAR'] = cot_rc('ga_user_default_avatar_u');
            break;
    }
}
开发者ID:ASDAFF,项目名称:cot-freelance,代码行数:22,代码来源:genderavatar.usertags.main.php

示例12: defined

<?php

/**
 * [BEGIN_COT_EXT]
 * Hooks=users.profile.update.first, users.edit.update.first, users.register.add.first
 * [END_COT_EXT]
 */
defined('COT_CODE') or die('Wrong URL');
require_once cot_incfile('usercategories', 'plug');
$catslimit = cot_cfg_usercategories();
$rcats = cot_import('rcats', 'P', 'ARR');
if (is_array($rcats)) {
    $rcats = array_filter($rcats);
    $ruser['user_cats'] = implode(',', $rcats);
    if ($m == 'edit' || $m == 'profile') {
        $groupid = $urr['user_maingrp'];
    } else {
        $groupid = cot_import('ruserusergroup', 'P', 'INT');
    }
    if (!cot_plugin_active('paypro') || cot_plugin_active('paypro') && !cot_getuserpro($urr)) {
        cot_check($catslimit[$groupid] > 0 && count($rcats) > $catslimit[$groupid], cot_rc($L['usercategories_error_catslimit'], array('limit' => $catslimit[$groupid])), 'rcats');
    }
}
开发者ID:Andreyjktl,项目名称:cot-freelance,代码行数:23,代码来源:usercategories.edit.first.php

示例13: array

}
$arrows = array();
foreach (cot::$extrafields[cot::$db->pages] + array('title' => 'title', 'key' => 'key', 'date' => 'date', 'author' => 'author', 'owner' => 'owner', 'count' => 'count', 'filecount' => 'filecount') as $row_k => $row_p) {
    $uname = strtoupper($row_k);
    $url_asc = cot_url('page', array('s' => $row_k, 'w' => 'asc') + $list_url_path);
    $url_desc = cot_url('page', array('s' => $row_k, 'w' => 'desc') + $list_url_path);
    $arrows[$row_k]['asc'] = cot::$R['icon_down'];
    $arrows[$row_k]['desc'] = cot::$R['icon_up'];
    if ($s == $row_k) {
        $arrows[$s][$w] = cot::$R['icon_vert_active'][$w];
    }
    if (in_array($row_k, array('title', 'key', 'date', 'author', 'owner', 'count', 'filecount'))) {
        $t->assign(array('LIST_TOP_' . $uname => cot_rc("list_link_{$row_k}", array('cot_img_down' => $arrows[$row_k]['asc'], 'cot_img_up' => $arrows[$row_k]['desc'], 'list_link_url_down' => $url_asc, 'list_link_url_up' => $url_desc))));
    } else {
        $extratitle = isset($L['page_' . $row_k . '_title']) ? $L['page_' . $row_k . '_title'] : $row_p['field_description'];
        $t->assign(array('LIST_TOP_' . $uname => cot_rc('list_link_field_name', array('cot_img_down' => $arrows[$row_k]['asc'], 'cot_img_up' => $arrows[$row_k]['desc'], 'list_link_url_down' => $url_asc, 'list_link_url_up' => $url_desc))));
    }
    $t->assign(array('LIST_TOP_' . $uname . '_URL_ASC' => $url_asc, 'LIST_TOP_' . $uname . '_URL_DESC' => $url_desc));
}
$kk = 0;
$allsub = cot_structure_children('page', $c, false, false, true, false);
$subcat = array_slice($allsub, $dc, $cfg['page']['maxlistsperpage']);
/* === Hook === */
foreach (cot_getextplugins('page.list.rowcat.first') as $pl) {
    include $pl;
}
/* ===== */
/* === Hook - Part1 : Set === */
$extp = cot_getextplugins('page.list.rowcat.loop');
/* ===== */
foreach ($subcat as $x) {
开发者ID:Roffun,项目名称:Cotonti,代码行数:31,代码来源:page.list.php

示例14: cot_import

if ($a == 'edit') {
    $code = cot_import('code', 'G', 'ALP');
    $width = cot_import('userimg_width', 'P', 'INT');
    $height = cot_import('userimg_height', 'P', 'INT');
    $crop = cot_import('userimg_crop', 'P', 'TXT');
    if (!cot_userimages_config_edit($code, $width, $height, $crop)) {
        cot_error('userimages_emptycode', 'code');
    }
    cot_redirect(cot_url('admin', 'm=other&p=userimages', '', true));
}
if ($a == 'remove') {
    $code = cot_import('code', 'G', 'ALP');
    if (!cot_userimages_config_remove($code)) {
        cot_error('userimages_emptycode');
    }
    cot_redirect(cot_url('admin', 'm=other&p=userimages', '', true));
}
$userimg = cot_userimages_config_get(true);
foreach ($userimg as $code => $settings) {
    $tt->assign(array('CODE' => $code, 'WIDTH' => $settings['width'], 'HEIGHT' => $settings['height'], 'CROP' => $settings['crop'], 'EDIT_URL' => cot_url('admin', 'm=other&p=userimages&a=edit&code=' . $code), 'REMOVE' => cot_rc('userimg_remove', array('url' => cot_url('admin', 'm=other&p=userimages&a=remove&code=' . $code)))));
    $tt->parse('MAIN.USERIMG_LIST');
}
cot_display_messages($tt);
// use cot_message()
/* === Hook  === */
foreach (cot_getextplugins('userimages.admin.tags') as $pl) {
    include $pl;
}
/* ===== */
$tt->parse('MAIN');
$plugin_body = $tt->text('MAIN');
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:31,代码来源:userimages.admin.php

示例15: cot_block

    $userid = $usr['id'];
} else {
    $more = 'userid=' . $userid;
}
if ($userid != $usr['id']) {
    cot_block($usr['isadmin']);
}
$standalone = FALSE;
$uid = $userid > 0 ? $userid : $usr['id'];
$user_info = cot_userinfo($uid);
$maingroup = $userid == 0 ? 5 : $user_info['user_maingrp'];
$pfs_dir_user = cot_pfs_path($userid);
$thumbs_dir_user = cot_pfs_thumbpath($userid);
reset($cot_extensions);
foreach ($cot_extensions as $k => $line) {
    $icon[$line[0]] = cot_rc('pfs_icon_type', array('type' => $line[2], 'name' => $line[1]));
    $filedesc[$line[0]] = $line[1];
}
if (!empty($c1) || !empty($c2)) {
    $more .= empty($more) ? 'c1=' . $c1 . '&c2=' . $c2 : '&c1=' . $c1 . '&c2=' . $c2;
    $standalone = TRUE;
}
/* ============= */
$L['pfs_title'] = $userid == 0 ? $L['SFS'] : $L['pfs_title'];
$title[] = array(cot_url('pfs', $more), $L['pfs_title']);
/* === Hook === */
foreach (cot_getextplugins('pfs.edit.first') as $pl) {
    include $pl;
}
/* ===== */
if ($userid != $usr['id']) {
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:31,代码来源:pfs.edit.php


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