code stringlengths 1 2.01M | repo_name stringlengths 3 62 | path stringlengths 1 267 | language stringclasses 231
values | license stringclasses 13
values | size int64 1 2.01M |
|---|---|---|---|---|---|
<?php
defined('IN_ADMIN') or exit('No permission resources.');
$field_type = 'varchar'; //字段数据库类型
$field_basic_table = 1; //是否允许作为主表字段
$field_allow_index = 1; //是否允许建立索引
$field_minlength = 0; //字符长度默认最小值
$field_maxlength = ''; //字符长度默认最大值
$field_allow_search = 0; //作为搜索条件
$field_allow_fulltext = 0; /... | 108wo | phpcms/modules/content/fields/map/config.inc.php | PHP | asf20 | 499 |
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td>地图接口选择</td>
<td>
<input type="radio" name="setting[maptype]" value="2"> 百度地图
</td>
</tr>
<tr>
<td>地图API Key </td>
<td><input type="text" name="setting[api_key]" value="" size="30" class="input-text"></td>
</... | 108wo | phpcms/modules/content/fields/map/field_add_form.inc.php | Hack | asf20 | 1,035 |
<?php defined('IN_PHPCMS') or exit('No permission resources.');?>
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td>地图接口选择</td>
<td>
<input type="radio" name="setting[maptype]" value="2" <?php if($setting['maptype']==2) echo 'checked';?>> 百度地图
</td>
</tr>
<tr>
<td>... | 108wo | phpcms/modules/content/fields/map/field_edit_form.inc.php | PHP | asf20 | 1,294 |
function map($field, $value) {
$str = '';
$setting = string2array($this->fields[$field]['setting']);
$setting[width] = $setting[width] ? $setting[width] : '600';
$setting[height] = $setting[height] ? $setting[height] : '400';
list($lngX, $latY,$zoom) = explode('|', $value);
if($setting['maptype']==1)... | 108wo | phpcms/modules/content/fields/map/output.inc.php | PHP | asf20 | 2,995 |
<?php
class content_output {
var $fields;
var $data;
function __construct($modelid,$catid = 0,$categorys = array()) {
$this->modelid = $modelid;
$this->catid = $catid;
$this->categorys = $categorys;
$this->fields = getcache('model_field_'.$modelid,'model');
}
function get($data) {
$this->... | 108wo | phpcms/modules/content/fields/content_output.class.php | PHP | asf20 | 698 |
<?php
$fields = array('text'=>'单行文本',
'textarea'=>'多行文本',
'editor'=>'编辑器',
'catid'=>'栏目',
'title'=>'标题',
'box'=>'选项',
'image'=>'图片',
'images'=>'多图片',
'number'=>'数字',
'datetime'=>'日期和时间',
'posid'=>'推荐位',
'keyword'=>'关键词',
'author'=>'作者',
'copyfrom'=>'来源',... | 108wo | phpcms/modules/content/fields/fields.inc.php | PHP | asf20 | 1,537 |
function keyword($field, $value, $fieldinfo) {
extract($fieldinfo);
if(!$value) $value = $defaultvalue;
return "<input type='text' name='info[$field]' id='$field' value='$value' style='width:280px' {$formattribute} {$css} class='input-text'>";
}
| 108wo | phpcms/modules/content/fields/keyword/form.inc.php | Hack | asf20 | 259 |
<?php
defined('IN_ADMIN') or exit('No permission resources.');
$field_type = 'varchar'; //字段数据库类型
$field_basic_table = 1; //是否允许作为主表字段
$field_allow_index = 1; //是否允许建立索引
$field_minlength = 0; //字符长度默认最小值
$field_maxlength = ''; //字符长度默认最大值
$field_allow_search = 1; //作为搜索条件
$field_allow_fulltext = 0; /... | 108wo | phpcms/modules/content/fields/keyword/config.inc.php | PHP | asf20 | 499 |
<?php defined('IN_PHPCMS') or exit('No permission resources.');?> | 108wo | phpcms/modules/content/fields/keyword/field_edit_form.inc.php | PHP | asf20 | 66 |
function keyword($field, $value) {
if($value == '') return '';
$v = '';
if(strpos($value, ',')===false) {
$tags = explode(' ', $value);
} else {
$tags = explode(',', $value);
}
return $tags;
}
| 108wo | phpcms/modules/content/fields/keyword/output.inc.php | PHP | asf20 | 226 |
<?php
if(!$maxlength) $maxlength = 255;
$maxlength = min($maxlength, 255);
$fieldtype = $issystem ? 'CHAR' : 'VARCHAR';
$sql = "ALTER TABLE `$tablename` CHANGE `$field` `$field` $fieldtype( $maxlength ) NOT NULL DEFAULT '$defaultvalue'";
$db->query($sql);
?> | 108wo | phpcms/modules/content/fields/omnipotent/field_edit.inc.php | PHP | asf20 | 265 |
function omnipotent($field, $value, $fieldinfo) {
extract($fieldinfo);
$formtext = str_replace('{FIELD_VALUE}',$value,$formtext);
$formtext = str_replace('{MODELID}',$this->modelid,$formtext);
preg_match_all('/{FUNC\((.*)\)}/',$formtext,$_match);
foreach($_match[1] as $key=>$match_func) {
$string = ... | 108wo | phpcms/modules/content/fields/omnipotent/form.inc.php | PHP | asf20 | 1,043 |
<?php
$db->query("ALTER TABLE `$tablename` DROP `$field`");
?> | 108wo | phpcms/modules/content/fields/omnipotent/field_delete.inc.php | PHP | asf20 | 65 |
<?php
defined('IN_ADMIN') or exit('No permission resources.');
$field_type = 'varchar'; //字段数据库类型
$field_basic_table = 0; //是否允许作为主表字段
$field_allow_index = 0; //是否允许建立索引
$field_minlength = 0; //字符长度默认最小值
$field_maxlength = ''; //字符长度默认最大值
$field_allow_search = 1; //作为搜索条件
$field_allow_fulltext = 0; /... | 108wo | phpcms/modules/content/fields/omnipotent/config.inc.php | PHP | asf20 | 499 |
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td width="100">表单</td>
<td><textarea name="setting[formtext]" rows="2" cols="20" id="options" style="height:100px;width:400px;"></textarea><BR>
例如:<input type='text' name='info[voteid]' id='voteid' value='{FIELD_VALUE}' style='50' ></t... | 108wo | phpcms/modules/content/fields/omnipotent/field_add_form.inc.php | Hack | asf20 | 1,017 |
<?php defined('IN_PHPCMS') or exit('No permission resources.');?>
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td width="100">表单</td>
<td><textarea name="setting[formtext]" rows="2" cols="20" id="options" style="height:100px;width:400px;"><?php echo htmlspecialchars($setting['formtext']);?></... | 108wo | phpcms/modules/content/fields/omnipotent/field_edit_form.inc.php | PHP | asf20 | 1,539 |
function linkage($field, $value, $fieldinfo) {
$setting = string2array($fieldinfo['setting']);
$linkageid = $setting['linkageid'];
return menu_linkage($linkageid,$field,$value);
}
| 108wo | phpcms/modules/content/fields/linkage/form.inc.php | PHP | asf20 | 193 |
<?php
defined('IN_ADMIN') or exit('No permission resources.');
$field_type = 'number'; //字段数据库类型
$field_basic_table = 1; //是否允许作为主表字段
$field_allow_index = 1; //是否允许建立索引
$field_minlength = 0; //字符长度默认最小值
$field_maxlength = ''; //字符长度默认最大值
$field_allow_search = 1; //作为搜索条件
$field_allow_fulltext = 0; //... | 108wo | phpcms/modules/content/fields/linkage/config.inc.php | PHP | asf20 | 498 |
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td>菜单ID</td>
<td><input type="text" id="linkageid" name="setting[linkageid]" value="0" size="5" class="input-text">
<input type='button' value="在列表中选择" onclick="omnipotent('selectid','?m=admin&c=linkage&a=public_get_list','在列表中选择')" class="... | 108wo | phpcms/modules/content/fields/linkage/field_add_form.inc.php | Hack | asf20 | 1,266 |
<?php defined('IN_PHPCMS') or exit('No permission resources.');?>
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td>菜单ID</td>
<td><input type="text" id="linkageid" name="setting[linkageid]" value="<?php echo $setting['linkageid'];?>" size="5">
<input type='button' value="在列表中选择" onclic... | 108wo | phpcms/modules/content/fields/linkage/field_edit_form.inc.php | PHP | asf20 | 1,693 |
function linkage($field, $value) {
$setting = string2array($this->fields[$field]['setting']);
$datas = getcache($setting['linkageid'],'linkage');
$infos = $datas['data'];
if($setting['showtype']==1 || $setting['showtype']==3) {
$result = get_linkage($value, $setting['linkageid'], $setting['space'], $se... | 108wo | phpcms/modules/content/fields/linkage/output.inc.php | PHP | asf20 | 524 |
function islink($field, $value, $fieldinfo) {
if($value) {
$url = $this->data['url'];
$checked = 'checked';
$_GET['islink'] = 1;
} else {
$disabled = 'disabled';
$url = $checked = '';
$_GET['islink'] = 0;
}
$size = $fieldinfo['size'] ? $fieldinfo['size'] : 25;
return '<input type... | 108wo | phpcms/modules/content/fields/islink/form.inc.php | Hack | asf20 | 647 |
<?php
defined('IN_ADMIN') or exit('No permission resources.');
$field_type = 'number'; //字段数据库类型
$field_basic_table = 1; //是否允许作为主表字段
$field_allow_index = 1; //是否允许建立索引
$field_minlength = 0; //字符长度默认最小值
$field_maxlength = ''; //字符长度默认最大值
$field_allow_search = 1; //作为搜索条件
$field_allow_fulltext = 0; //... | 108wo | phpcms/modules/content/fields/islink/config.inc.php | PHP | asf20 | 498 |
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td>输入框大小</td>
<td><input type="text" name="setting[size]" value="30" size="6" class="input-text"></td>
</tr>
</table> | 108wo | phpcms/modules/content/fields/islink/field_add_form.inc.php | Hack | asf20 | 208 |
<?php defined('IN_PHPCMS') or exit('No permission resources.');?>
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td width="100">输入框大小</td>
<td><input type="text" name="setting[size]" value="<?php echo $setting['size'];?>" size="6" class="input-text"></td>
</tr>
</table> | 108wo | phpcms/modules/content/fields/islink/field_edit_form.inc.php | PHP | asf20 | 315 |
function author($field, $value, $fieldinfo) {
return '<input type="text" name="info['.$field.']" value="'.$value.'" size="30">';
}
| 108wo | phpcms/modules/content/fields/author/form.inc.php | Hack | asf20 | 138 |
<?php
defined('IN_ADMIN') or exit('No permission resources.');
$field_type = 'varchar'; //字段数据库类型
$field_basic_table = 1; //是否允许作为主表字段
$field_allow_index = 1; //是否允许建立索引
$field_minlength = 0; //字符长度默认最小值
$field_maxlength = ''; //字符长度默认最大值
$field_allow_search = 1; //作为搜索条件
$field_allow_fulltext = 0; /... | 108wo | phpcms/modules/content/fields/author/config.inc.php | PHP | asf20 | 499 |
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td>默认值</td>
<td><input type="text" name="setting[defaultvalue]" value="" size="40" class="input-text"></td>
</tr>
</table> | 108wo | phpcms/modules/content/fields/author/field_add_form.inc.php | Hack | asf20 | 209 |
<?php defined('IN_PHPCMS') or exit('No permission resources.');?>
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td>默认值</td>
<td><input type="text" name="setting[defaultvalue]" value="<?php echo $setting['defaultvalue'];?>" size="40" class="input-text" ></td>
</tr>
</table> | 108wo | phpcms/modules/content/fields/author/field_edit_form.inc.php | PHP | asf20 | 315 |
function images($field, $value, $fieldinfo) {
extract($fieldinfo);
$list_str = '';
if($value) {
$value = string2array(html_entity_decode($value,ENT_QUOTES));
if(is_array($value)) {
foreach($value as $_k=>$_v) {
$list_str .= "<li id='image_{$field}_{$_k}' style='padding:1px'><input type='text... | 108wo | phpcms/modules/content/fields/images/form.inc.php | Hack | asf20 | 1,725 |
<?php
defined('IN_ADMIN') or exit('No permission resources.');
$field_type = 'mediumtext'; //字段数据库类型
$field_basic_table = 0; //是否允许作为主表字段
$field_allow_index = 0; //是否允许建立索引
$field_minlength = 0; //字符长度默认最小值
$field_maxlength = ''; //字符长度默认最大值
$field_allow_search = 0; //作为搜索条件
$field_allow_fulltext = 0... | 108wo | phpcms/modules/content/fields/images/config.inc.php | PHP | asf20 | 502 |
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td>允许上传的图片类型</td>
<td><input type="text" name="setting[upload_allowext]" value="gif|jpg|jpeg|png|bmp" size="40" class="input-text"></td>
</tr>
<tr>
<td>是否从已上传中选择</td>
<td><input type="radio" name="setting[isselectimage]" va... | 108wo | phpcms/modules/content/fields/images/field_add_form.inc.php | Hack | asf20 | 614 |
<?php defined('IN_PHPCMS') or exit('No permission resources.');?>
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td>允许上传的图片类型</td>
<td><input type="text" name="setting[upload_allowext]" value="<?php echo $setting['upload_allowext'];?>" size="40" class="input-text"></td>
</tr>
<tr>
... | 108wo | phpcms/modules/content/fields/images/field_edit_form.inc.php | PHP | asf20 | 840 |
function images($field, $value) {
return string2array($value);
}
| 108wo | phpcms/modules/content/fields/images/output.inc.php | PHP | asf20 | 72 |
function images($field, $value) {
//取得图片列表
$pictures = $_POST[$field.'_url'];
//取得图片说明
$pictures_alt = isset($_POST[$field.'_alt']) ? $_POST[$field.'_alt'] : array();
$array = $temp = array();
if(!empty($pictures)) {
foreach($pictures as $key=>$pic) {
$temp['url'] = $pic;
$temp['alt'] =... | 108wo | phpcms/modules/content/fields/images/input.inc.php | PHP | asf20 | 461 |
<?php
class content_form {
var $modelid;
var $fields;
var $id;
var $formValidator;
function __construct($modelid,$catid = 0,$categorys = array()) {
$this->modelid = $modelid;
$this->catid = $catid;
$this->categorys = $categorys;
$this->fields = getcache('model_field_'.$modelid,'model');
$... | 108wo | phpcms/modules/content/fields/content_form.class.php | PHP | asf20 | 2,013 |
<?php
if(!$maxlength) $maxlength = 255;
$maxlength = min($maxlength, 255);
$fieldtype = $issystem ? 'CHAR' : 'VARCHAR';
$sql = "ALTER TABLE `$tablename` CHANGE `$field` `$field` $fieldtype( $maxlength ) NOT NULL DEFAULT '$defaultvalue'";
$db->query($sql);
?> | 108wo | phpcms/modules/content/fields/textarea/field_edit.inc.php | PHP | asf20 | 265 |
function textarea($field, $value, $fieldinfo) {
extract($fieldinfo);
$setting = string2array($setting);
extract($setting);
if(!$value) $value = $defaultvalue;
$allow_empty = 'empty:true,';
if($minlength || $pattern) $allow_empty = '';
if($errortips) $this->formValidator .= '$("#'.$field.'").formVa... | 108wo | phpcms/modules/content/fields/textarea/form.inc.php | PHP | asf20 | 894 |
<?php
$db->query("ALTER TABLE `$tablename` DROP `$field`");
?> | 108wo | phpcms/modules/content/fields/textarea/field_delete.inc.php | PHP | asf20 | 65 |
function text($field, $value, $fieldinfo)
{
return form::text($field, $field, $value, 'text', 15);
}
| 108wo | phpcms/modules/content/fields/textarea/search_form.inc.php | PHP | asf20 | 110 |
<?php
defined('IN_ADMIN') or exit('No permission resources.');
$field_type = 'mediumtext'; //字段数据库类型
$field_basic_table = 0; //是否允许作为主表字段
$field_allow_index = 0; //是否允许建立索引
$field_minlength = 0; //字符长度默认最小值
$field_maxlength = ''; //字符长度默认最大值
$field_allow_search = 0; //作为搜索条件
$field_allow_fulltext = 1... | 108wo | phpcms/modules/content/fields/textarea/config.inc.php | PHP | asf20 | 504 |
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td width="100">文本域宽度</td>
<td><input type="text" name="setting[width]" value="100%" size="10" class="input-text" >%</td>
</tr>
<tr>
<td>文本域高度</td>
<td><input type="text" name="setting[height]" value="46" size="10" class="in... | 108wo | phpcms/modules/content/fields/textarea/field_add_form.inc.php | Hack | asf20 | 762 |
function text($field, $value)
{
return $value === '' ? '' : " `$field` LIKE '%$value%' ";
}
| 108wo | phpcms/modules/content/fields/textarea/search.inc.php | PHP | asf20 | 101 |
<?php defined('IN_PHPCMS') or exit('No permission resources.');?>
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td width="100">文本域宽度</td>
<td><input type="text" name="setting[width]" value="<?php echo $setting['width'];?>" size="10" class="input-text" > %</td>
</tr>
<tr>
<td... | 108wo | phpcms/modules/content/fields/textarea/field_edit_form.inc.php | PHP | asf20 | 1,047 |
function textarea($field, $value) {
if(!$this->fields[$field]['enablehtml']) $value = strip_tags($value);
return $value;
}
| 108wo | phpcms/modules/content/fields/textarea/input.inc.php | PHP | asf20 | 133 |
<?php
class content_update {
var $modelid;
var $fields;
var $data;
function __construct($modelid,$id) {
$this->modelid = $modelid;
$this->fields = getcache('model_field_'.$modelid,'model');
$this->id = $id;
}
function update($data) {
$info = array();
$this->data = $data;
foreach($... | 108wo | phpcms/modules/content/fields/content_update.class.php | PHP | asf20 | 543 |
function number($field, $value, $fieldinfo) {
extract($fieldinfo);
$setting = string2array($setting);
$size = $setting['size'];
if(!$value) $value = $defaultvalue;
return "<input type='text' name='info[$field]' id='$field' value='$value' class='input-text' size='$size' {$formattribute} {$css}>";
}
| 108wo | phpcms/modules/content/fields/number/form.inc.php | Hack | asf20 | 320 |
<?php
defined('IN_ADMIN') or exit('No permission resources.');
$field_type = 'number'; //字段数据库类型
$field_basic_table = 1; //是否允许作为主表字段
$field_allow_index = 1; //是否允许建立索引
$field_minlength = 0; //字符长度默认最小值
$field_maxlength = ''; //字符长度默认最大值
$field_allow_search = 1; //作为搜索条件
$field_allow_fulltext = 0; //... | 108wo | phpcms/modules/content/fields/number/config.inc.php | PHP | asf20 | 498 |
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td width="100">取值范围</td>
<td><input type="text" name="setting[minnumber]" value="1" size="5" class="input-text"> - <input type="text" name="setting[maxnumber]" value="" size="5" class="input-text"></td>
</tr>
<tr>
<td>小数位数:</td>
... | 108wo | phpcms/modules/content/fields/number/field_add_form.inc.php | PHP | asf20 | 1,169 |
<?php defined('IN_PHPCMS') or exit('No permission resources.');?>
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td width="100">取值范围</td>
<td><input type="text" name="setting[minnumber]" value="<?php echo $setting['minnumber'];?>" size="5" class="input-text"> - <input type="text" name="sett... | 108wo | phpcms/modules/content/fields/number/field_edit_form.inc.php | PHP | asf20 | 1,988 |
function editor($field, $value, $fieldinfo) {
$grouplist = getcache('grouplist','member');
$_groupid = param::get_cookie('_groupid');
$grouplist = $grouplist[$_groupid];
extract($fieldinfo);
extract(string2array($setting));
$disabled_page = isset($disabled_page) ? $disabled_page : 0;
if(!$height) ... | 108wo | phpcms/modules/content/fields/editor/form.inc.php | PHP | asf20 | 1,303 |
<?php
defined('IN_ADMIN') or exit('No permission resources.');
$field_type = 'mediumtext'; //字段数据库类型
$field_basic_table = 0; //是否允许作为主表字段
$field_allow_index = 0; //是否允许建立索引
$field_minlength = 0; //字符长度默认最小值
$field_maxlength = ''; //字符长度默认最大值
$field_allow_search = 0; //作为搜索条件
$field_allow_fulltext = 1... | 108wo | phpcms/modules/content/fields/editor/config.inc.php | PHP | asf20 | 502 |
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td width="100">编辑器样式:</td>
<td><input type="radio" name="setting[toolbar]" value="basic" checked> 简洁型 <input type="radio" name="setting[toolbar]" value="full"> 标准型 </td>
</tr>
<tr>
<td>默认值:</td>
<td><textarea name="setting[... | 108wo | phpcms/modules/content/fields/editor/field_add_form.inc.php | PHP | asf20 | 1,529 |
<?php defined('IN_PHPCMS') or exit('No permission resources.');?>
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td width="225">编辑器样式:</td>
<td><input type="radio" name="setting[toolbar]" value="basic" <?php if($setting['toolbar']=='basic') echo 'checked';?>>简洁型 <input type="radio" name="se... | 108wo | phpcms/modules/content/fields/editor/field_edit_form.inc.php | PHP | asf20 | 2,375 |
function editor($field, $value) {
$setting = string2array($this->fields[$field]['setting']);
if($setting['enablekeylink']) {
$value = $this->_keylinks($value, $setting['replacenum'],$setting['link_mode']);
}
return $value;
}
function _base64_encode($t,$str) {
return $t."\"".base64_encode($str)."... | 108wo | phpcms/modules/content/fields/editor/output.inc.php | PHP | asf20 | 1,763 |
function editor($field, $value) {
$setting = string2array($this->fields[$field]['setting']);
$enablesaveimage = $setting['enablesaveimage'];
if(isset($_POST['spider_img'])) $enablesaveimage = 0;
if($enablesaveimage) {
$site_setting = string2array($this->site_config['setting']);
$watermark_enable = ... | 108wo | phpcms/modules/content/fields/editor/input.inc.php | PHP | asf20 | 470 |
function editor($field, $value) {
$attachment_db = pc_base::load_model('attachment_model');
$attachment_db->api_update($GLOBALS['downloadfiles'],'c-'.$this->data['catid'].'-'.$this->id,1);
return $value;
} | 108wo | phpcms/modules/content/fields/editor/update.inc.php | PHP | asf20 | 214 |
function posid($field, $value, $fieldinfo) {
$setting = string2array($fieldinfo['setting']);
$position = getcache('position','commons');
if(empty($position)) return '';
$array = array();
foreach($position as $_key=>$_value) {
if($_value['modelid'] && ($_value['modelid'] != $this->modelid) || ($_val... | 108wo | phpcms/modules/content/fields/posid/form.inc.php | PHP | asf20 | 977 |
<?php
defined('IN_ADMIN') or exit('No permission resources.');
$field_type = 'tinyint'; //字段数据库类型
$field_basic_table = 1; //是否允许作为主表字段
$field_allow_index = 1; //是否允许建立索引
$field_minlength = 0; //字符长度默认最小值
$field_maxlength = ''; //字符长度默认最大值
$field_allow_search = 1; //作为搜索条件
$field_allow_fulltext = 0; /... | 108wo | phpcms/modules/content/fields/posid/config.inc.php | PHP | asf20 | 499 |
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td width="200">每个位置宽度</td>
<td><input type="text" name="setting[width]" value="125" size="5" class="input-text"> px
</td>
</tr>
<tr>
<td>默认选中项</td>
<td><input type="text" name="setting[defaultvalue]" value="" size="20" ... | 108wo | phpcms/modules/content/fields/posid/field_add_form.inc.php | Hack | asf20 | 426 |
<?php defined('IN_PHPCMS') or exit('No permission resources.');?>
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td width="200">每个位置宽度</td>
<td><input type="text" name="setting[width]" value="<?php echo $setting['width'];?>" size="5" class="input-text"> px
</td>
</tr>
<tr>
... | 108wo | phpcms/modules/content/fields/posid/field_edit_form.inc.php | PHP | asf20 | 562 |
function posid($field, $value) {
$number = count($value);
$value = $number==1 ? 0 : 1;
return $value;
}
| 108wo | phpcms/modules/content/fields/posid/input.inc.php | PHP | asf20 | 117 |
function posid($field, $value) {
if(!empty($value) && is_array($value)) {
if($_GET['a']=='add') {
$position_data_db = pc_base::load_model('position_data_model');
$textcontent = array();
foreach($value as $r) {
if($r!='-1') {
if(empty($textcontent)) {
foreach($this->fields AS ... | 108wo | phpcms/modules/content/fields/posid/update.inc.php | PHP | asf20 | 1,555 |
function image($field, $value, $fieldinfo) {
$setting = string2array($fieldinfo['setting']);
extract($setting);
if(!defined('IMAGES_INIT')) {
$str = '<script type="text/javascript" src="'.JS_PATH.'swfupload/swf2ckeditor.js"></script>';
define('IMAGES_INIT', 1);
}
$html = '';
if (defined('IN_A... | 108wo | phpcms/modules/content/fields/image/form.inc.php | Hack | asf20 | 2,590 |
<?php
defined('IN_ADMIN') or exit('No permission resources.');
$field_type = 'varchar'; //字段数据库类型
$field_basic_table = 1; //是否允许作为主表字段
$field_allow_index = 0; //是否允许建立索引
$field_minlength = 0; //字符长度默认最小值
$field_maxlength = ''; //字符长度默认最大值
$field_allow_search = 0; //作为搜索条件
$field_allow_fulltext = 0; /... | 108wo | phpcms/modules/content/fields/image/config.inc.php | PHP | asf20 | 499 |
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td width="100">文本框长度</td>
<td><input type="text" name="setting[size]" size="10" class="input-text"></td>
</tr>
<tr>
<td>默认值</td>
<td><input type="text" name="setting[defaultvalue]" size="40" class="input-text"></td>
... | 108wo | phpcms/modules/content/fields/image/field_add_form.inc.php | Hack | asf20 | 1,442 |
<?php defined('IN_PHPCMS') or exit('No permission resources.');?>
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td width="100">文本框长度</td>
<td><input type="text" name="setting[size]" value="<?php echo $setting['size'];?>" size="10" class="input-text"></td>
</tr>
<tr>
<td>默认值<... | 108wo | phpcms/modules/content/fields/image/field_edit_form.inc.php | PHP | asf20 | 2,223 |
function image($field, $value) {
return trim($value);
}
| 108wo | phpcms/modules/content/fields/image/input.inc.php | PHP | asf20 | 63 |
function typeid($field, $value, $fieldinfo) {
extract($fieldinfo);
$setting = string2array($setting);
if(!$value) $value = $setting['defaultvalue'];
if($errortips) {
$errortips = $this->fields[$field]['errortips'];
$this->formValidator .= '$("#'.$field.'").formValidator({onshow:"",onfocus:"'.$error... | 108wo | phpcms/modules/content/fields/typeid/form.inc.php | PHP | asf20 | 846 |
<?php
defined('IN_ADMIN') or exit('No permission resources.');
$field_type = 'smallint'; //字段数据库类型
$field_basic_table = 1; //是否允许作为主表字段
$field_allow_index = 1; //是否允许建立索引
$field_minlength = 0; //字符长度默认最小值
$field_maxlength = ''; //字符长度默认最大值
$field_allow_search = 1; //作为搜索条件
$field_allow_fulltext = 0; ... | 108wo | phpcms/modules/content/fields/typeid/config.inc.php | PHP | asf20 | 500 |
<table cellpadding="2" cellspacing="1" width="96%">
<tr>
<td>默认值</td>
<td>
<input type="hidden" name="setting[minnumber]" value="5">
<input type="text" name="setting[defaultvalue]" value="0" size="40" class="input-text"> 正整数 最大长度 5 </td>
</tr>
</table> | 108wo | phpcms/modules/content/fields/typeid/field_add_form.inc.php | Hack | asf20 | 303 |
<?php defined('IN_PHPCMS') or exit('No permission resources.');?>
<table cellpadding="2" cellspacing="1" width="96%">
<tr>
<td>默认值</td>
<td>
<input type="hidden" name="setting[minnumber]" value="<?php echo $setting['minnumber'];?>">
<input type="text" name="setting[defaultvalue]" value="<?php ... | 108wo | phpcms/modules/content/fields/typeid/field_edit_form.inc.php | PHP | asf20 | 441 |
function downfile($field, $value, $fieldinfo) {
$list_str = $str = '';
extract(string2array($fieldinfo['setting']));
if($value){
$value_arr = explode('|',$value);
$value = $value_arr['0'];
$sel_server = $value_arr['1'] ? explode(',',$value_arr['1']) : '';
$edit = 1;
} else {
$edit = 0;
... | 108wo | phpcms/modules/content/fields/downfile/form.inc.php | PHP | asf20 | 1,692 |
<?php
defined('IN_ADMIN') or exit('No permission resources.');
$field_type = 'varchar'; //字段数据库类型
$field_basic_table = 0; //是否允许作为主表字段
$field_allow_index = 0; //是否允许建立索引
$field_minlength = 0; //字符长度默认最小值
$field_maxlength = ''; //字符长度默认最大值
$field_allow_search = 0; //作为搜索条件
$field_allow_fulltext = 0; /... | 108wo | phpcms/modules/content/fields/downfile/config.inc.php | PHP | asf20 | 499 |
<?php
$server_list = getcache('downservers','commons');
foreach($server_list as $_r) if (in_array($_r['siteid'],array(0,$this->siteid))) $str .='<span class="ib" style="width:25%">'.$_r['sitename'].'</span>';
?>
<fieldset>
<legend>镜像服务器列表</legend>
<?php echo iconv(CHARSET,'utf-8',$str)?>
</fieldset>
<table cel... | 108wo | phpcms/modules/content/fields/downfile/field_add_form.inc.php | PHP | asf20 | 1,771 |
<?php
defined('IN_PHPCMS') or exit('No permission resources.');
$server_list = getcache('downservers','commons');
foreach($server_list as $_r) if (in_array($_r['siteid'],array(0,$this->siteid))) $str .='<span class="ib" style="width:25%">'.$_r['sitename'].'</span>';
?>
<fieldset>
<legend>镜像服务器列表</legend>
<?php ... | 108wo | phpcms/modules/content/fields/downfile/field_edit_form.inc.php | PHP | asf20 | 2,163 |
function downfile($field, $value) {
extract(string2array($this->fields[$field]['setting']));
$list_str = array();
if($value){
$value_arr = explode('|',$value);
$fileurl = $value_arr['0'];
$sel_server = $value_arr['1'] ? explode(',',$value_arr['1']) : '';
}
$server_list = getcache('downserve... | 108wo | phpcms/modules/content/fields/downfile/output.inc.php | PHP | asf20 | 1,014 |
function downfile($field, $value) {
//取得镜像站点列表
$result = '';
$server_list = count($_POST[$field.'_servers']) > 0 ? implode(',' ,$_POST[$field.'_servers']) : '';
$result = $value.'|'.$server_list;
return $result;
}
| 108wo | phpcms/modules/content/fields/downfile/input.inc.php | PHP | asf20 | 249 |
<?php
if(!$maxlength) $maxlength = 255;
$maxlength = min($maxlength, 255);
$fieldtype = $issystem ? 'CHAR' : 'VARCHAR';
$sql = "ALTER TABLE `$tablename` CHANGE `$field` `$field` $fieldtype( $maxlength ) NOT NULL DEFAULT '$defaultvalue'";
$db->query($sql);
?> | 108wo | phpcms/modules/content/fields/text/field_edit.inc.php | PHP | asf20 | 265 |
function text($field, $value, $fieldinfo) {
extract($fieldinfo);
$setting = string2array($setting);
$size = $setting['size'];
if(!$value) $value = $defaultvalue;
$type = $ispassword ? 'password' : 'text';
$errortips = $this->fields[$field]['errortips'];
if($errortips || $minlength) $this->formVali... | 108wo | phpcms/modules/content/fields/text/form.inc.php | PHP | asf20 | 612 |
<?php
$db->query("ALTER TABLE `$tablename` DROP `$field`");
?> | 108wo | phpcms/modules/content/fields/text/field_delete.inc.php | PHP | asf20 | 65 |
<?php
defined('IN_ADMIN') or exit('No permission resources.');
$field_type = 'varchar'; //字段数据库类型
$field_basic_table = 1; //是否允许作为主表字段
$field_allow_index = 1; //是否允许建立索引
$field_minlength = 0; //字符长度默认最小值
$field_maxlength = ''; //字符长度默认最大值
$field_allow_search = 1; //作为搜索条件
$field_allow_fulltext = 1; /... | 108wo | phpcms/modules/content/fields/text/config.inc.php | PHP | asf20 | 499 |
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td width="100">文本框长度</td>
<td><input type="text" name="setting[size]" value="50" size="10" class="input-text"></td>
</tr>
<tr>
<td>默认值</td>
<td><input type="text" name="setting[defaultvalue]" value="" size="40" class="input... | 108wo | phpcms/modules/content/fields/text/field_add_form.inc.php | Hack | asf20 | 571 |
<?php defined('IN_PHPCMS') or exit('No permission resources.');?>
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td width="100">文本框长度</td>
<td><input type="text" name="setting[size]" value="<?php echo $setting['size'];?>" size="10" class="input-text"></td>
</tr>
<tr>
<td>默认值<... | 108wo | phpcms/modules/content/fields/text/field_edit_form.inc.php | PHP | asf20 | 799 |
function groupid($field, $value, $fieldinfo) {
extract(string2array($fieldinfo['setting']));
$grouplist = getcache('grouplist','member');
foreach($grouplist as $_key=>$_value) {
$data[$_key] = $_value['name'];
}
return '<input type="hidden" name="info['.$field.']" value="1">'.form::checkbox($data,$v... | 108wo | phpcms/modules/content/fields/groupid/form.inc.php | PHP | asf20 | 379 |
<?php
defined('IN_ADMIN') or exit('No permission resources.');
$field_type = 'varchar'; //字段数据库类型
$field_basic_table = 1; //是否允许作为主表字段
$field_allow_index = 1; //是否允许建立索引
$field_minlength = 0; //字符长度默认最小值
$field_maxlength = ''; //字符长度默认最大值
$field_allow_search = 1; //作为搜索条件
$field_allow_fulltext = 0; /... | 108wo | phpcms/modules/content/fields/groupid/config.inc.php | PHP | asf20 | 499 |
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td width="200">默认选择的会员组</td>
<td><input type="text" name="setting[groupids]" value="" size="20" class="input-text"> 填写会员组ID,多个用 “|” 分开</td>
</tr>
</table> | 108wo | phpcms/modules/content/fields/groupid/field_add_form.inc.php | Hack | asf20 | 277 |
<?php defined('IN_PHPCMS') or exit('No permission resources.');?>
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td width="200">默认选择的会员组</td>
<td><input type="text" name="setting[groupids]" value="<?php echo $setting['groupids'];?>" size="20" class="input-text"> 填写会员组ID,多个用 “|” 分开</td>
... | 108wo | phpcms/modules/content/fields/groupid/field_edit_form.inc.php | PHP | asf20 | 378 |
function groupid($field, $value) {
if($value) $value = explode(',',$value);
return $value;
}
| 108wo | phpcms/modules/content/fields/groupid/output.inc.php | PHP | asf20 | 103 |
function groupid($field, $value) {
$datas = '';
if(!empty($_POST[$field]) && is_array($_POST[$field])) {
$datas = implode(',',$_POST[$field]);
}
return $datas;
}
| 108wo | phpcms/modules/content/fields/groupid/input.inc.php | PHP | asf20 | 182 |
function box($field, $value, $fieldinfo) {
$setting = string2array($fieldinfo['setting']);
if($value=='') $value = $this->fields[$field]['defaultvalue'];
$options = explode("\n",$this->fields[$field]['options']);
foreach($options as $_k) {
$v = explode("|",$_k);
$k = trim($v[1]);
$option[$k] ... | 108wo | phpcms/modules/content/fields/box/form.inc.php | PHP | asf20 | 1,196 |
<?php
defined('IN_ADMIN') or exit('No permission resources.');
$field_type = 'int'; //字段数据库类型
$field_basic_table = 1; //是否允许作为主表字段
$field_allow_index = 1; //是否允许建立索引
$field_minlength = 0; //字符长度默认最小值
$field_maxlength = ''; //字符长度默认最大值
$field_allow_search = 1; //作为搜索条件
$field_allow_fulltext = 0; //作为全... | 108wo | phpcms/modules/content/fields/box/config.inc.php | PHP | asf20 | 495 |
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td width="100">选项列表</td>
<td><textarea name="setting[options]" rows="2" cols="20" id="options" style="height:100px;width:400px;">选项名称1|选项值1</textarea></td>
</tr>
<tr>
<td>选项类型</td>
<td>
<input type="radio" name="setting... | 108wo | phpcms/modules/content/fields/box/field_add_form.inc.php | Hack | asf20 | 2,744 |
<?php defined('IN_PHPCMS') or exit('No permission resources.');?>
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td width="100">选项列表</td>
<td><textarea name="setting[options]" rows="2" cols="20" id="options" style="height:100px;width:200px;"><?php echo $setting['options'];?></textarea></td>... | 108wo | phpcms/modules/content/fields/box/field_edit_form.inc.php | PHP | asf20 | 3,756 |
function box($field, $value) {
extract(string2array($this->fields[$field]['setting']));
if($outputtype) {
return $value;
} else {
$options = explode("\n",$this->fields[$field]['options']);
foreach($options as $_k) {
$v = explode("|",$_k);
$k = trim($v[1]);
$option[$k] = $v[0];
}... | 108wo | phpcms/modules/content/fields/box/output.inc.php | PHP | asf20 | 885 |
function box($field, $value) {
if($this->fields[$field]['boxtype'] == 'checkbox') {
if(!is_array($value) || empty($value)) return false;
array_shift($value);
$value = ','.implode(',', $value).',';
return $value;
} elseif($this->fields[$field]['boxtype'] == 'multiple') {
if(is_array($value) &&... | 108wo | phpcms/modules/content/fields/box/input.inc.php | PHP | asf20 | 451 |
function copyfrom($field, $value, $fieldinfo) {
$value_data = '';
if($value && strpos($value,'|')!==false) {
$arr = explode('|',$value);
$value = $arr[0];
$value_data = $arr[1];
}
$copyfrom_array = getcache('copyfrom','admin');
$copyfrom_datas = array(L('copyfrom_tips'));
if(!empty($copyf... | 108wo | phpcms/modules/content/fields/copyfrom/form.inc.php | PHP | asf20 | 646 |
<?php
defined('IN_ADMIN') or exit('No permission resources.');
$field_type = 'varchar'; //字段数据库类型
$field_basic_table = 0; //是否允许作为主表字段
$field_allow_index = 0; //是否允许建立索引
$field_minlength = 0; //字符长度默认最小值
$field_maxlength = ''; //字符长度默认最大值
$field_allow_search = 0; //作为搜索条件
$field_allow_fulltext = 0; /... | 108wo | phpcms/modules/content/fields/copyfrom/config.inc.php | PHP | asf20 | 499 |
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td>默认值</td>
<td><input type="text" name="setting[defaultvalue]" value="" size="50" class="input-text"></td>
</tr>
</table> | 108wo | phpcms/modules/content/fields/copyfrom/field_add_form.inc.php | Hack | asf20 | 209 |
<?php defined('IN_PHPCMS') or exit('No permission resources.');?>
<table cellpadding="2" cellspacing="1" width="98%">
<tr>
<td>默认值</td>
<td><input type="text" name="setting[defaultvalue]" value="<?php echo $setting['defaultvalue'];?>" size="50" class="input-text"></td>
</tr>
</table> | 108wo | phpcms/modules/content/fields/copyfrom/field_edit_form.inc.php | PHP | asf20 | 314 |