• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP makeoption函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: missionfield

function missionfield($cname, $ename, $setting = array(), $datatype = 'text')
{
    global $rprojects;
    $mcell = in_array($datatype, array('images', 'files', 'flashs', 'medias')) ? 1 : 0;
    //是否是多集模式字段
    $noremote = in_array($datatype, array('int', 'float', 'select', 'mselect', 'date')) ? 1 : 0;
    //是否不存在附件下载因素的字段
    ${'clearhtml' . $ename} = isset($setting['clearhtml']) && !$mcell ? explode(',', $setting['clearhtml']) : array();
    $rpidsarr = array('0' => lang('notremote'));
    foreach ($rprojects as $rpid => $rproject) {
        $rpidsarr[$rpid] = $rproject['cname'];
    }
    $frompagearr = array('0' => lang('based_content_page0'), '1' => lang('netsilistpage'), '2' => lang('content_trace_page0_1'), '3' => lang('content_trace_page0_2'));
    echo "<tr class=\"category\"><td><b>[" . mhtmlspecialchars($cname) . "]</b></td><td colspan=\"3\"></td></tr>";
    echo "<tr>\n" . "<td width=\"15%\" class=\"item1\">" . lang('contensourcpage') . "</td>\n" . "<td width=\"35%\" class=\"item2\"><select style=\"vertical-align: middle;\" name=\"fsettingsnew[{$ename}][frompage]\">" . makeoption($frompagearr, empty($setting['frompage']) ? 0 : $setting['frompage']) . "</select></td>\n" . "<td width=\"15%\" class=\"item1\">" . lang('resultdealfunc') . "</td>\n" . "<td class=\"item2\"><input type=\"text\" size=\"25\" name=\"fsettingsnew[{$ename}][func]\" value=\"" . (empty($setting['func']) ? '' : mhtmlspecialchars($setting['func'])) . "\"></td>\n" . "</tr>\n";
    if (!$mcell) {
        echo "<tr>\n" . "<td width=\"15%\" class=\"item1\">" . lang('fiecontgathpatt') . "</td>\n" . "<td class=\"item2\"><textarea rows=\"4\" name=\"fsettingsnew[{$ename}][ftag]\" cols=\"40\">" . (isset($setting['ftag']) ? mhtmlspecialchars($setting['ftag']) : '') . "</textarea></td>\n" . "<td width=\"15%\" class=\"item1\">" . lang('clear') . "Html<br><input class=\"checkbox\" type=\"checkbox\" name=\"chk{$ename}\" onclick=\"checkall(this.form,'clearhtml{$ename}','chk{$ename}')\">" . lang('selectall') . "</td>\n" . "<td class=\"item2\">" . "<input type=\"checkbox\" class=\"checkbox\" name=\"clearhtml{$ename}[]\" value=\"1\"" . (in_array('1', ${'clearhtml' . $ename}) ? " checked" : "") . ">&lt;a&gt;&nbsp;&nbsp;\n" . "<input type=\"checkbox\" class=\"checkbox\" name=\"clearhtml{$ename}[]\" value=\"2\"" . (in_array('2', ${'clearhtml' . $ename}) ? " checked" : "") . ">&lt;br&gt;&nbsp;&nbsp;\n" . "<input type=\"checkbox\" class=\"checkbox\" name=\"clearhtml{$ename}[]\" value=\"3\"" . (in_array('3', ${'clearhtml' . $ename}) ? " checked" : "") . ">&lt;table&gt;&nbsp;&nbsp;\n" . "<input type=\"checkbox\" class=\"checkbox\" name=\"clearhtml{$ename}[]\" value=\"4\"" . (in_array('4', ${'clearhtml' . $ename}) ? " checked" : "") . ">&lt;tr&gt;&nbsp;&nbsp;\n" . "<input type=\"checkbox\" class=\"checkbox\" name=\"clearhtml{$ename}[]\" value=\"5\"" . (in_array('5', ${'clearhtml' . $ename}) ? " checked" : "") . ">&lt;td&gt;&nbsp;&nbsp;<br>\n" . "<input type=\"checkbox\" class=\"checkbox\" name=\"clearhtml{$ename}[]\" value=\"6\"" . (in_array('6', ${'clearhtml' . $ename}) ? " checked" : "") . ">&lt;p&gt;&nbsp;&nbsp;\n" . "<input type=\"checkbox\" class=\"checkbox\" name=\"clearhtml{$ename}[]\" value=\"7\"" . (in_array('7', ${'clearhtml' . $ename}) ? " checked" : "") . ">&lt;font&gt;&nbsp;&nbsp;\n" . "<input type=\"checkbox\" class=\"checkbox\" name=\"clearhtml{$ename}[]\" value=\"8\"" . (in_array('8', ${'clearhtml' . $ename}) ? " checked" : "") . ">&lt;div&gt;&nbsp;&nbsp;\n" . "<input type=\"checkbox\" class=\"checkbox\" name=\"clearhtml{$ename}[]\" value=\"9\"" . (in_array('9', ${'clearhtml' . $ename}) ? " checked" : "") . ">&lt;span&gt;&nbsp;&nbsp;<br>\n" . "<input type=\"checkbox\" class=\"checkbox\" name=\"clearhtml{$ename}[]\" value=\"10\"" . (in_array('10', ${'clearhtml' . $ename}) ? " checked" : "") . ">&lt;tbody&gt;&nbsp;&nbsp;\n" . "<input type=\"checkbox\" class=\"checkbox\" name=\"clearhtml{$ename}[]\" value=\"11\"" . (in_array('11', ${'clearhtml' . $ename}) ? " checked" : "") . ">&lt;b&gt;&nbsp;&nbsp;\n" . "<input type=\"checkbox\" class=\"checkbox\" name=\"clearhtml{$ename}[]\" value=\"12\"" . (in_array('12', ${'clearhtml' . $ename}) ? " checked" : "") . ">&amp;nbsp;&nbsp;&nbsp;\n" . "<input type=\"checkbox\" class=\"checkbox\" name=\"clearhtml{$ename}[]\" value=\"13\"" . (in_array('13', ${'clearhtml' . $ename}) ? " checked" : "") . ">&lt;script&gt;&nbsp;&nbsp;\n" . "</td>\n" . "</tr>\n";
        echo "<tr>\n" . "<td width=\"15%\" class=\"item1\">" . lang('replmesssouront') . "</td>\n" . "<td class=\"item2\"><textarea rows=\"4\" name=\"fsettingsnew[{$ename}][fromreplace]\" cols=\"40\">" . (isset($setting['fromreplace']) ? mhtmlspecialchars($setting['fromreplace']) : '') . "</textarea></td>\n" . "<td width=\"15%\" class=\"item1\">" . lang('repmessagresulcont') . "</td>\n" . "<td class=\"item2\"><textarea rows=\"4\" name=\"fsettingsnew[{$ename}][toreplace]\" cols=\"40\">" . (isset($setting['toreplace']) ? mhtmlspecialchars($setting['toreplace']) : '') . "</textarea></td>\n" . "</tr>\n";
    } else {
        echo "<tr>\n" . "<td width=\"15%\" class=\"item1\">" . lang('lisregigathpatt') . "</td>\n" . "<td class=\"item2\"><textarea rows=\"4\" name=\"fsettingsnew[{$ename}][ftag]\" cols=\"40\">" . (isset($setting['ftag']) ? mhtmlspecialchars($setting['ftag']) : '') . "</textarea></td>\n" . "<td width=\"15%\" class=\"item1\">" . lang('liscellsplitag') . "</td>\n" . "<td class=\"item2\"><textarea rows=\"4\" name=\"fsettingsnew[{$ename}][splittag]\" cols=\"40\">" . (isset($setting['splittag']) ? mhtmlspecialchars($setting['splittag']) : '') . "</textarea></td>\n" . "</tr>\n";
        echo "<tr>\n" . "<td width=\"15%\" class=\"item1\">" . lang('cellurlgathpatte') . "</td>\n" . "<td class=\"item2\"><textarea rows=\"4\" name=\"fsettingsnew[{$ename}][remotetag]\" cols=\"40\">" . (isset($setting['remotetag']) ? mhtmlspecialchars($setting['remotetag']) : '') . "</textarea></td>\n" . "<td width=\"15%\" class=\"item1\">" . lang('celltitlgathepatt') . "</td>\n" . "<td class=\"item2\"><textarea rows=\"4\" name=\"fsettingsnew[{$ename}][titletag]\" cols=\"40\">" . (isset($setting['titletag']) ? mhtmlspecialchars($setting['titletag']) : '') . "</textarea></td>\n" . "</tr>\n";
    }
    if (!$noremote) {
        echo "<tr>\n" . "<td width=\"15%\" class=\"item1\">" . lang('remote_download') . "</td>\n" . "<td width=\"35%\" class=\"item2\"><select style=\"vertical-align: middle;\" name=\"fsettingsnew[{$ename}][rpid]\">" . makeoption($rpidsarr, empty($setting['rpid']) ? 0 : $setting['rpid']) . "</select></td>\n" . "<td width=\"15%\" class=\"item1\">" . lang('downjumfilsty') . "</td>\n" . "<td class=\"item2\"><input type=\"text\" size=\"25\" name=\"fsettingsnew[{$ename}][jumpfile]\" value=\"" . (empty($setting['jumpfile']) ? '' : mhtmlspecialchars($setting['jumpfile'])) . "\"></td>\n" . "</tr>\n";
    }
}
开发者ID:polarlight1989,项目名称:08cms,代码行数:26,代码来源:gather.fun.php


