コード例 #1
0
ファイル: db.php プロジェクト: vivihengww/redglassco-ww
<?php

header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");
include 'web-config/config.php';
/** Switch Case to Get Action from controller **/
switch ($_GET['action']) {
    case 'add_adv':
        add_adv($con);
        break;
    case 'get_adv':
        get_adv($con);
        break;
    case 'edit_adv':
        edit_adv($con);
        break;
    case 'delete_adv':
        delete_adv($con);
        break;
    case 'update_adv':
        update_adv($con);
        break;
}
/** Function to Add adv **/
function add_adv($con)
{
    $data = json_decode(file_get_contents("php://input"));
    $adv_name = $data->adv_name;
    $adv_desc = "";
    $adv_target_location = "";
    $adv_image_name = $data->adv_image_name;
コード例 #2
0
ファイル: category.dwt.php プロジェクト: nanhuacrab/ecshop
	<?php 
if ($this->_var['ad']) {
    ?>
      <div class="category-bn9"><a href='<?php 
    echo $this->_var['ad']['url'];
    ?>
' target='_blank'><img src='<?php 
    echo $this->_var['ad']['image'];
    ?>
' width='691' height='180' /></a></div>
	<?php 
}
?>
    
    <?php 
$GLOBALS['smarty']->assign('ad', get_adv('首页-分类ID1-广告2'));
?>
	<?php 
if ($this->_var['ad']) {
    ?>
      <div class="category-bn3"><a href='<?php 
    echo $this->_var['ad']['url'];
    ?>
' target='_blank'><img src='<?php 
    echo $this->_var['ad']['image'];
    ?>
' width='231' height='180' /></a></div>
	<?php 
}
?>
    
コード例 #3
0
ファイル: cat_goods.lbi.php プロジェクト: will0306/bianli100
<div class="col_2 f_l" style=" width:215px">

       <div class="ad_sidebar">
   
			 <div class="bd">
             
				  <ul class="picList">
                
					   <li><?php 
echo get_adv('flow_1', $GLOBALS['smarty']->_var['goods_cat']['id']);
?>
</li>
					
					   <li><?php 
echo get_adv('flow_2', $GLOBALS['smarty']->_var['goods_cat']['id']);
?>
</li>

				  </ul>
                  
			</div>
            
            <div class="hd">
				
				<ul></ul>
	
			</div>
        	
       </div>
       
コード例 #4
0
				    <div class="cat-right-con fr">      
					  <dl class="categorys-promotions">           
					   <dt>促销活动</dt>          
					     <dd>               
						  <ul>                  
						    <li>
							 <?php 
            $this->assign('cate1', get_adv('菜单_分类图片1', $this->_var['cat'][id]));
            ?>
							 <?php 
            echo $this->_var['cate1'];
            ?>
							</li>
							<li>
							 <?php 
            $this->assign('cate2', get_adv('菜单_分类图片2', $this->_var['cat'][id]));
            ?>
							 <?php 
            echo $this->_var['cate2'];
            ?>
							</li>              
					  </ul> 
					  </dd> 
					 </dl>
					<dl class="categorys-brands">               
				 <dt>推荐品牌出版商</dt>          
				   <dd>              
				     <ul>                   
					   <?php 
            $this->assign('brand_nav', get_brands($GLOBALS['smarty']->_var['cat']['id']));
            ?>