示例#1
0
 /**
  * json方式读取风格列表,推送部分调用
  */
 public function public_change_tpl()
 {
     pc_base::load_sys_class('form', '', 0);
     $models = getcache('model', 'commons');
     $modelid = intval($_GET['modelid']);
     if ($_GET['modelid']) {
         $style = $models[$modelid]['default_style'];
         $category_template = $models[$modelid]['category_template'];
         $list_template = $models[$modelid]['list_template'];
         $show_template = $models[$modelid]['show_template'];
         $html = array('template_list' => $style, 'category_template' => form::select_template($style, 'content', $category_template, 'name="setting[category_template]"', 'category'), 'list_template' => form::select_template($style, 'content', $list_template, 'name="setting[list_template]"', 'list'), 'show_template' => form::select_template($style, 'content', $show_template, 'name="setting[show_template]"', 'show'));
         if (CHARSET == 'gbk') {
             $html = array_iconv($html, 'gbk', 'utf-8');
         }
         echo json_encode($html);
     }
 }
示例#2
0
 function template($field, $value, $fieldinfo)
 {
     $sitelist = getcache('sitelist', 'commons');
     $default_style = $sitelist[$this->siteid]['default_style'];
     return form::select_template($default_style, 'content', $value, 'name="info[' . $field . ']" id="' . $field . '"', 'show');
 }
示例#3
0
    	<th align="right" valign="top"><?php 
echo L('special_type_template');
?>
:</th>
        <td valign="top" id="list_template"><?php 
echo form::select_template('default', 'special', '', 'name="special[list_template]"', 'list');
?>
        </td>
    </tr>
    <tr>
    	<th align="right"  valign="top"><?php 
echo L('special_content_template');
?>
:</th>
        <td valign="top" id="show_template"><?php 
echo form::select_template('default', 'special', '', 'name="special[show_template]"', 'show');
?>
        </td>
    </tr>
   </table>
   </div>
	 <div class="bk15"></div>
    <input name="dosubmit" type="submit" value="<?php 
echo L('submit');
?>
" class="button">
</div></div>
</form>
</body>
</html>
<script type="text/javascript">
?>
	 </tr>
	 <tr>
	 <?php 
foreach ($batch_array as $catid => $cat) {
    ?>
		<td class="tpl_style"><b><?php 
    echo L('content_tpl');
    ?>
£º</b><br>
		<div id="show_template<?php 
    echo $catid;
    ?>
">
		<?php 
    echo form::select_template($cat['setting']['template_list'], 'content', $cat['setting']['show_template'], 'name="setting[' . $catid . '][show_template]" style="width:250px"', 'show');
    ?>
		</div>
		</td>
	<?php 
}
?>
	 </tr>
	 <tr>
	 <?php 
