Show
Ignore:
Timestamp:
07/17/07 17:24:45 (18 months ago)
Author:
aarkerio
Message:

Subjects list on front end

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/views/helpers/gags.php

    r22 r45  
    1212   public  $helpers = array('Html', 'Ajax'); 
    1313    
    14    public function confirmDel($id, $controller) { 
     14   public function confirmDel($id, $controller)  
     15   { 
    1516         
    1617        $strB  = $this->Html->formTag('/admin/'.$controller.'/delete/'.$id.'/', 'post', array("onsubmit"=>"return confirm('Are you sure to delete?')")); 
     
    2122   } 
    2223    
    23    public function sendEdit($id, $controller) { 
     24   public function sendEdit($id, $controller)  
     25   { 
    2426         
    2527        $strB  = $this->Html->formTag('/admin/'.$controller.'/edit/'.$id, 'post'); 
     
    3032   } 
    3133    
    32    public function setStatus($s) { 
     34   public function setStatus($s)  
     35   { 
    3336            
    34            $status = ( $s == 1 ) ? 'Publicado' : 'En preparación'; 
     37           $status = ( $s == 1 ) ? 'Published' : 'Draft'; 
    3538            
    3639           return $status; 
     
    4548 } 
    4649 
    47  public function googleAds($page = 1, $position = 'vertical') { 
    48     
    49    switch ($page)  
    50    { 
    51        case 1: 
    52             $div = '<div style="float:left;margin-right:20px;">'; 
    53             break; 
    54        case 2: 
    55             $div = '<div style="float:center;width:50%;margin-left:120px;padding:6px;">'; 
    56             break; 
    57        case 3: 
    58             $div = '<div style="width:100%;padding:0;text-align:center">'; 
    59             break; 
    60        default: 
    61             $div = '<div style="float:left;margin-right:20px;">'; 
    62             break; 
    63    
    64    } 
    65     
    66    if (substr($_SERVER['REMOTE_ADDR'], 0, 7) == '132.248') 
    67    {  
    68        return ''; 
    69    } 
    70     
    71    if ($position == 'vertical')  
    72    { 
    73        $Ads  = $div . 
    74        '<script type="text/javascript"><!-- 
    75        google_ad_client = "pub-0016482957997855"; 
    76        google_ad_width = 336; 
    77        google_ad_height = 280; 
    78        google_ad_format = "336x280_as"; 
    79        google_ad_type = "text_image"; 
    80        google_ad_channel = ""; 
    81        google_color_border = "FFFFFF"; 
    82        google_color_bg = "FFFFFF"; 
    83        google_color_link = "FC6500"; 
    84        google_color_text = "000000"; 
    85        google_color_url = "FC6500"; 
    86        //--></script> 
    87        <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> 
    88        </script></div>'; 
    89    } 
    90    else 
    91    { 
    92        $Ads  = $div . 
    93        '<script type="text/javascript"><!-- 
    94 google_ad_client = "pub-0016482957997855"; 
    95 google_ad_width = 468; 
    96 google_ad_height = 55; 
    97 google_ad_format = "468x60_as"; 
    98 google_ad_type = "text_image"; 
    99 //2007-05-26: Linux 
    100 google_ad_channel = "9033725822"; 
    101 google_color_border = "FFFFFF"; 
    102 google_color_bg = "FFFFFF"; 
    103 google_color_link = "FC6500"; 
    104 google_color_text = "000000"; 
    105 google_color_url = "FC6500"; 
    106 //--> 
    107 </script> 
    108 <script type="text/javascript" 
    109   src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> 
    110 </script>'; 
    111    } 
    112     
    113    return $Ads; 
    114   }  
    11550}