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


PHP cot_selectbox函数代码示例

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


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

示例1: cot_redirect

    cot_redirect($r_url);
    exit;
}
$out['subtitle'] = $L['folio_edit_product_title'];
$out['head'] .= $R['code_noindex'];
$sys['sublocation'] = $structure['folio'][$item['item_cat']]['title'];
$mskin = cot_tplfile(array('folio', 'edit', $structure['folio'][$item['item_cat']]['tpl']));
/* === Hook === */
foreach (cot_getextplugins('folio.edit.main') as $pl) {
    include $pl;
}
/* ===== */
$t = new XTemplate($mskin);
// Error and message handling
cot_display_messages($t);
$t->assign(array("PRDEDIT_FORM_SEND" => cot_url('folio', "m=edit&a=update&id=" . $item['item_id'] . "&r=" . $r), "PRDEDIT_FORM_ID" => $item['item_id'], "PRDEDIT_FORM_CAT" => cot_selectbox_structure('folio', $item['item_cat'], 'rcat'), "PRDEDIT_FORM_CATTITLE" => $structure['folio'][$item['item_cat']]['title'], "PRDEDIT_FORM_TITLE" => cot_inputbox('text', 'rtitle', $item['item_title'], 'size="56"'), "PRDEDIT_FORM_ALIAS" => cot_inputbox('text', 'ralias', $item['item_alias'], array('size' => '32', 'maxlength' => '255')), "PRDEDIT_FORM_TEXT" => cot_textarea('rtext', $item['item_text'], 10, 60, 'id="formtext"', $folioeditor ? 'input_textarea_' . $folioeditor : ''), "PRDEDIT_FORM_COST" => cot_inputbox('text', 'rcost', $item['item_cost'], 'size="10"'), "PRDEDIT_FORM_STATE" => $item['item_state'], "PRDEDIT_FORM_PARSER" => cot_selectbox($item['item_parser'], 'rparser', cot_get_parsers(), cot_get_parsers(), false), "PRDEDIT_FORM_DELETE" => cot_radiobox(0, 'rdelete', array(1, 0), array($L['Yes'], $L['No']))));
// Extra fields
foreach ($cot_extrafields[$db_folio] as $exfld) {
    $uname = strtoupper($exfld['field_name']);
    $exfld_val = cot_build_extrafields('ritem' . $exfld['field_name'], $exfld, $item['item_' . $exfld['field_name']]);
    $exfld_title = isset($L['folio_' . $exfld['field_name'] . '_title']) ? $L['folio_' . $exfld['field_name'] . '_title'] : $exfld['field_description'];
    $t->assign(array('PRDEDIT_FORM_' . $uname => $exfld_val, 'PRDEDIT_FORM_' . $uname . '_TITLE' => $exfld_title, 'PRDEDIT_FORM_EXTRAFLD' => $exfld_val, 'PRDEDIT_FORM_EXTRAFLD_TITLE' => $exfld_title));
    $t->parse('MAIN.EXTRAFLD');
}
/* === Hook === */
foreach (cot_getextplugins('folio.edit.tags') as $pl) {
    include $pl;
}
/* ===== */
$t->parse('MAIN');
$module_body = $t->text('MAIN');
开发者ID:ASDAFF,项目名称:cot-freelance,代码行数:31,代码来源:folio.edit.php