示例2: makePathfield

/**
 * Returns a valid html tag for the choosen $fieldType for pathes
 *
 * @param  string   path       The path to start searching in
 * @param  integer  uid        The uid which must match the found directories
 * @param  integer  gid        The gid which must match the found direcotries
 * @param  string   fieldType  Either "Manual" or "Dropdown"
 * @return string   The html tag for the choosen $fieldType
 *
 * @author Martin Burchert  <[email protected]>
 * @author Manuel Bernhardt <[email protected]>
 */
function makePathfield($path, $uid, $gid, $fieldType, $value = '')
{
    global $lng;
    $value = str_replace($path, '', $value);
    $field = '';
    if ($fieldType == 'Manual') {
        $field = '<input type="text" name="path" value="' . htmlspecialchars($value) . '" size="30" />';
    } elseif ($fieldType == 'Dropdown') {
        $dirList = findDirs($path, $uid, $gid);
        natcasesort($dirList);
        if (sizeof($dirList) > 0) {
            $field = '<select name="path">';
            foreach ($dirList as $key => $dir) {
                if (strpos($dir, $path) === 0) {
                    $dir = makeCorrectDir(substr($dir, strlen($path)));
                }
                $field .= makeoption($dir, $dir, $value);
            }
            $field .= '</select>';
        } else {
            $field = $lng['panel']['dirsmissing'];
            $field .= '<input type="hidden" name="path" value="/" />';
        }
    }
    return $field;
}
开发者ID:HobbyNToys,项目名称:SysCP,代码行数:38,代码来源:function.makePathfield.php


