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


PHP cot_generate_usertags函数代码示例

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


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

示例1: cot_ukarma

function cot_ukarma($userid, $area = 'users', $code = '', $onlyscore = false)
{
    global $db, $cfg, $db_ukarma, $db_users;
    if ($area == 'users' && $db->fieldExists($db_users, "user_ukarma")) {
        $score = $db->query("SELECT user_ukarma FROM {$db_users} WHERE user_id=" . $userid)->fetchColumn();
    } else {
        $where['ukarma_userid'] = "ukarma_userid=" . $userid;
        if (!empty($area) && $area != 'users') {
            $where['ukarma_area'] = "ukarma_area='" . $area . "'";
        }
        if (!empty($code)) {
            $where['ukarma_code'] = "ukarma_code='" . $code . "'";
        }
        $where = $where ? 'WHERE ' . implode(' AND ', $where) : '';
        $score = $db->query("SELECT SUM(ukarma_value) FROM {$db_ukarma} {$where}")->fetchColumn();
    }
    if ($onlyscore) {
        return !empty($score) ? $score : 0;
    }
    if ($score > 0) {
        $sign = '+';
    } elseif ($score < 0) {
        $sign = '-';
    }
    $t = new XTemplate(cot_tplfile(array('ukarma', $area), 'plug'));
    $t->assign(cot_generate_usertags($userid, 'UKARMA_USER_'));
    $t->assign(array('UKARMA_AREA' => $area, 'UKARMA_CODE' => $code, 'UKARMA_SELECTOR' => 'ukarma_' . $userid . $area . $code, 'UKARMA_SCOREENABLED' => cot_ukarma_checkenablescore($userid, $area, $code), 'UKARMA_SCORE' => !empty($score) ? $score : 0, 'UKARMA_SCORE_ABS' => !empty($score) ? abs($score) : 0, 'UKARMA_SIGN' => $sign));
    $t->parse('MAIN');
    return $t->text('MAIN');
}
开发者ID:CrazyFreeMan,项目名称:cot-ukarma,代码行数:30,代码来源:ukarma.functions.php

示例2: cot_get_topusers

function cot_get_topusers($maingrp, $count, $sqlsearch = '', $tpl = 'index')
{
    global $L, $cfg, $db, $db_users;
    $t1 = new XTemplate(cot_tplfile(array('userpoints', $tpl), 'plug'));
    $sqlsearch = !empty($sqlsearch) ? " AND " . $sqlsearch : '';
    $topusers = $db->query("SELECT * FROM {$db_users}\n\t\tWHERE user_userpoints>0 AND user_maingrp=" . $maingrp . " {$sqlsearch} ORDER BY user_userpoints DESC LIMIT " . $count)->fetchAll();
    foreach ($topusers as $tur) {
        $t1->assign(cot_generate_usertags($tur, 'TOP_ROW_'));
        $t1->parse('MAIN.TOP_ROW');
    }
    $t1->parse('MAIN');
    return $t1->text('MAIN');
}
开发者ID:Andreyjktl,项目名称:cot-freelance,代码行数:13,代码来源:userpoints.functions.php

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

示例4: foreach

/* === 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'];
}
/* === Hook === */
$extp = cot_getextplugins('market.list.loop');
/* ===== */
foreach ($sqllist_rowset as $item) {
    $jj++;
    $t->assign(cot_generate_usertags($item, 'PRD_ROW_OWNER_'));
    $t->assign(cot_generate_markettags($item, 'PRD_ROW_', $cfg['market']['shorttextlen'], $usr['isadmin'], $cfg['homebreadcrumb']));
    $t->assign(array("PRD_ROW_ODDEVEN" => cot_build_oddeven($jj)));
    /* === Hook - Part2 : Include === */
    foreach ($extp as $pl) {
        include $pl;
    }
    /* ===== */
    $t->parse("MAIN.PRD_ROWS");
}
/* === Hook === */
foreach (cot_getextplugins('market.list.tags') as $pl) {
    include $pl;
}
/* ===== */
$t->parse('MAIN');
开发者ID:Andreyjktl,项目名称:cot-freelance,代码行数:31,代码来源:market.list.php