示例2: cot_redirect

    cot_redirect($r_url);
    exit;
}
$out['subtitle'] = $L['projects_edit_project_title'];
$out['head'] .= $R['code_noindex'];
$sys['sublocation'] = $structure['projects'][$item['item_cat']]['title'];
$mskin = cot_tplfile(array('projects', 'edit', $structure['projects'][$item['item_cat']]['tpl']));
/* === Hook === */
foreach (cot_getextplugins('projects.edit.main') as $pl) {
    include $pl;
}
/* ===== */
$t = new XTemplate($mskin);
// Error and message handling
cot_display_messages($t);
$t->assign(array("PRJEDIT_FORM_SEND" => cot_url('projects', "m=edit&a=update&id=" . $item['item_id'] . "&r=" . $r), "PRJEDIT_FORM_ID" => $item['item_id'], "PRJEDIT_FORM_CAT" => cot_selectbox_structure('projects', $item['item_cat'], 'rcat'), "PRJEDIT_FORM_CATTITLE" => $structure['projects'][$item['item_cat']]['title'], "PRJEDIT_FORM_TYPETITLE" => is_array($projects_types) && !empty($item['item_type']) ? $projects_types[$item['item_type']] : '', "PRJEDIT_FORM_TYPE" => is_array($projects_types) ? cot_selectbox($item['item_type'] ? $item['item_type'] : $cfg['projects']['default_type'], 'rtype', array_keys($projects_types), array_values($projects_types)) : 'empty', "PRJEDIT_FORM_TITLE" => cot_inputbox('text', 'rtitle', $item['item_title'], 'size="56"'), "PRJEDIT_FORM_ALIAS" => cot_inputbox('text', 'ralias', $item['item_alias'], array('size' => '32', 'maxlength' => '255')), "PRJEDIT_FORM_TEXT" => cot_textarea('rtext', $item['item_text'], 10, 60, 'id="formtext"', $prjeditor ? 'input_textarea_' . $prjeditor : ''), "PRJEDIT_FORM_COST" => cot_inputbox('text', 'rcost', $item['item_cost'], 'size="10"'), "PRJEDIT_FORM_STATE" => $item['item_state'], "PRJEDIT_FORM_PARSER" => cot_selectbox($item['item_parser'], 'rparser', cot_get_parsers(), cot_get_parsers(), false), "PRJEDIT_FORM_DELETE" => cot_radiobox(0, 'rdelete', array(1, 0), array($L['Yes'], $L['No']))));
// Extra fields
foreach ($cot_extrafields[$db_projects] as $exfld) {
    $uname = strtoupper($exfld['field_name']);
    $exfld_val = cot_build_extrafields('ritem' . $exfld['field_name'], $exfld, $item['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('PRJEDIT_FORM_' . $uname => $exfld_val, 'PRJEDIT_FORM_' . $uname . '_TITLE' => $exfld_title, 'PRJEDIT_FORM_EXTRAFLD' => $exfld_val, 'PRJEDIT_FORM_EXTRAFLD_TITLE' => $exfld_title));
    $t->parse('MAIN.EXTRAFLD');
}
/* === Hook === */
foreach (cot_getextplugins('projects.edit.tags') as $pl) {
    include $pl;
}
/* ===== */
$t->parse('MAIN');
$module_body = $t->text('MAIN');
开发者ID:ASDAFF,项目名称:cot-freelance,代码行数:31,代码来源:projects.edit.php

示例3: cot_selectbox_groups

/**
 * Returns group selection dropdown code
 *
 * @param string 	$chosen Seleced value
 * @param string 	$name Dropdown name
 * @param array 	$skip Hidden groups
 * @param bool 		$add_empty Allow empty choice
 * @param mixed 	$attrs Additional attributes as an associative array or a string
 * @param string 	$custom_rc Custom resource string name
 * @return string
 */
function cot_selectbox_groups($chosen, $name, $skip = null, $add_empty = false, $attrs = '', $custom_rc = '')
{
    global $cot_groups;
    $opts = array();
    if (empty($skip)) {
        $skip = array();
    }
    if (!is_array($skip)) {
        $skip = array($skip);
    }
    foreach ($cot_groups as $k => $i) {
        if (!$i['skiprights'] && !in_array($k, $skip)) {
            $opts[$k] = $cot_groups[$k]['name'];
        }
    }
    return cot_selectbox($chosen, $name, array_keys($opts), array_values($opts), $add_empty, $attrs, $custom_rc);
}
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:28,代码来源:admin.functions.php

示例4: defined

 * @license BSD
 *  */
defined('COT_CODE') or die('Wrong URL.');
require_once cot_langfile('usergroupselector', 'plug');
$prfx = 'USERS_REGISTER_';
if ($m == 'edit') {
    $prfx = 'USERS_EDIT_';
} elseif ($m == 'profile') {
    $prfx = 'USERS_PROFILE_';
}
if (($cfg['plugin']['usergroupselector']['allowchange'] || $cfg['plugin']['usergroupselector']['required']) && $urr['user_maingrp'] != COT_GROUP_SUPERADMINS && $urr['user_maingrp'] != COT_GROUP_MODERATORS) {
    $options = explode(',', $cfg['plugin']['usergroupselector']['groups']);
    $groups_values = array();
    $groups_titles = array();
    foreach ($options as $v) {
        $groups_values[] = $v;
        $groups_titles[] = $cot_groups[$v]['title'];
        if ($usergroup == $cot_groups[$v]['alias']) {
            $usergroupid = $v;
        }
        $t->assign(array('USERGROUP_ROW_ID' => $v, 'USERGROUP_ROW_TITLE' => $cot_groups[$v]['title'], 'USERGROUP_ROW_ALIAS' => $cot_groups[$v]['alias'], 'USERGROUP_ROW_ACTIVEID' => $usergroup == $cot_groups[$v]['alias'] ? true : false));
        $t->parse('MAIN.USERGROUP_ROW');
    }
    if (count($groups_values) == 1) {
        $user_f_group = cot_checkbox($urr['user_usergroup'], 'ruserusergroup', $groups_titles[0], '', $groups_values[0]);
    } else {
        $user_f_group = cot_radiobox($urr['user_usergroup'], 'ruserusergroup', $groups_values, $groups_titles, '', '<br />');
    }
    $t->assign($prfx . 'GROUPSELECT', $user_f_group);
    $t->assign($prfx . 'GROUPSELECTBOX', cot_selectbox($urr['user_usergroup'], 'ruserusergroup', $groups_values, $groups_titles));
}
开发者ID:Andreyjktl,项目名称:cot-freelance,代码行数:31,代码来源:usergroupselector.edit.tags.php

示例5: cot_import

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

示例6: elseif

 if (empty($row['structure_tpl'])) {
     $structure_tpl_sym = '-';
     $check_tpl = "1";
 } elseif ($row['structure_tpl'] == 'same_as_parent') {
     $structure_tpl_sym = '*';
     $check_tpl = "2";
 } else {
     $structure_tpl_sym = '+';
     $check_tpl = "3";
 }
 foreach ($structure[$n] as $i => $x) {
     if ($i != 'all') {
         $cat_path[$i] = $x['tpath'];
     }
 }
 $cat_selectbox = cot_selectbox($row['structure_tpl'], 'rstructuretplforced[' . $structure_id . ']', array_keys($cat_path), array_values($cat_path), false);
 $t->assign(array('ADMIN_STRUCTURE_UPDATE_DEL_URL' => cot_confirm_url(cot_url('admin', 'm=structure&n=' . $n . '&mode=' . $mode . '&a=delete&id=' . $structure_id . '&c=' . $row['structure_code'] . '&d=' . $durl . '&' . cot_xg()), 'admin'), 'ADMIN_STRUCTURE_ID' => $structure_id, 'ADMIN_STRUCTURE_CODE' => cot_inputbox('text', 'rstructurecode[' . $structure_id . ']', $structure_code, 'size="10" maxlength="255"'), 'ADMIN_STRUCTURE_SPACEIMG' => $pathspaceimg, 'ADMIN_STRUCTURE_LEVEL' => $pathfielddep > 0 ? $pathfielddep - 1 : 0, 'ADMIN_STRUCTURE_PATHFIELDIMG' => mb_strpos($row['structure_path'], '.') == 0 ? $R['admin_icon_join1'] : $R['admin_icon_join2'], 'ADMIN_STRUCTURE_PATH' => cot_inputbox('text', 'rstructurepath[' . $structure_id . ']', $row['structure_path'], 'size="12" maxlength="255"'), 'ADMIN_STRUCTURE_TPL_SYM' => $structure_tpl_sym, 'ADMIN_STRUCTURE_TPLMODE' => cot_radiobox($check_tpl, 'rstructuretplmode[' . $structure_id . ']', array('1', '2', '3'), array($L['adm_tpl_empty'], $L['adm_tpl_parent'], $L['adm_tpl_forced']), '', '<br />'), 'ADMIN_STRUCTURE_TPLQUICK' => cot_inputbox('text', 'rstructuretplquick[' . $structure_id . ']', $id > 0 && array_key_exists($row['structure_tpl'], $cat_path) ? '' : $row['structure_tpl'], 'size="10" maxlength="255"'), 'ADMIN_STRUCTURE_TITLE' => cot_inputbox('text', 'rstructuretitle[' . $structure_id . ']', $row['structure_title'], 'size="32" maxlength="255"'), 'ADMIN_STRUCTURE_DESC' => cot_inputbox('text', 'rstructuredesc[' . $structure_id . ']', $row['structure_desc'], 'size="64" maxlength="255"'), 'ADMIN_STRUCTURE_ICON' => cot_inputbox('text', 'rstructureicon[' . $structure_id . ']', $row['structure_icon'], 'size="64" maxlength="128"'), 'ADMIN_STRUCTURE_LOCKED' => cot_checkbox($row['structure_locked'], 'rstructurelocked[' . $structure_id . ']'), 'ADMIN_STRUCTURE_SELECT' => $cat_selectbox, 'ADMIN_STRUCTURE_COUNT' => $row['structure_count'], '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_OPTIONS_URL' => cot_url('admin', 'm=structure&n=' . $n . '&d=' . $durl . '&id=' . $structure_id . '&' . cot_xg()), 'ADMIN_STRUCTURE_ODDEVEN' => cot_build_oddeven($ii)));
 foreach ($cot_extrafields[$db_structure] as $exfld) {
     $exfld_val = cot_build_extrafields('rstructure' . $exfld['field_name'] . '_' . $structure_id, $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($id || !empty($al) ? 'MAIN.OPTIONS.EXTRAFLD' : 'MAIN.DEFAULT.ROW.EXTRAFLD');
 }
 /* === Hook - Part2 : Include === */
 foreach ($extp as $pl) {
     include $pl;
 }
 /* ===== */
 if ($id || !empty($al)) {
     require_once cot_incfile('configuration');
     $optionslist = cot_config_list($is_module ? 'module' : 'plug', $n, $structure_code);
开发者ID:Logodeveloper,项目名称:valencia,代码行数:31,代码来源:admin.structure.php

示例7: while

    while ($line = trim(fgets($fp), " \t\r\n")) {
        $parts = preg_split('#\\s+#', $line);
        $t->assign(array('ADMIN_URLS_ROW_I' => $ii, 'ADMIN_URLS_ROW_AREAS' => cot_selectbox($parts[0], 'area[]', $areas, $areas, false), 'ADMIN_URLS_ROW_PARTS1' => cot_inputbox('text', 'params[]', $parts[1]), 'ADMIN_URLS_ROW_PARTS2' => cot_inputbox('text', 'format[]', $parts[2]), 'ADMIN_URLS_ROW_ODDEVEN' => cot_build_oddeven($ii)));
        /* === Hook - Part2 : Include === */
        foreach ($extp as $pl) {
            include $pl;
        }
        /* ===== */
        $t->parse('MAIN.ROW');
        $ii++;
    }
    fclose($fp);
}
$htaccess = $serv_type == 'apache' && is_writeable('./' . $conf_name) ? true : false;
if ($htaccess) {
    $htdata = file_get_contents('.htaccess');
    $htparts = explode("\n### COTONTI URLTRANS ###\n", $htdata);
    if (count($htparts) == 4) {
        $t->assign('ADMIN_URLS_CUSTOM_HTACCESS', $htparts[2]);
    }
}
// Error and message reporting
cot_display_messages($t);
$t->assign(array('ADMIN_URLS_II' => $ii, 'ADMIN_URLS_FORM_URL' => cot_url('admin', 'm=other&p=urleditor&a=save'), 'ADMIN_URLS_ROW_AREAS' => cot_selectbox('*', 'area[]', $areas, $areas, false), 'ADMIN_URLS_ROW_PARTS1' => cot_inputbox('text', 'params[]', ''), 'ADMIN_URLS_ROW_PARTS2' => cot_inputbox('text', 'format[]', ''), 'ADMIN_URLS_ROW_ODDEVEN' => cot_build_oddeven($ii)));
/* === Hook  === */
foreach (cot_getextplugins('admin.urls.tags') as $pl) {
    include $pl;
}
/* ===== */
$t->parse('MAIN');
$adminmain = $t->text('MAIN');
开发者ID:Roffun,项目名称:Cotonti,代码行数:31,代码来源:urleditor.admin.php

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

示例9: foreach

$areas_val[] = '';
$areas_title[] = '';
foreach ($pt_cfg as $area => $opt) {
    $areas_val[] = $area;
    $areas_title[] = $opt['name'];
}
switch ($pt_cfg[$area]['period']) {
    case 2592000:
        $period = range(1, 12);
        $period_name = $L['paytop_month'];
        break;
    case 604800:
        $period = range(1, 48);
        $period_name = $L['paytop_week'];
        break;
    case 86400:
        $period = range(1, 100);
        $period_name = $L['paytop_day'];
        break;
    case 3600:
        $period = range(1, 100);
        $period_name = $L['paytop_hour'];
        break;
    default:
        $period = range(1, 12);
        $period_name = $L['paytop_month'];
        break;
}
$t->assign(array('TOP_FORM_ACTION_URL' => cot_url('admin', 'm=other&p=paytop&a=add'), 'TOP_FORM_PERIOD' => cot_selectbox($months, 'times', $period, $period, false), 'TOP_FORM_PERIOD_NAME' => $period_name, 'TOP_FORM_AREA' => cot_selectbox('', 'area', $areas_val, $areas_title, false)));
$t->parse('MAIN');
$adminmain = $t->text('MAIN');
开发者ID:Andreyjktl,项目名称:cot-freelance,代码行数:31,代码来源:paytop.admin.php

示例10: cot_selectbox_theme

/**
 * Returns Theme/Scheme selection dropdown
 *
 * @param string $selected_theme Seleced theme
 * @param string $selected_scheme Seleced color scheme
 * @param string $title Dropdown name
 * @return string
 */
function cot_selectbox_theme($selected_theme, $selected_scheme, $input_name)
{
    $themes_info = cot_themes_info();
    $values = array();
    $titles = array();
    foreach ($themes_info as $name => $info) {
        if ($info) {
            $version = $info['Version'];
            $title = $info['Title'] . ($version ? " v{$version}" : '');
            if (sizeof($info['Schemes'])) {
                foreach ($info['Schemes'] as $sc_name => $sc_title) {
                    $values[] = $name . ':' . $sc_name;
                    $titles[] = count($info['Schemes']) > 1 ? $title . ' (' . $sc_title . ')' : $title;
                }
            } else {
                $values[] = "{$name}:default";
                $titles[] = $title;
            }
        }
    }
    return cot_selectbox("{$selected_theme}:{$selected_scheme}", $input_name, $values, $titles, false);
}
开发者ID:Roffun,项目名称:Cotonti,代码行数:30,代码来源:functions.php

示例11: foreach

     /* === Hook - Part2 : Include === */
     foreach ($extp as $pl) {
         include $pl;
     }
     /* ===== */
     $t->parse('MAIN.TABLE.EXTRAFIELDS_ROW');
 }
 $tags_list = '';
 $tags_list_li = '';
 if (is_array($extra_whitelist[$n]['tags'])) {
     foreach ($extra_whitelist[$n]['tags'] as $ktags => $vtags) {
         $tags_list .= cot_rc('admin_exflds_array', array('tplfile' => $ktags, 'tags' => $vtags));
         $tags_list_li .= '<li>' . cot_rc('admin_exflds_array', array('tplfile' => $ktags, 'tags' => $vtags)) . '</li>';
     }
 }
 $t->assign(array('ADMIN_EXTRAFIELDS_URL_FORM_EDIT' => cot_url('admin', 'm=extrafields&n=' . $n . '&a=upd&d=' . $durl), 'ADMIN_EXTRAFIELDS_NAME' => cot_inputbox('text', 'field_name', '', 'class="exfldname"'), 'ADMIN_EXTRAFIELDS_DESCRIPTION' => cot_textarea('field_description', '', 1, 30, 'class="exflddesc"'), 'ADMIN_EXTRAFIELDS_SELECT' => cot_selectbox('input', 'field_type', $field_types, $field_types, false, 'class="exfldtype"'), 'ADMIN_EXTRAFIELDS_VARIANTS' => cot_textarea('field_variants', '', 1, 60, 'class="exfldvariants"'), 'ADMIN_EXTRAFIELDS_PARAMS' => cot_textarea('field_params', '', 1, 60, 'class="exfldparams"'), 'ADMIN_EXTRAFIELDS_HTML' => cot_textarea('field_html', '', 1, 60, 'class="exfldhtml"'), 'ADMIN_EXTRAFIELDS_DEFAULT' => cot_textarea('field_default', '', 1, 60, 'class="exflddefault"'), 'ADMIN_EXTRAFIELDS_REQUIRED' => cot_checkbox(0, 'field_required', '', 'class="exfldrequired"'), 'ADMIN_EXTRAFIELDS_PARSE' => cot_selectbox('HTML', 'field_parse', $parse_type, array($L['Default'], $L['No']), false, 'class="exfldparse"'), 'ADMIN_EXTRAFIELDS_URL_FORM_ADD' => cot_url('admin', 'm=extrafields&n=' . $n . '&a=add&d=' . $durl), 'ADMIN_EXTRAFIELDS_PAGINATION_PREV' => $pagenav['prev'], 'ADMIN_EXTRAFIELDS_PAGNAV' => $pagenav['main'], 'ADMIN_EXTRAFIELDS_PAGINATION_NEXT' => $pagenav['next'], 'ADMIN_EXTRAFIELDS_TOTALITEMS' => $totalitems, 'ADMIN_EXTRAFIELDS_TAGS' => $tags_list));
 cot_display_messages($t);
 if (isset($extra_whitelist[$n]['help'])) {
     $adminhelp = $extra_whitelist[$n]['help'];
 } else {
     $adminhelp = $L['adm_help_info'];
     if (!empty($tags_list)) {
         $adminhelp .= $L['adm_help_newtags'] . '<ul class="follow">' . $tags_list_li . '</ul>';
     }
 }
 /* === Hook  === */
 foreach (cot_getextplugins('admin.extrafields.tags') as $pl) {
     include $pl;
 }
 /* ===== */
 $t->parse('MAIN.TABLE');
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:31,代码来源:admin.extrafields.php

示例12: defined

<?php

/* ====================
[BEGIN_COT_EXT]
Hooks=users.filters
[END_COT_EXT]
==================== */
/**
 * Hidden groups
 *
 * @package HiddenGroups
 * @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('hiddengroups', 'plug');
$grpfilters_titles = array($L['Maingroup']);
$grpfilters_group_values = array(cot_url('users'));
$grpfilters_maingrp_values = array(cot_url('users'));
foreach ($cot_groups as $k => $i) {
    if (!in_array($k, cot_hiddengroups_get(cot_hiddengroups_mode())) || cot_auth('plug', 'hiddengroups', '1')) {
        $grpfilters_titles[] = $cot_groups[$k]['name'];
        $grpfilters_maingrp_values[] = cot_url('users', 'g=' . $k);
        $grpfilters_group_values[] = cot_url('users', 'gm=' . $k);
    }
}
$maingrpfilters = cot_selectbox($g, 'bymaingroup', $grpfilters_maingrp_values, $grpfilters_titles, false, array('onchange' => 'redirect(this)'));
$grpfilters_titles[0] = $L['Group'];
$grpfilters = cot_selectbox($g, 'bygroupms', $grpfilters_group_values, $grpfilters_titles, false, array('onchange' => 'redirect(this)'));
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:29,代码来源:hiddengroups.users.filters.php

示例13: cot_getextplugins

/* === Hook - Part1 : Set === */
$extp = cot_getextplugins('page.admin.loop');
/* ===== */
foreach ($sql_page->fetchAll() as $row) {
    $sql_page_subcount = $db->query("SELECT SUM(structure_count) FROM {$db_structure} WHERE structure_path LIKE '" . $db->prep($structure['page'][$row["page_cat"]]['rpath']) . "%' ");
    $sub_count = $sql_page_subcount->fetchColumn();
    $row['page_file'] = intval($row['page_file']);
    $t->assign(cot_generate_pagetags($row, 'ADMIN_PAGE_', 200));
    $t->assign(array('ADMIN_PAGE_ID_URL' => cot_url('page', 'c=' . $row['page_cat'] . '&id=' . $row['page_id']), 'ADMIN_PAGE_OWNER' => cot_build_user($row['page_ownerid'], htmlspecialchars($row['user_name'])), 'ADMIN_PAGE_FILE_BOOL' => $row['page_file'], 'ADMIN_PAGE_URL_FOR_VALIDATED' => cot_confirm_url(cot_url('admin', $common_params . '&a=validate&id=' . $row['page_id'] . '&d=' . $durl . '&' . cot_xg()), 'page', 'page_confirm_validate'), 'ADMIN_PAGE_URL_FOR_UNVALIDATE' => cot_confirm_url(cot_url('admin', $common_params . '&a=unvalidate&id=' . $row['page_id'] . '&d=' . $durl . '&' . cot_xg()), 'page', 'page_confirm_unvalidate'), 'ADMIN_PAGE_URL_FOR_DELETED' => cot_confirm_url(cot_url('admin', $common_params . '&a=delete&id=' . $row['page_id'] . '&d=' . $durl . '&' . cot_xg()), 'page', 'page_confirm_delete'), 'ADMIN_PAGE_URL_FOR_EDIT' => cot_url('page', 'm=edit&id=' . $row['page_id']), 'ADMIN_PAGE_ODDEVEN' => cot_build_oddeven($ii), 'ADMIN_PAGE_CAT_COUNT' => $sub_count));
    $t->assign(cot_generate_usertags($row['page_ownerid'], 'ADMIN_PAGE_OWNER_'), htmlspecialchars($row['user_name']));
    /* === Hook - Part2 : Include === */
    foreach ($extp as $pl) {
        include $pl;
    }
    /* ===== */
    $t->parse('MAIN.PAGE_ROW');
    $ii++;
}
$is_row_empty = $sql_page->rowCount() == 0 ? true : false;
$totaldbpages = $db->countRows($db_pages);
$sql_page_queued = $db->query("SELECT COUNT(*) FROM {$db_pages} WHERE page_state=1");
$sys['pagesqueued'] = $sql_page_queued->fetchColumn();
$t->assign(array('ADMIN_PAGE_URL_CONFIG' => cot_url('admin', 'm=config&n=edit&o=module&p=page'), 'ADMIN_PAGE_URL_ADD' => cot_url('page', 'm=add'), 'ADMIN_PAGE_URL_EXTRAFIELDS' => cot_url('admin', 'm=extrafields&n=' . $db_pages), 'ADMIN_PAGE_URL_STRUCTURE' => cot_url('admin', 'm=structure&n=page'), 'ADMIN_PAGE_FORM_URL' => cot_url('admin', $common_params . '&a=update_checked&d=' . $durl), 'ADMIN_PAGE_ORDER' => cot_selectbox($sorttype, 'sorttype', array_keys($sort_type), array_values($sort_type), false), 'ADMIN_PAGE_WAY' => cot_selectbox($sortway, 'sortway', array_keys($sort_way), array_values($sort_way), false), 'ADMIN_PAGE_FILTER' => cot_selectbox($filter, 'filter', array_keys($filter_type), array_values($filter_type), false), 'ADMIN_PAGE_TOTALDBPAGES' => $totaldbpages, 'ADMIN_PAGE_PAGINATION_PREV' => $pagenav['prev'], 'ADMIN_PAGE_PAGNAV' => $pagenav['main'], 'ADMIN_PAGE_PAGINATION_NEXT' => $pagenav['next'], 'ADMIN_PAGE_TOTALITEMS' => $totalitems, 'ADMIN_PAGE_ON_PAGE' => $ii));
cot_display_messages($t);
/* === Hook  === */
foreach (cot_getextplugins('page.admin.tags') as $pl) {
    include $pl;
}
/* ===== */
$t->parse('MAIN');
$adminmain = $t->text('MAIN');
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:31,代码来源:page.admin.php

示例14: cot_check

    cot_check(empty($urr['user_id']), 'paypro_error_userempty');
    cot_check(empty($months), 'paypro_error_monthsempty');
    if (!cot_error_found()) {
        $rpro['user_pro'] = $urr['user_pro'] > $sys['now'] ? $urr['user_pro'] + $months * 30 * 24 * 60 * 60 : $sys['now'] + $months * 30 * 24 * 60 * 60;
        $db->update($db_users, $rpro, "user_id=" . $urr['user_id']);
    }
    cot_redirect(cot_url('admin', 'm=other&p=paypro', '', true));
}
if ($a == 'delete') {
    $db->update($db_users, array("user_pro" => 0), "user_id=?", array($id));
    cot_redirect(cot_url('admin', 'm=other&p=paypro', '', true));
}
$prousers = $db->query("SELECT * FROM {$db_users} AS u WHERE user_maingrp>3 ORDER BY user_pro DESC, user_name ASC")->fetchAll();
foreach ($prousers as $urr) {
    if ($id == $urr['user_id']) {
        $username = $urr['user_name'];
    }
    if ($urr['user_pro'] > 0) {
        $t->assign(cot_generate_usertags($urr, 'PRO_ROW_USER_'));
        $t->assign(array('PRO_ROW_EXPIRE' => $urr['user_pro']));
        $t->parse('MAIN.PRO_ROW');
    } else {
        $otherusers[] = $urr['user_name'];
    }
}
cot_display_messages($t);
if (is_array($otherusers)) {
    $t->assign(array('PRO_FORM_ACTION_URL' => cot_url('admin', 'm=other&p=paypro&a=add'), 'PRO_FORM_PERIOD' => cot_selectbox($months, 'months', array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), false), 'PRO_FORM_SELECTUSER' => cot_selectbox($username, 'username', $otherusers)));
}
$t->parse('MAIN');
$adminmain = $t->text('MAIN');
开发者ID:Andreyjktl,项目名称:cot-freelance,代码行数:31,代码来源:paypro.admin.php

示例15: cot_selectbox_gender

/**
 * Generates gender dropdown
 *
 * @param string $check Checked gender
 * @param string $name Input name
 * @return string
 */
function cot_selectbox_gender($check, $name)
{
    global $L;
    $genlist = array('U', 'M', 'F');
    $titlelist = array();
    foreach ($genlist as $i) {
        $titlelist[] = $L['Gender_' . $i];
    }
    return cot_selectbox($check, $name, $genlist, $titlelist, false);
}
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:17,代码来源:users.functions.php


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