示例3: phpVersionOptions

function phpVersionOptions($customerID, $domainID)
{
    global $db, $availablePHPVersions;
    $selectedPHPVersion = currentPHPVersion($customerID, $domainID);
    $phpVersionOptions = '';
    foreach ($availablePHPVersions as $phpVersion) {
        if (checkNitradoServiceLimit($customerID, 'php', 'php_version', $phpVersion)) {
            $phpVersionOptions .= makeoption($phpVersion, $phpVersion, $selectedPHPVersion, true);
        }
    }
    return $phpVersionOptions;
}
开发者ID:Alkyoneus,项目名称:Froxlor,代码行数:12,代码来源:customer_domains.php


示例4: getFormOverviewGroupOutput

function getFormOverviewGroupOutput($groupname, $groupdetails)
{
    global $lng, $filename, $s, $theme;
    $group = '';
    $title = $groupdetails['title'];
    $part = $groupname;
    $activated = true;
    $option = '';
    if (isset($groupdetails['fields'])) {
        foreach ($groupdetails['fields'] as $fieldname => $fielddetails) {
            if (isset($fielddetails['overview_option']) && $fielddetails['overview_option'] == true) {
                if ($fielddetails['type'] != 'option' && $fielddetails['type'] != 'bool') {
                    standard_error('overviewsettingoptionisnotavalidfield');
                }
                if ($fielddetails['type'] == 'option') {
                    $options_array = $fielddetails['option_options'];
                    $options = '';
                    foreach ($options_array as $value => $vtitle) {
                        $options .= makeoption($vtitle, $value, Settings::Get($fielddetails['settinggroup'] . '.' . $fielddetails['varname']));
                    }
                    $option .= $fielddetails['label'] . ':&nbsp;';
                    $option .= '<select class="dropdown_noborder" name="' . $fieldname . '">';
                    $option .= $options;
                    $option .= '</select>';
                    $activated = true;
                } else {
                    $option .= $lng['admin']['activated'] . ':&nbsp;';
                    $option .= makeyesno($fieldname, '1', '0', Settings::Get($fielddetails['settinggroup'] . '.' . $fielddetails['varname']));
                    $activated = (int) Settings::Get($fielddetails['settinggroup'] . '.' . $fielddetails['varname']);
                }
            }
        }
    }
    /**
     * this part checks for the 'websrv_avail' entry in the settings
     * if found, we check if the current webserver is in the array. If this
     * is not the case, we change the setting type to "hidden", #502
     */
    $do_show = true;
    if (isset($groupdetails['websrv_avail']) && is_array($groupdetails['websrv_avail'])) {
        $websrv = Settings::Get('system.webserver');
        if (!in_array($websrv, $groupdetails['websrv_avail'])) {
            $do_show = false;
            $title .= sprintf($lng['serversettings']['option_unavailable_websrv'], implode(", ", $groupdetails['websrv_avail']));
            // hack disabled flag into select-box
            $option = str_replace('<select class', '<select disabled="disabled" class', $option);
        }
    }
    eval("\$group = \"" . getTemplate("settings/settings_overviewgroup") . "\";");
    return $group;
}
开发者ID:hypernics,项目名称:Froxlor,代码行数:51,代码来源:function.getFormGroupOutput.php


示例5: makePathfield

/**
 * Returns a valid html tag for the chosen $fieldType for paths
 *
 * @param string  path      The path to start searching in
 * @param integer uid       The uid which must match the found directories
 * @param integer gid       The gid which must match the found direcotries
 * @param string  value     the value for the input-field
 *
 * @return string   The html tag for the chosen $fieldType
 *
 * @author Martin Burchert  <[email protected]>
 * @author Manuel Bernhardt <[email protected]>
 */
function makePathfield($path, $uid, $gid, $value = '', $dom = false)
{
    global $lng;
    $value = str_replace($path, '', $value);
    $field = array();
    // path is given without starting slash
    // but dirList holds the paths with starting slash
    // so we just add one here to get the correct
    // default path selected, #225
    if (substr($value, 0, 1) != '/' && !$dom) {
        $value = '/' . $value;
    }
    $fieldType = Settings::Get('panel.pathedit');
    if ($fieldType == 'Manual') {
        $field = array('type' => 'text', 'value' => htmlspecialchars($value));
    } elseif ($fieldType == 'Dropdown') {
        $dirList = findDirs($path, $uid, $gid);
        natcasesort($dirList);
        if (sizeof($dirList) > 0) {
            if (sizeof($dirList) <= 100) {
                $_field = '';
                foreach ($dirList as $key => $dir) {
                    if (strpos($dir, $path) === 0) {
                        $dir = substr($dir, strlen($path));
                        // docroot cut off of current directory == empty -> directory is the docroot
                        if (empty($dir)) {
                            $dir = '/';
                        }
                        $dir = makeCorrectDir($dir);
                    }
                    $_field .= makeoption($dir, $dir, $value);
                }
                $field = array('type' => 'select', 'value' => $_field);
            } else {
                // remove starting slash we added
                // for the Dropdown, #225
                $value = substr($value, 1);
                //$field = $lng['panel']['toomanydirs'];
                $field = array('type' => 'text', 'value' => htmlspecialchars($value), 'note' => $lng['panel']['toomanydirs']);
            }
        } else {
            //$field = $lng['panel']['dirsmissing'];
            //$field = '<input type="hidden" name="path" value="/" />';
            $field = array('type' => 'hidden', 'value' => '/', 'note' => $lng['panel']['dirsmissing']);
        }
    }
    return $field;
}
开发者ID:hypernics,项目名称:Froxlor,代码行数:61,代码来源:function.makePathfield.php