示例5: cot_url

     include $pl;
 }
 /* ===== */
 if ($usr['id'] == $item['item_userid'] && $choise_enabled) {
     $t_o->assign(array("OFFER_ROW_SETPERFORMER" => cot_url('projects', 'id=' . $id . '&a=setperformer&userid=' . $offer['user_id'] . '&' . cot_xg()), "OFFER_ROW_REFUSE" => cot_url('projects', 'id=' . $id . '&a=refuse&userid=' . $offer['user_id'] . '&' . cot_xg())));
     /* === Hook - Part2 : Include === */
     foreach ($extp2 as $pl) {
         include $pl;
     }
     /* ===== */
     $t_o->parse("MAIN.ROWS.CHOISE");
 }
 if ($usr['id'] == $offer['offer_userid'] || $usr['id'] == $item['item_userid'] || $usr['isadmin']) {
     $sql_prjposts = $db->query("SELECT * FROM {$db_projects_posts} as p LEFT JOIN {$db_users} as u ON u.user_id=p.post_userid\n\t\t\tWHERE post_pid=" . $id . " AND post_oid=" . $offer['offer_id'] . " ORDER BY post_date ASC");
     while ($posts = $sql_prjposts->fetch()) {
         $t_o->assign(cot_generate_usertags($posts, 'POST_ROW_OWNER_'));
         $t_o->assign(array("POST_ROW_TEXT" => cot_parse($posts['post_text']), "POST_ROW_DATE" => cot_date('d.m.y H:i', $posts['post_date']), "POST_ROW_DATE_STAMP" => $posts['post_date']));
         /* === Hook - Part3 : Include === */
         foreach ($extp3 as $pl) {
             include $pl;
         }
         /* ===== */
         $t_o->parse("MAIN.ROWS.POSTS.POSTS_ROWS");
     }
     $t_o->assign(array("ADDPOST_ACTION_URL" => cot_url('projects', 'id=' . $id . '&oid=' . $offer['offer_id'] . '&a=addpost'), "ADDPOST_TEXT" => cot_textarea('posttext', $offer_post['post_text'], 3, 60), "ADDPOST_OFFERID" => $offer['offer_id']));
     $t_o->parse("MAIN.ROWS.POSTS.POSTFORM");
     $t_o->parse("MAIN.ROWS.POSTS");
 }
 /* === Hook - Part4 : Include === */
 foreach ($extp4 as $pl) {
     include $pl;
开发者ID:ASDAFF,项目名称:cot-freelance,代码行数:31,代码来源:projects.offers.php

示例6: cot_getmarketlist

function cot_getmarketlist($template = 'index', $count = 5, $sqlsearch = '', $order = "item_date DESC")
{
    global $db, $db_market, $cfg, $db_users;
    list($usr['auth_read'], $usr['auth_write'], $usr['isadmin']) = cot_auth('market', 'any', 'RWA');
    $t = new XTemplate(cot_tplfile(array('market', $template), 'module'));
    $sqlsearch = !empty($sqlsearch) ? " AND " . $sqlsearch : '';
    $sqllist = $db->query("SELECT * FROM {$db_market} AS p LEFT JOIN {$db_users} AS u ON u.user_id=p.item_userid\n\tWHERE item_state=0 {$sqlsearch} ORDER BY {$order} LIMIT " . (int) $count);
    $sqllist_rowset = $sqllist->fetchAll();
    $sqllist_idset = array();
    foreach ($sqllist_rowset as $item) {
        $sqllist_idset[$item['item_id']] = $item['item_alias'];
    }
    foreach ($sqllist_rowset as $item) {
        $jj++;
        $t->assign(cot_generate_usertags($item, 'PRD_ROW_OWNER_'));
        $t->assign(cot_generate_markettags($item, 'PRD_ROW_', $cfg['market']['shorttextlen'], $usr['isadmin'], $cfg['homebreadcrumb']));
        $t->assign(array("PRD_ROW_ODDEVEN" => cot_build_oddeven($jj)));
        $t->parse("MARKET.PRD_ROWS");
    }
    $t->parse("MARKET");
    return $t->text("MARKET");
}
开发者ID:ASDAFF,项目名称:cot-freelance,代码行数:22,代码来源:market.functions.php

示例7: cot_page_enum

/**
 * Generates page list widget
 * @param  mixed   $categories       Custom parent categories code
 * @param  integer $count            Number of items to show. 0 - all items
 * @param  string  $template         Path for template file
 * @param  string  $order            Sorting order (SQL)
 * @param  string  $condition        Custom selection filter (SQL)
 * @param  mixed   $active_only	     Custom parent category code
 * @param  boolean $use_subcat       Include subcategories TRUE/FALSE
 * @param  boolean $exclude_current  Exclude the current page from the rowset for pages.
 * @param  string  $blacklist        Category black list, semicolon separated
 * @param  string  $pagination       Pagination symbol
 * @param  integer $cache_ttl        Cache lifetime in seconds, 0 disables cache
 * @return string                    Parsed HTML
 */
function cot_page_enum($categories = '', $count = 0, $template = '', $order = '', $condition = '', $active_only = true, $use_subcat = true, $exclude_current = false, $blacklist = '', $pagination = '', $cache_ttl = null)
{
    global $db, $db_pages, $db_users, $structure, $cfg, $sys, $lang, $cache;
    // Compile lists
    if (!is_array($blacklist)) {
        $blacklist = str_replace(' ', '', $blacklist);
        $blacklist = !empty($blacklist) ? explode(',', $blacklist) : array();
    }
    // Get the cats
    if (!empty($categories)) {
        if (!is_array($categories)) {
            $categories = str_replace(' ', '', $categories);
            $categories = explode(',', $categories);
        }
        $categories = array_unique($categories);
        if ($use_subcat) {
            $total_categogies = array();
            foreach ($categories as $cat) {
                $cats = cot_structure_children('page', $cat, $use_subcat);
                $total_categogies = array_merge($total_categogies, $cats);
            }
            $categories = array_unique($total_categogies);
        }
        $categories = count($blacklist) > 0 ? array_diff($categories, $blacklist) : $categories;
        $where['cat'] = "page_cat IN ('" . implode("','", $cats) . "')";
    } elseif (count($blacklist)) {
        $where['cat_black'] = "page_cat NOT IN ('" . implode("','", $blacklist) . "')";
    }
    $where['condition'] = $condition;
    if ($exclude_current && defined('COT_PAGES') && !defined('COT_LIST')) {
        global $id;
        $where['page_id'] = "page_id != {$id}";
    }
    if ($active_only) {
        $where['state'] = "page_state=0";
        $where['date'] = "page_begin <= {$sys['now']} AND (page_expire = 0 OR page_expire > {$sys['now']})";
    }
    // Get pagination number if necessary
    if (!empty($pagination)) {
        list($pg, $d, $durl) = cot_import_pagenav($pagination, $count);
    } else {
        $d = 0;
    }
    // Display the items
    $mskin = file_exists($template) ? $template : cot_tplfile(array('page', 'enum', $template), 'module');
    /* === Hook === */
    foreach (cot_getextplugins('page.enum.query') as $pl) {
        include $pl;
    }
    /* ===== */
    if (cot_plugin_active('comments')) {
        global $db_com;
        require_once cot_incfile('comments', 'plug');
        $cns_join_columns .= ", (SELECT COUNT(*) FROM `{$db_com}` WHERE com_area = 'page' AND com_code = p.page_id) AS com_count";
    }
    $sql_order = empty($order) ? 'ORDER BY page_date DESC' : "ORDER BY {$order}";
    $sql_limit = $count > 0 ? "LIMIT {$d}, {$count}" : '';
    $where = array_filter($where);
    $where = $where ? 'WHERE ' . implode(' AND ', $where) : '';
    $sql_total = "SELECT COUNT(*) FROM {$db_pages} AS p {$cns_join_tables} {$where}";
    $sql_query = "SELECT p.*, u.* {$cns_join_columns} FROM {$db_pages} AS p LEFT JOIN {$db_users} AS u ON p.page_ownerid = u.user_id\n\t\t\t{$cns_join_tables} {$where} {$sql_order} {$sql_limit}";
    $t = new XTemplate($mskin);
    isset($md5hash) || ($md5hash = 'page_enum_' . md5(str_replace($sys['now'], '_time_', $mskin . $lang . $sql_query)));
    if ($cache && (int) $cache_ttl > 0) {
        $page_query_html = $cache->disk->get($md5hash, 'page', (int) $cache_ttl);
        if (!empty($page_query_html)) {
            return $page_query_html;
        }
    }
    $totalitems = $db->query($sql_total)->fetchColumn();
    $sql = $db->query($sql_query);
    $sql_rowset = $sql->fetchAll();
    $jj = 0;
    foreach ($sql_rowset as $pag) {
        $jj++;
        $t->assign(cot_generate_pagetags($pag, 'PAGE_ROW_'));
        $t->assign(array('PAGE_ROW_NUM' => $jj, 'PAGE_ROW_ODDEVEN' => cot_build_oddeven($jj), 'PAGE_ROW_RAW' => $pag));
        $t->assign(cot_generate_usertags($pag, 'PAGE_ROW_OWNER_'));
        /* === Hook === */
        foreach (cot_getextplugins('page.enum.loop') as $pl) {
            include $pl;
        }
        /* ===== */
        if (cot_plugin_active('comments')) {
            $rowe_urlp = empty($pag['page_alias']) ? array('c' => $pag['page_cat'], 'id' => $pag['page_id']) : array('c' => $pag['page_cat'], 'al' => $pag['page_alias']);
//.........这里部分代码省略.........
开发者ID:CrazyFreeMan,项目名称:Cotonti,代码行数:101,代码来源:page.functions.php

示例8: cot_getextplugins

/* === Hook - Part1 : Set === */
$extp = cot_getextplugins('page.list.loop');
/* ===== */
$sqllist_rowset = $sqllist->fetchAll();
$sqllist_rowset_other = false;
/* === Hook === */
foreach (cot_getextplugins('page.list.before_loop') as $pl) {
    include $pl;
}
/* ===== */
if (!$sqllist_rowset_other) {
    foreach ($sqllist_rowset as $pag) {
        $jj++;
        $t->assign(cot_generate_pagetags($pag, 'LIST_ROW_', $cfg['page']['truncatetext'], $usr['isadmin']));
        $t->assign(array('LIST_ROW_OWNER' => cot_build_user($pag['page_ownerid'], htmlspecialchars($pag['user_name'])), 'LIST_ROW_ODDEVEN' => cot_build_oddeven($jj), 'LIST_ROW_NUM' => $jj));
        $t->assign(cot_generate_usertags($pag, 'LIST_ROW_OWNER_'));
        /* === Hook - Part2 : Include === */
        foreach ($extp as $pl) {
            include $pl;
        }
        /* ===== */
        $t->parse('MAIN.LIST_ROW');
    }
}
/* === Hook === */
foreach (cot_getextplugins('page.list.tags') as $pl) {
    include $pl;
}
/* ===== */
$t->parse('MAIN');
$t->out('MAIN');
开发者ID:Roffun,项目名称:Cotonti,代码行数:31,代码来源:page.list.php

示例9: foreach

 foreach (cot_getextplugins('sbr.posts.query') as $pl) {
     include $pl;
 }
 /* ===== */
 $posts = $db->query("SELECT * FROM {$db_sbr_posts} \n\t\tWHERE post_sid=" . $id . " " . $query_string . "\n\t\tORDER BY post_date ASC")->fetchAll();
 /* === Hook === */
 $extp = cot_getextplugins('sbr.posts.loop');
 /* ===== */
 foreach ($posts as $post) {
     if ($post['post_from'] > 0) {
         $t->assign(cot_generate_usertags($post['post_from'], 'POST_ROW_FROM_'));
     } else {
         $t->assign('POST_ROW_FROM_NAME', '');
     }
     if ($post['post_to'] > 0) {
         $t->assign(cot_generate_usertags($post['post_to'], 'POST_ROW_TO_'));
     } else {
         $t->assign('POST_ROW_TO_NAME', '');
     }
     $t->assign(array('POST_ROW_FROM_ID' => $post['post_from'], 'POST_ROW_ID' => $post['post_id'], 'POST_ROW_TEXT' => $post['post_text'], 'POST_ROW_TYPE' => $post['post_type'], 'POST_ROW_DATE' => date('d.m.Y H:i:s', $post['post_date'])));
     /* === Hook - Part2 : Include === */
     foreach ($extp as $pl) {
         include $pl;
     }
     /* ===== */
     $postfiles = $db->query("SELECT * FROM {$db_sbr_files} WHERE file_sid=" . $id . " AND file_area='post' AND file_code='" . $post['post_id'] . "' ORDER BY file_id ASC")->fetchAll();
     if (count($postfiles) > 0) {
         foreach ($postfiles as $file) {
             $t->assign(array('FILE_ROW_ID' => $file['file_id'], 'FILE_ROW_URL' => $file['file_url'], 'FILE_ROW_TITLE' => $file['file_title'], 'FILE_ROW_EXT' => $file['file_ext'], 'FILE_ROW_SIZE' => $file['file_size']));
             $t->parse('MAIN.SBR.POSTS.POST_ROW.FILES.FILE_ROW');
         }
开发者ID:cotemplate,项目名称:cot-sbr,代码行数:31,代码来源:sbr.main.php

示例10: implode

$order = $order ? 'ORDER BY ' . implode(', ', $order) : '';
$totalitems = $db->query("SELECT COUNT(*) FROM {$db_projects} AS p {$join_condition} \n\t" . $where . "")->fetchColumn();
$sqllist = $db->query("SELECT p.*, u.* {$join_columns} \n\tFROM {$db_projects} AS p {$join_condition} \n\tLEFT JOIN {$db_users} AS u ON u.user_id=p.item_userid \n\t" . $where . " \n\t" . $order . " \n\tLIMIT {$p}, " . $cfg['projects']['indexlimit']);
$pagenav = cot_pagenav('index', '', $p, $totalitems, $cfg['projects']['indexlimit'], 'p');
$t_pr->assign(array("PAGENAV_PAGES" => $pagenav['main'], "PAGENAV_PREV" => $pagenav['prev'], "PAGENAV_NEXT" => $pagenav['next']));
$sqllist_rowset = $sqllist->fetchAll();
$sqllist_idset = array();
foreach ($sqllist_rowset as $item) {
    $sqllist_idset[$item['item_id']] = $item['item_alias'];
}
/* === Hook === */
$extp = cot_getextplugins('projects.index.loop');
/* ===== */
foreach ($sqllist_rowset as $item) {
    $jj++;
    $t_pr->assign(cot_generate_usertags($item, 'PRJ_ROW_OWNER_'));
    $t_pr->assign(cot_generate_projecttags($item, 'PRJ_ROW_', $cfg['projects']['shorttextlen'], $usr['isadmin'], $cfg['homebreadcrumb']));
    $t_pr->assign(array("PRJ_ROW_ODDEVEN" => cot_build_oddeven($jj)));
    /* === Hook - Part2 : Include === */
    foreach ($extp as $pl) {
        include $pl;
    }
    /* ===== */
    $t_pr->parse("PROJECTS.PRJ_ROWS");
}
$t_pr->assign(array("COUNTOFREALIZEDPROJECTS" => $countofrealizedprojects));
$t_pr->parse("PROJECTS");
$t->assign('PROJECTS', $t_pr->text('PROJECTS'));
$t->assign(array("PROJECTS_CATALOG" => cot_build_structure_projects_tree('', array())));
/* === Hook === */
foreach (cot_getextplugins('projects.index.tags') as $pl) {
开发者ID:Andreyjktl,项目名称:cot-freelance,代码行数:31,代码来源:projects.index.php

示例11: cot_redirect

             }
             /* ===== */
         }
         cot_redirect(cot_url('payments', 'm=balance&n=history', '', true));
     }
     cot_redirect(cot_url('payments', 'm=balance&n=transfers&a=add', '', true));
 }
 if ($a != 'add') {
     $transfers = $db->query("SELECT * FROM {$db_payments_transfers} AS t\n\t\t\tLEFT JOIN {$db_payments} AS p ON p.pay_code=t.trn_id AND p.pay_area='transfer'\n\t\t\tWHERE trn_from=" . $usr['id'] . "\n\t\t\tORDER BY pay_cdate DESC")->fetchAll();
     if (count($transfers) > 0) {
         /* === Hook === */
         $extp = cot_getextplugins('payments.balance.transfers.loop');
         /* ===== */
         foreach ($transfers as $transfer) {
             $t->assign(array('TRANSFER_ROW_ID' => $transfer['trn_id'], 'TRANSFER_ROW_SUMM' => $transfer['trn_summ'], 'TRANSFER_ROW_DATE' => $transfer['trn_date'], 'TRANSFER_ROW_DONE' => $transfer['trn_done'], 'TRANSFER_ROW_COMMENT' => $transfer['trn_comment'], 'TRANSFER_ROW_STATUS' => $transfer['trn_status'], 'TRANSFER_ROW_LOCALSTATUS' => $L['payments_balance_transfer_status_' . $transfer['trn_status']]));
             $t->assign(cot_generate_usertags($transfer['trn_to'], 'TRANSFER_ROW_FOR_'));
             /* === Hook - Part2 : Include === */
             foreach ($extp as $pl) {
                 include $pl;
             }
             /* ===== */
             $t->parse('MAIN.TRANSFERS.TRANSFER_ROW');
         }
     }
     $t->parse('MAIN.TRANSFERS');
 } else {
     $t->assign(array('TRANSFER_FORM_ACTION_URL' => cot_url('payments', 'm=balance&n=transfers&a=send'), 'TRANSFER_FORM_SUMM' => cot_inputbox('text', 'summ', $summ), 'TRANSFER_FORM_TAX' => !empty($taxsumm) ? $taxsumm : 0, 'TRANSFER_FORM_TOTAL' => !empty($sendersumm) ? $sendersumm : 0, 'TRANSFER_FORM_COMMENT' => cot_textarea('comment', $comment, 5, 40, '', ''), 'TRANSFER_FORM_USERNAME' => cot_inputbox('text', 'username', $username)));
     /* === Hook === */
     foreach (cot_getextplugins('payments.balance.transfers.form') as $pl) {
         include $pl;
     }
开发者ID:ASDAFF,项目名称:cot-freelance,代码行数:31,代码来源:payments.balance.php

示例12: foreach

/* === Hook === */
foreach (cot_getextplugins('sbr.list.query') as $pl) {
    include $pl;
}
/* ===== */
$where = $where ? 'WHERE ' . implode(' AND ', $where) : '';
$order = $order ? 'ORDER BY ' . implode(', ', $order) : '';
$totalitems = $db->query("SELECT COUNT(*) FROM {$db_sbr} \n\t" . $where . "")->fetchColumn();
$sqllist = $db->query("SELECT * FROM {$db_sbr} AS s \n\t" . $where . "\n\t" . $order . "\n\tLIMIT {$d}, " . $cfg['plugin']['sbr']['maxrowsperpage']);
$pagenav = cot_pagenav('sbr', '', $d, $totalitems, $cfg['plugin']['sbr']['maxrowsperpage']);
$sqllist_rowset = $sqllist->fetchAll();
/* === Hook === */
$extp = cot_getextplugins('sbr.list.loop');
/* ===== */
foreach ($sqllist_rowset as $sbr) {
    $jj++;
    $t->assign(cot_generate_usertags($sbr['sbr_employer'], 'SBR_ROW_EMPLOYER_'));
    $t->assign(cot_generate_usertags($sbr['sbr_performer'], 'SBR_ROW_PERFORMER_'));
    $t->assign(cot_generate_sbrtags($sbr, 'SBR_ROW_'));
    /* === Hook - Part2 : Include === */
    foreach ($extp as $pl) {
        include $pl;
    }
    /* ===== */
    $t->parse("MAIN.SBR_ROW");
}
/* === Hook === */
foreach (cot_getextplugins('sbr.list.tags') as $pl) {
    include $pl;
}
/* ===== */
开发者ID:cotemplate,项目名称:cot-sbr,代码行数:31,代码来源:sbr.list.php

示例13: foreach

$env['last_modified'] = $pag['page_updated'];
/* === Hook === */
foreach (cot_getextplugins('page.main') as $pl) {
    include $pl;
}
/* ===== */
if ($pag['page_file']) {
    unset($_SESSION['dl']);
    $_SESSION['dl'] = $id;
}
require_once $cfg['system_dir'] . '/header.php';
require_once cot_incfile('users', 'module');
$t = new XTemplate($mskin);
$t->assign(cot_generate_pagetags($pag, 'PAGE_', 0, $usr['isadmin'], $cfg['homebreadcrumb']));
$t->assign('PAGE_OWNER', cot_build_user($pag['page_ownerid'], htmlspecialchars($pag['user_name'])));
$t->assign(cot_generate_usertags($pag, 'PAGE_OWNER_'));
$pag['page_file'] = intval($pag['page_file']);
if ($pag['page_file'] > 0) {
    if ($sys['now'] > $pag['page_begin']) {
        if (!empty($pag['page_url'])) {
            $dotpos = mb_strrpos($pag['page_url'], ".") + 1;
            $type = mb_strtolower(mb_substr($pag['page_url'], $dotpos, 5));
            $pag['page_fileicon'] = cot_rc('page_icon_file_path');
            if (!file_exists($pag['page_fileicon'])) {
                $pag['page_fileicon'] = cot_rc('page_icon_file_default');
            }
            $pag['page_fileicon'] = cot_rc('page_icon_file', array('icon' => $pag['page_fileicon']));
        } else {
            $pag['page_fileicon'] = '';
        }
        $t->assign(array('PAGE_FILE_SIZE' => $pag['page_size'] / 1024, 'PAGE_FILE_SIZE_BYTES' => $pag['page_size'], 'PAGE_FILE_SIZE_READABLE' => cot_build_filesize($pag['page_size'], 1), 'PAGE_FILE_COUNT' => $pag['page_filecount'], 'PAGE_FILE_ICON' => $pag['page_fileicon'], 'PAGE_FILE_NAME' => basename($pag['page_url']), 'PAGE_FILE_COUNTTIMES' => cot_declension($pag['page_filecount'], $Ls['Times'])));
开发者ID:Roffun,项目名称:Cotonti,代码行数:31,代码来源:page.main.php

示例14: cot_redirect

        }
        /* ===== */
        cot_redirect(cot_url('sbr', 'id=' . $id, '', true));
    }
}
$out['subtitle'] = $L['sbr_addtitle'];
$out['head'] .= $R['code_noindex'];
$mskin = cot_tplfile(array('sbr', 'add'), 'plug');
/* === Hook === */
foreach (cot_getextplugins('sbr.add.main') as $pl) {
    include $pl;
}
/* ===== */
$t = new XTemplate($mskin);
if (!empty($uid)) {
    $t->assign(cot_generate_usertags($uid, 'SBR_PERFORMER_'));
} else {
    $t->assign('SBRADD_FORM_PERFORMER', cot_inputbox('text', 'rsbrperformer', $rsbrperformer, 'placeholder="' . $L['sbr_performer_placeholder'] . '"'));
}
if (!empty($pid)) {
    $t->assign(cot_generate_projecttags($pid, 'SBR_PROJECT_'));
}
$patharray[] = array(cot_url('sbr'), $L['sbr']);
$patharray[] = array(cot_url('sbr', 'm=add&pid=' . $pid . '&uip=' . $uid), $L['sbr_addtitle']);
$t->assign(array('SBRADD_TITLE' => cot_breadcrumbs($patharray, $cfg['homebreadcrumb'], true), 'SBRADD_SUBTITLE' => $L['sbr_addtitle'], 'SBRADD_ADMINEMAIL' => "mailto:" . $cfg['adminemail'], 'SBRADD_FORM_SEND' => cot_url('sbr', 'm=add&pid=' . $pid . '&uid=' . $uid . '&a=add'), 'SBRADD_FORM_OWNER' => cot_build_user($usr['id'], htmlspecialchars($usr['name'])), 'SBRADD_FORM_OWNERID' => $usr['id'], 'SBRADD_FORM_MAINTITLE' => cot_inputbox('text', 'rsbrtitle', $rsbr['sbr_title'])));
for ($i = 1; $i <= $stagescount; $i++) {
    $t->assign(array('STAGEADD_FORM_NUM' => $i, 'STAGEADD_FORM_TITLE' => cot_inputbox('text', 'rstagetitle[' . $i . ']', $rstagetitle[$i]), 'STAGEADD_FORM_TEXT' => cot_textarea('rstagetext[' . $i . ']', $rstagetext[$i], 10, 120, '', 'input_textarea'), 'STAGEADD_FORM_COST' => cot_inputbox('text', 'rstagecost[' . $i . ']', $rstagecost[$i], array('class' => 'stagecost', 'size' => '10', 'maxlength' => '100')), 'STAGEADD_FORM_DAYS' => cot_inputbox('text', 'rstagedays[' . $i . ']', $rstagedays[$i], array('size' => '10', 'maxlength' => '100'))));
    /* === Hook === */
    foreach (cot_getextplugins('sbr.add.stages.tags') as $pl) {
        include $pl;
    }
开发者ID:cotemplate,项目名称:cot-sbr,代码行数:31,代码来源:sbr.add.php

示例15: cot_rc

    $t->assign($x[0], cot_rc('users_link_sort', array('asc_url' => implode($k, $asc), 'desc_url' => implode($k, $desc), 'text' => $x[1])));
}
// Extra fields for users
foreach ($cot_extrafields[$db_users] as $exfld) {
    $uname = strtoupper($exfld['field_name']);
    $fieldtext = isset($L['user_' . $exfld['field_name'] . '_title']) ? $L['user_' . $exfld['field_name'] . '_title'] : $exfld['field_description'];
    $t->assign('USERS_TOP_' . $uname, cot_rc('users_link_sort', array('asc_url' => cot_url('users', array('s' => $exfld['field_name'], 'w' => 'asc') + $users_url_path), 'desc_url' => cot_url('users', array('s' => $exfld['field_name'], 'w' => 'desc') + $users_url_path), 'text' => $fieldtext)));
}
$jj = 0;
/* === Hook - Part1 : Set === */
$extp = cot_getextplugins('users.loop');
/* ===== */
foreach ($sqlusers as $urr) {
    $jj++;
    $t->assign(array('USERS_ROW_ODDEVEN' => cot_build_oddeven($jj), 'USERS_ROW_NUM' => $jj, 'USERS_ROW' => $urr));
    $t->assign(cot_generate_usertags($urr, 'USERS_ROW_'));
    /* === Hook - Part2 : Include === */
    foreach ($extp as $pl) {
        include $pl;
    }
    /* ===== */
    $t->parse('MAIN.USERS_ROW');
}
/* === Hook === */
foreach (cot_getextplugins('users.tags') as $pl) {
    include $pl;
}
/* ===== */
$t->parse('MAIN');
$t->out('MAIN');
require_once cot::$cfg['system_dir'] . '/footer.php';
开发者ID:Roffun,项目名称:Cotonti,代码行数:31,代码来源:users.main.php


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