foreach ($batch_array as $catid => $cat) {
    ?>
		<td><b><?php 
    echo L('workflow');
    ?>
£º</b><br><?php 
示例#5
0
?>
&module=vote&templates=vote_tp&id=<?php 
echo $template;
?>
&name=vote_subject&pc_hash='+pc_hash, function(data){$('#show_template').html(data.vote_tp_template);});</script>
		</td>
	</tr>
	
	<tr>
		<th><?php 
echo L('template');
?>
:</th>
		<td id="show_template">
		<?php 
echo form::select_template('default', 'vote', $template, 'name="vote_subject[show_template]"', 'vote_tp');
?>
		</td>
	</tr>
	
	<tr> 
		<th><?php 
echo L('enabled');
?>
:</th> 
		<td><input name="subject[enabled]" type="radio" value="1" <?php 
echo $enabled ? 'checked' : '';
?>
>&nbsp;<?php 
echo L('yes');
?>
示例#6
0
      <th ><?php 
echo L('category_list_tpl');
?>
</th>
      <td id="list_template"><?php 
echo form::select_template($default_style, 'content', $list_template, 'name="setting[list_template]" id="template_list"', 'list');
?>
</td>
    </tr>
	<tr> 
      <th><?php 
echo L('content_tpl');
?>
</th>
      <td id="show_template"><?php 
echo form::select_template($default_style, 'content', $show_template, 'name="setting[show_template]" id="template_show"', 'show');
?>
</td>
    </tr>
</table>
</fieldset>
<div class="bk15"></div>
	<input type="hidden" name="modelid" value="<?php 
echo $modelid;
?>
" />
    <input type="submit" class="dialog" id="dosubmit" name="dosubmit" value="<?php 
echo L('submit');
?>
" />
</form>
示例#7
0
        <th width="200"><?php 
echo L('admin_content_list');
?>
</th>
        <td  id="admin_list_template"><?php 
echo $admin_list_template;
?>
		</td>
      </tr>
	  <tr>
        <th width="200"><?php 
echo L('member_content_add');
?>
</th>
        <td  id="member_add_template"><?php 
echo form::select_template($default_style, 'member', '', 'name="setting[member_add_template]" id="template_member_add"', 'content_publish');
?>
		</td>
      </tr>
</table>
</fieldset>
<div class="bk15"></div>
    <input type="submit" class="dialog" id="dosubmit" name="dosubmit" value="<?php 
echo L('submit');
?>
" />
</form>
</div>
<script language="JavaScript">
<!--
	function load_file_list(id) {
示例#8
0
    	<script type="text/javascript">$.getJSON('?m=admin&c=category&a=public_tpl_file_list&style=<?php echo $info['default_style']?>&module=special&templates=index|list|show&name=special', function(data){$('#index_template').html(data.index_template);$('#list_template').html(data.list_template);$('#show_template').html(data.show_template);});</script>
        </td>
    </tr>
	<tr>
    	<th align="right"  valign="top"><?php echo L('special_template')?>£º</th>
        <td valign="top" id="index_template"><?php echo form::select_template('default', 'special', '', 'name="special[index_template]"', 'index');?>
        </td>
    </tr>
    <tr>
    	<th align="right" valign="top"><?php echo L('special_type_template')?>£º</th>
        <td valign="top" id="list_template"><?php echo form::select_template('default', 'special', '', 'name="special[list_template]"', 'list');?>
        </td>
    </tr>
    <tr>
    	<th align="right"  valign="top"><?php echo L('special_content_template')?>£º</th>
        <td valign="top" id="show_template"><?php echo form::select_template('default', 'special', '', 'name="special[show_template]"', 'show');?>
        </td>
    </tr>
   </table>
   </div>
	 <div class="bk15"></div>
    <input name="dosubmit" type="submit" value="<?php echo L('submit')?>" class="button">
</div></div>
</form>
</body>
</html>
<script type="text/javascript">
function load_file_list(id) {
	$.getJSON('?m=admin&c=category&a=public_tpl_file_list&style='+id+'&module=special&templates=index|list|show&name=special', function(data){$('#index_template').html(data.index_template);$('#list_template').html(data.list_template);$('#show_template').html(data.show_template);});
}
	?>
		<td class="tpl_style"><b><?php echo L('available_styles')?>:</b><br>
		<?php echo form::select($template_list, $cat['setting']['template_list'], 'name="setting['.$catid.'][template_list]" id="template_list" onchange="load_file_list(this.value,'.$catid.')"', L('please_select'))?> 
		</td>
	<?php
		}
	?>
	 </tr>
	 <tr>
	 <?php
		foreach($batch_array as $catid=>$cat) {
			
	?>
		<td class="tpl_style"><b><?php echo L('page_templates')?>:</b><br>
		<div id="category_template<?php echo $catid;?>">
		<?php echo form::select_template($cat['setting']['template_list'], 'content',$cat['setting']['page_template'],'name="setting['.$catid.'][page_template]" style="width:250px"','page');?>
		</div>
		</td>
	<?php
		}
	?>
	 </tr>
	
	
	<tr>
	 <?php
		foreach($batch_array as $catid=>$cat) {
	?>
		<td><b><?php echo L('ismenu')?>:</b><br>
		<input boxid="ismenu" type='radio' name='info[<?php echo $catid;?>][ismenu]' value='1' <?php if($cat['ismenu']) echo 'checked';?> onclick="change_radio(event,'ismenu',1)"> <?php echo L('yes');?>&nbsp;&nbsp;&nbsp;&nbsp;
		<input boxid="ismenu" type='radio' name='info[<?php echo $catid;?>][ismenu]' value='0' <?php if(!$cat['ismenu']) echo 'checked';?> onclick="change_radio(event,'ismenu',0)"> <?php echo L('no');?>
示例#10
0
:</th>
		<td>
		<?php 
echo form::select($template_list, $default_style, 'name="setting[default_style]" id="style" onchange="load_file_list(this.value)"', L('please_select'));
?>
		 </td>
	</tr>
	
	<tr>
		<th><?php 
echo L('template');
?>
:</th>
		<td id="show_template">
		<?php 
echo form::select_template($default_style, 'vote', $vote_tp_template, 'name="setting[vote_tp_template]"', 'vote_tp');
?>
		</td>
	</tr>
	
	<tr>
		<th><?php 
echo L('default_guest');
?>
:</th>
		<td><input type='radio' name='setting[allowguest]' value='1' <?php 
if ($allowguest == 1) {
    ?>
checked<?php 
}
?>
示例#11
0
		<td>
		<?php 
echo form::select($template_list, $default_style, 'name="vote_subject[style]" id="style" onchange="load_file_list(this.value)"', L('please_select'));
?>
 
		</td>
	</tr>
	
	<tr>
		<th><?php 
echo L('template');
?>
:</th>
		<td id="show_template">
		<?php 
echo form::select_template($default_style, 'vote', $vote_tp_template, 'name="vote_subject[vote_tp_template]"', 'vote_tp');
?>
		</td>
	</tr>
	<tr>
		<th><?php 
echo L('enabled');
?>
:</th>
		<td><input name="subject[enabled]" type="radio" value="1" <?php 
if ($enabled == 1) {
    ?>
checked<?php 
}
?>
>&nbsp;<?php 
示例#12
0
 function template($field, $value, $fieldinfo)
 {
     $sitelist = get_site_info();
     $default_style = $sitelist[$this->siteid]['default_style'];
     $template = form::select_template($default_style, 'content', $value, 'name="info[' . $field . ']" id="' . $field . '"', 'show');
     return $template;
 }