示例6: trfield

 function trfield($varpre = '', $noeditstr = '', $ftype = '', $typeid = 0)
 {
     if (empty($this->field['ename']) || empty($this->field['available'])) {
         return;
     }
     $trname = ($this->field['notnull'] ? '*' : '') . $this->field['cname'] . $noeditstr;
     $varname = !$varpre ? $this->field['ename'] : $varpre . '[' . $this->field['ename'] . ']';
     $oldstr = $this->isadd ? $this->field['vdefault'] : $this->oldvalue;
     //多项选择
     foreach (array('datatype', 'mode', 'guide', 'min', 'max') as $var) {
         ${$var} = $this->field[$var];
     }
     if ($datatype == 'cacc') {
         $setting = empty($this->field['innertext']) ? array() : unserialize($this->field['innertext']);
         trcacc($trname, $varname, $oldstr, $this->field['length'], @$setting['source'], @$setting['ids'], $mode, $max ? intval($max) : 0, $guide);
     } else {
         if (in_array($datatype, array('text', 'int', 'float'))) {
             $oldstr = mhtmlspecialchars($oldstr);
             $datatype = 'text';
         } elseif ($datatype == 'select') {
             $sourcearr = select_arr($this->field['innertext'], $this->field['fromcode']);
             $oldstr = !$mode ? makeoption($sourcearr, $oldstr) : makeradio($varname, $sourcearr, $oldstr);
         } elseif ($datatype == 'mselect') {
             $sourcearr = select_arr($this->field['innertext'], $this->field['fromcode']);
             $oldarr = explode("\t", $oldstr);
             $oldstr = !$mode ? multiselect($varname . '[]', $sourcearr, $oldarr) : makecheckbox($varname . '[]', $sourcearr, $oldarr);
         } elseif ($datatype == 'multitext') {
             $oldstr = mhtmlspecialchars($oldstr);
         } elseif ($datatype == 'date') {
             $oldstr = $oldstr ? date('Y-m-d', $oldstr) : '';
         } elseif ($datatype == 'map') {
             !$oldstr && ($oldstr = $this->field['vdefault']);
             $min = $this->field['length'];
         } elseif ($datatype == 'vote') {
             $mode = $ftype;
             $max = $min;
             $min = $typeid;
         }
         trspecial($trname, $varname, $oldstr, $datatype, $mode, $guide, $min, $max);
     }
     $this->make_submitstr($varname);
 }
开发者ID:polarlight1989,项目名称:08cms,代码行数:42,代码来源:fields.cls.php


示例7: getFormFieldOutputOption

/**
 * This file is part of the Froxlor project.
 * Copyright (c) 2003-2009 the SysCP Team (see authors).
 * Copyright (c) 2010 the Froxlor Team (see authors).
 *
 * For the full copyright and license information, please view the COPYING
 * file that was distributed with this source code. You can also view the
 * COPYING file online at http://files.froxlor.org/misc/COPYING.txt
 *
 * @copyright  (c) the authors
 * @author     Florian Lippert <[email protected]> (2003-2009)
 * @author     Froxlor team <[email protected]> (2010-)
 * @license    GPLv2 http://files.froxlor.org/misc/COPYING.txt
 * @package    Functions
 *
 */
function getFormFieldOutputOption($fieldname, $fielddata)
{
    $returnvalue = '';
    if (isset($fielddata['option_options']) && is_array($fielddata['option_options']) && !empty($fielddata['option_options'])) {
        if (isset($fielddata['option_mode']) && $fielddata['option_mode'] == 'multiple') {
            $multiple = true;
            $fielddata['value'] = explode(',', $fielddata['value']);
        } else {
            $multiple = false;
        }
        $label = $fielddata['label'];
        $options_array = $fielddata['option_options'];
        $options = '';
        foreach ($options_array as $value => $title) {
            $options .= makeoption($title, $value, $fielddata['value']);
        }
        eval("\$returnvalue = \"" . getTemplate("formfields/option", true) . "\";");
    }
    return $returnvalue;
}
开发者ID:cobrafast,项目名称:Froxlor,代码行数:36,代码来源:function.getFormFieldOutputOption.php


示例8: getIntervalTypes

/**
 * Get all date interval types as an array or option code
 *
 * @param  string Either array or option, affects the value returned by function
 * @param  string Only relevant when first argument is option, this one will be the selected one
 * @return mixed  Depends on first option, array of intervaltypes or optioncode of intervaltypes ready to be inserted in a select statement
 *
 * @author Former03 GmbH :: Florian Lippert <[email protected]>
 */
function getIntervalTypes($what = 'array', $selected = '')
{
    global $lng;
    $intervalTypes = array('y', 'm', 'd');
    if (!in_array($selected, $intervalTypes)) {
        $selected = '';
    }
    switch ($what) {
        case 'option':
            $returnval = '';
            foreach ($intervalTypes as $intervalFeeType) {
                $returnval .= makeoption($lng['panel']['intervalfee_type'][$intervalFeeType], $intervalFeeType, $selected);
            }
            break;
        case 'array':
        default:
            $returnval = $intervalTypes;
            break;
    }
    return $returnval;
}
开发者ID:HobbyNToys,项目名称:SysCP,代码行数:30,代码来源:function.getIntervalTypes.php


示例9: array

}
if (!empty($indays)) {
    $wheresql .= " AND s.createdate>'" . ($timestamp - 86400 * $indays) . "'";
}
if (!empty($outdays)) {
    $wheresql .= " AND s.createdate<'" . ($timestamp - 86400 * $outdays) . "'";
}
if (!submitcheck('barcsedit')) {
    $caidsarr = array('0' => lang('allcatalog')) + caidsarr($catalogs);
    $chidsarr = array('0' => lang('allchannel')) + chidsarr();
    $isatmarr = array('0' => lang('archive'), '1' => lang('attachment'));
    tabheader(lang('filtersubscribe') . viewcheck('viewdetail', $viewdetail, 'tbodyfilter') . '&nbsp; &nbsp; ' . strbutton('bfilter', 'filter0'), "?action=subscribes{$forwardstr}");
    trbasic(lang('subscribetype'), '', makeradio('isatm', $isatmarr, $isatm), '');
    echo "<tbody id=\"tbodyfilter\" style=\"display: " . (empty($viewdetail) ? 'none' : '') . "\">";
    trbasic(lang('belongcatalog'), 'caid', makeoption($caidsarr, $caid), 'select');
    trbasic(lang('archivechannel'), 'chid', makeoption($chidsarr, $chid), 'select');
    trbasic(lang('archivetitle'), 'subject', $subject);
    trrange(lang('purchasedate'), array('outdays', empty($outdays) ? '' : $outdays, '', '&nbsp; ' . lang('daybefore') . '&nbsp; -&nbsp; ', 5), array('indays', empty($indays) ? '' : $indays, '', '&nbsp; ' . lang('dayin'), 5));
    echo "</tbody>";
    tabfooter();
    $pagetmp = $page;
    do {
        $query = $db->query("SELECT s.*,a.* FROM {$tblprefix}subscribes s LEFT JOIN {$tblprefix}archives a ON a.aid=s.aid {$wheresql} ORDER BY s.id DESC LIMIT " . ($pagetmp - 1) * $mrowpp . ",{$mrowpp}");
        $pagetmp--;
    } while (!$db->num_rows($query) && $pagetmp);
    $itemstr = '';
    while ($item = $db->fetch_array($query)) {
        $id = $item['id'];
        $item['arcurl'] = view_arcurl($item);
        $item['createdate'] = date("{$dateformat}", $item['createdate']);
        $itemstr .= "<tr><td class=\"item\" width=\"40\"><input class=\"checkbox\" type=\"checkbox\" name=\"selectid[{$id}]\" value=\"{$id}\"></td>\n" . "<td class=\"item2\"><a href=\"{$item['arcurl']}\" target=\"_blank\">" . mhtmlspecialchars($item['subject']) . "</a></td>\n" . "<td class=\"item\" width=\"80\">" . $catalogs[$item['caid']]['title'] . "</td>\n" . "<td class=\"item\" width=\"80\">" . ($item['isatm'] ? 'Y' : '-') . "</td>\n" . "<td class=\"item\" width=\"80\">{$item['cridstr']}</td>\n" . "<td class=\"item\" width=\"70\">{$item['createdate']}</td></tr>\n";
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:subscribes.inc.php


示例10: makeoption

     echo "<select style=\"vertical-align: middle;\" name=\"areply\">" . makeoption($areplyarr, $areply) . "</select>&nbsp; ";
 }
 //栏目搜索
 if (in_array('catalog', $u_filters)) {
     $caidsarr = array('0' => lang('catalog')) + caidsarr($catalogs);
     echo "<select style=\"vertical-align: middle;\" name=\"caid\">" . makeoption($caidsarr, $caid) . "</select>&nbsp; ";
 }
 foreach ($ucotypes as $k => $v) {
     //报价类系的搜索
     if (in_array('uccid' . $k, $u_filters) && $v['cclass'] == 'reply') {
         $ucoclasses = read_cache('ucoclasses', $k);
         $uccidsarr = array();
         foreach ($ucoclasses as $k1 => $v2) {
             $uccidsarr[$k1] = $v1['title'];
         }
         echo "<select style=\"vertical-align: middle;\" name=\"uccid{$k}\">" . makeoption($uccidsarr, empty(${"uccid{$k}"}) ? 0 : ${"uccid{$k}"}) . "</select>&nbsp; ";
     }
 }
 echo strbutton('bfilter', 'filter0') . '</td></tr>';
 tabfooter();
 $pagetmp = $page;
 do {
     $query = $db->query("SELECT cu.*,cu.createdate AS ucreatedate,a.sid,a.createdate,a.caid,a.chid,a.customurl,a.subject AS asubject {$fromsql} {$wheresql} ORDER BY cu.refreshdate DESC LIMIT " . ($pagetmp - 1) * $mrowpp . ",{$mrowpp}");
     $pagetmp--;
 } while (!$db->num_rows($query) && $pagetmp);
 tabheader(empty($u_mtitle) ? lang('replylist') : $u_mtitle, '', '', 30);
 $cy_arr = array("<input class=\"checkbox\" type=\"checkbox\" name=\"chkall\" onclick=\"checkall(this.form, 'selectid', 'chkall')\">", lang('title'), lang('member'));
 if (in_array('catalog', $u_lists)) {
     $cy_arr[] = lang('catalog');
 }
 if (in_array('channel', $u_lists)) {
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:areplys.inc.php


示例11: parseAndOutputPreconfig

/**
 * checks if the new-version has some updating to do
 *
 * @param boolean $has_preconfig   pointer to check if any preconfig has to be output
 * @param string  $return          pointer to output string
 * @param string  $current_version current froxlor version
 *
 * @return null
 */
function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
{
    global $lng;
    if (versionInUpdate($current_version, '0.9.4-svn2')) {
        $has_preconfig = true;
        $description = 'Froxlor now enables the usage of a domain-wildcard entry and subdomains for this domain at the same time (subdomains are parsed before the main-domain vhost container).';
        $description .= 'This makes it possible to catch all non-existing subdomains with the main vhost but also have the ability to use subdomains for that domain.<br />';
        $description .= 'If you would like Froxlor to do so with your domains, the update script can set the correct values for existing domains for you. Note: future domains will have wildcard-entries enabled by default no matter how you decide here.';
        $question = '<strong>Do you want to use wildcard-entries for existing domains?:</strong>&nbsp;';
        $question .= makeyesno('update_domainwildcardentry', '1', '0', '1');
        eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
    }
    if (versionInUpdate($current_version, '0.9.6-svn2')) {
        if (!PHPMailer::ValidateAddress(Settings::Get('panel.adminmail'))) {
            $has_preconfig = true;
            $description = 'Froxlor uses a newer version of the phpMailerClass and determined that your current admin-mail address is invalid.';
            $question = '<strong>Please specify a new admin-email address:</strong>&nbsp;<input type="text" class="text" name="update_adminmail" value="' . Settings::Get('panel.adminmail') . '" />';
            eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
        }
    }
    if (versionInUpdate($current_version, '0.9.6-svn3')) {
        $has_preconfig = true;
        $description = 'You now have the possibility to define default error-documents for your webserver which replace the default webserver error-messages.';
        $question = '<strong>Do you want to enable default error-documents?:</strong>&nbsp;';
        $question .= makeyesno('update_deferr_enable', '1', '0', '0') . '<br /><br />';
        if (Settings::Get('system.webserver') == 'apache2') {
            $question .= 'Path/URL for error 500:&nbsp;<input type="text" class="text" name="update_deferr_500" /><br /><br />';
            $question .= 'Path/URL for error 401:&nbsp;<input type="text" class="text" name="update_deferr_401" /><br /><br />';
            $question .= 'Path/URL for error 403:&nbsp;<input type="text" class="text" name="update_deferr_403" /><br /><br />';
        }
        $question .= 'Path/URL for error 404:&nbsp;<input type="text" class="text" name="update_deferr_404" />';
        eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
    }
    if (versionInUpdate($current_version, '0.9.6-svn4')) {
        $has_preconfig = true;
        $description = 'You can define a default support-ticket priority level which is pre-selected for new support-tickets.';
        $question = '<strong>Which should be the default ticket-priority?:</strong>&nbsp;';
        $question .= '<select name="update_deftic_priority">';
        $priorities = makeoption($lng['ticket']['high'], '1', '2');
        $priorities .= makeoption($lng['ticket']['normal'], '2', '2');
        $priorities .= makeoption($lng['ticket']['low'], '3', '2');
        $question .= $priorities . '</select>';
        eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
    }
    if (versionInUpdate($current_version, '0.9.6-svn5')) {
        $has_preconfig = true;
        $description = 'If you have more than one PHP configurations defined in Froxlor you can now set a default one which will be used for every domain.';
        $question = '<strong>Select default PHP configuration:</strong>&nbsp;';
        $question .= '<select name="update_defsys_phpconfig">';
        $configs_array = getPhpConfigs();
        $configs = '';
        foreach ($configs_array as $idx => $desc) {
            $configs .= makeoption($desc, $idx, '1');
        }
        $question .= $configs . '</select>';
        eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
    }
    if (versionInUpdate($current_version, '0.9.6-svn6')) {
        $has_preconfig = true;
        $description = 'For the new FTP-quota feature, you can now chose the currently used ftpd-software.';
        $question = '<strong>Used FTPd-software:</strong>&nbsp;';
        $question .= '<select name="update_defsys_ftpserver">';
        $question .= makeoption('ProFTPd', 'proftpd', 'proftpd');
        $question .= makeoption('PureFTPd', 'pureftpd', 'proftpd');
        $question .= '</select>';
        eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
    }
    if (versionInUpdate($current_version, '0.9.7-svn1')) {
        $has_preconfig = true;
        $description = 'You can now choose whether customers can select the http-redirect code and which of them acts as default.';
        $question = '<strong>Allow customer chosen redirects?:</strong>&nbsp;';
        $question .= makeyesno('update_customredirect_enable', '1', '0', '1') . '<br /><br />';
        $question .= '<strong>Select default redirect code (default: empty):</strong>&nbsp;';
        $question .= '<select name="update_customredirect_default">';
        $redirects = makeoption('--- (' . $lng['redirect_desc']['rc_default'] . ')', 1, '1');
        $redirects .= makeoption('301 (' . $lng['redirect_desc']['rc_movedperm'] . ')', 2, '1');
        $redirects .= makeoption('302 (' . $lng['redirect_desc']['rc_found'] . ')', 3, '1');
        $redirects .= makeoption('303 (' . $lng['redirect_desc']['rc_seeother'] . ')', 4, '1');
        $redirects .= makeoption('307 (' . $lng['redirect_desc']['rc_tempred'] . ')', 5, '1');
        $question .= $redirects . '</select>';
        eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
    }
    if (versionInUpdate($current_version, '0.9.7-svn2')) {
        $result = Database::query("SELECT `domain` FROM " . TABLE_PANEL_DOMAINS . " WHERE `documentroot` LIKE '%:%' AND `documentroot` NOT LIKE 'http://%' AND `openbasedir_path` = '0' AND `openbasedir` = '1'");
        $wrongOpenBasedirDomain = array();
        while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
            $wrongOpenBasedirDomain[] = $row['domain'];
        }
        if (count($wrongOpenBasedirDomain) > 0) {
            $has_preconfig = true;
            $description = 'Resetting the open_basedir to customer - root';
//.........这里部分代码省略.........
开发者ID:greybyte,项目名称:froxlor-mn,代码行数:101,代码来源:preconfig_0.9.inc.php


示例12: trbasic

    trbasic(lang('arr_pre'), 'mtagnew[setting][val]', empty($mtag['setting']['val']) ? 'v' : $mtag['setting']['val'], 'text', lang('agarr_pre'));
    trbasic(lang('list_result'), 'mtagnew[setting][limits]', empty($mtag['setting']['limits']) ? '10' : $mtag['setting']['limits']);
    $arr = array('archives' => lang('archive'), 'members' => lang('member'), 'farchives' => lang('freeinfo'), 'catalogs' => lang('catalog'), 'coclass' => lang('coclass'), 'offers' => lang('offer'), 'replys' => lang('reply'), 'comments' => lang('comment'), 'mcfields' => lang('mcomment'), 'mrfields' => lang('mreply'));
    echo "<tr class=\"txt\"><td class=\"txt txtright fB borderright\">" . lang('vote_type') . "</td>\n";
    echo "<td class=\"txtL\">\n";
    echo "<input class=\"radio\" type=\"radio\" name=\"mtagnew[setting][type]\" value=\"\" onclick=\"\$id('vote_type1').style.display = '';\$id('vote_type2').style.display = 'none';\"" . (empty($mtag['setting']['type']) ? ' checked' : '') . ">" . lang('freevote') . "\n";
    $i = 1;
    foreach ($arr as $k => $v) {
        echo "<input class=\"radio\" type=\"radio\" name=\"mtagnew[setting][type]\" value=\"{$k}\" onclick=\"\$id('vote_type1').style.display = 'none';\$id('vote_type2').style.display = '';\"" . (@$mtag['setting']['type'] == $k ? ' checked' : '') . ">{$v}\n";
        echo $i % 6 ? '' : '<br>';
        $i++;
    }
    echo "</td></tr>\n";
    echo "<tbody id=\"vote_type1\" style=\"display:" . (empty($mtag['setting']['type']) ? '' : 'none') . "\">";
    $sourcearr = array('0' => lang('nolimit_coclass')) + vcaidsarr();
    trbasic(lang('vote_coclass_limited'), 'mtagnew[setting][vsource]', makeoption($sourcearr, empty($mtag['setting']['vsource']) ? '0' : $mtag['setting']['vsource']), 'select');
    trbasic(lang('vote_id_limited'), 'mtagnew[setting][vids]', empty($mtag['setting']['vids']) ? '' : $mtag['setting']['vids']);
    echo "</tbody>";
    echo "<tbody id=\"vote_type2\" style=\"display:" . (!empty($mtag['setting']['type']) ? '' : 'none') . "\">";
    trbasic(lang('soucerid'), 'mtagnew[setting][id]', isset($mtag['setting']['id']) ? $mtag['setting']['id'] : '', 'text');
    trbasic(lang('soucefname'), 'mtagnew[setting][fname]', isset($mtag['setting']['fname']) ? $mtag['setting']['fname'] : '', 'text');
    echo "</tbody>";
    trbasic(lang('tagjspick'), 'mtagnew[setting][js]', empty($mtag['setting']['js']) ? 0 : $mtag['setting']['js'], 'radio');
    tabfooter();
} else {
    $mtagnew['setting']['fname'] = trim($mtagnew['setting']['fname']);
    if (empty($mtagnew['template'])) {
        if (!submitcheck('bmtagcode')) {
            amessage('input_tag_tpl', M_REFERER);
        } else {
            $errormsg = lang('input_tag_tpl');
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:votes.php


示例13: _checkboxGroup

    public function _checkboxGroup($attr)
    {
        $tag = $this->parseXmlAttr($attr, 'checkboxGroup');
        $name = $tag['name'];
        //表单名称[name]
        $id = !empty($tag['id']) ? $tag['id'] : $tag['name'];
        //表单ID[id]//没值则用NAME为值
        $value = $tag['value'];
        //表单[value]//没值则
        $class = empty($tag['class']) ? $tag['class'] : '';
        //表单class//没值则用NAME为值
        $style = empty($tag['style']) ? $tag['style'] : '';
        //表单[style]//没值则
        $disabled = $tag['disabled'] == 1 ? 'disabled' : '';
        //表单[disabled]//没值则
        $readonly = $tag['readonly'] == 1 ? 'readonly' : '';
        //表单[readonly]//没值则
        $othervar = $tag['othervar'];
        //表单[othervar]//没值则
        $outtable = $tag['outtable'];
        //表单[outtable]//没值则
        $outkey = $tag['outkey'];
        //表单[outkey]//没值则
        $outfield = $tag['outfield'];
        //表单[outfield]//没值则
        $outcondition = $tag['outcondition'];
        //表单[outcondition]//没值则
        $outorder = $tag['outorder'];
        //表单[outorder]//没值则
        $outadd = $tag['outadd'];
        //表单[outadd]//没值则
        if (!empty($outtable)) {
            if ($outtable == 'array') {
                $optionval = explode(',', $outfield);
                if (!empty($outkey)) {
                    $optionkey = explode(',', $outkey);
                    $options = array_combine($optionkey, $optionval);
                } else {
                    $options = $optionval;
                }
                $parseStr = '<?php  $options=array(';
                foreach ($options as $key => $val) {
                    $parseStr .= '"' . $key . '" => "' . $val . '", ';
                }
                $parseStr .= '); ?>';
            } else {
                $options = makeoption($outtable, $outkey, $outcondition, $outfield, $outorder, $outadd);
                $parseStr .= '<?php  $options=makeoption("' . $outtable . '","' . $outkey . '","' . $outcondition . '","' . $outfield . '","' . $outorder . '","' . $outadd . '"); ?>';
            }
        }
        $parseStr .= '<?php 
		 $value="' . $value . '";//写入相应的值
		 $tmpvale=explode(",",$value);//看看是不是多选的值,以","号为分隔
		if(count($tmpvale)>1){ $value=$tmpvale; }else{ $value=$value; } ?>';
        if (!empty($options)) {
            $parseStr .= '<?php  foreach($options as $key=>$val) { ?>';
            if (!empty($value)) {
                $parseStr .= '<?php if($value== $key  || in_array($key,$value) ) { ?>';
                $parseStr .= '<label><input id="' . $id . '_tmpval" name="' . $name . '_tmpval" type="checkbox"  value="<?php echo $key ?>" checked="checked" onchange="' . $name . 'updatevalue();" /><?php echo $val ?></label> ';
                $parseStr .= '<?php }else { ?><label><input id="' . $id . '_tmpval" name="' . $name . '_tmpval" type="checkbox"  value="<?php echo $key ?>"  onchange="' . $name . 'updatevalue();" /><?php echo $val ?></label> ';
                $parseStr .= '<?php } ?>';
            } else {
                $parseStr .= '<label><input id="' . $id . '_tmpval" name="' . $name . '_tmpval" type="checkbox"  value="<?php echo $key ?>"  onchange="' . $name . 'updatevalue();" /><?php echo $val ?></label>';
            }
            $parseStr .= '<?php } ?>';
        }
        $parseStr .= '
	 <input type="hidden" value="' . $value . '"  id="' . $id . '" name="' . $name . '">
	 <script  type="text/javascript">
function ' . $name . 'updatevalue(){
var s = document.getElementsByName("' . $name . '_tmpval");
var treuval = document.getElementsByName("' . $name . '");
var s2 = "";
for( var i = 0; i < s.length; i++ )
{
if ( s[i].checked ){
s2 += s[i].value+",";
}
}
s2 = s2.substr(0,s2.length-1);
treuval.value=s2;
//alert(treuval.value);
}
</script>';
        return $parseStr;
    }
开发者ID:lee99,项目名称:tpmaker,代码行数:86,代码来源:TagLibMkrtags.class.php


示例14: exit

<?php

(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
if (empty($commu['uconfig'])) {
    if ($action == 'commudetail') {
        if (empty($submitmode)) {
            trbasic(lang('operate_permi_set'), 'communew[setting][apmid]', makeoption(pmidsarr('cuadd'), empty($commu['setting']['apmid']) ? 0 : $commu['setting']['apmid']), 'select');
            trbasic(lang('nouservote'), 'communew[setting][nouservote]', isset($commu['setting']['nouservote']) ? $commu['setting']['nouservote'] : 0, 'radio');
            trbasic(lang('repeatvote'), 'communew[setting][repeatvote]', isset($commu['setting']['repeatvote']) ? $commu['setting']['repeatvote'] : 0, 'radio');
            trbasic(lang('answer_minlength'), 'communew[setting][minlength]', isset($commu['setting']['minlength']) ? $commu['setting']['minlength'] : 0);
            trbasic(lang('answer_maxlength'), 'communew[setting][maxlength]', isset($commu['setting']['maxlength']) ? $commu['setting']['maxlength'] : 0);
            trbasic(lang('item_ava_days'), 'communew[setting][vdays]', isset($commu['setting']['vdays']) ? $commu['setting']['vdays'] : 0);
            trbasic(lang('reward_currency_type'), 'communew[setting][crid]', makeoption(cridsarr(), isset($commu['setting']['crid']) ? $commu['setting']['crid'] : 0), 'select');
            trbasic(lang('allow_reward_mini_cu'), 'communew[setting][mini]', isset($commu['setting']['mini']) ? $commu['setting']['mini'] : 0);
            trbasic(lang('allow_reward_max_cu'), 'communew[setting][max]', isset($commu['setting']['max']) ? $commu['setting']['max'] : 0);
            trbasic(lang('credit_val_reward_cu'), 'communew[setting][credit]', isset($commu['setting']['credit']) ? $commu['setting']['credit'] : 0);
            tabfooter();
            tabheader(lang('advsetting') . "&n 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP makepagelink函数代码示例发布时间:2022-05-15
下一篇:
PHP makelink函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap