当前位置: 首页>>代码示例>>PHP>>正文


PHP Jfactory::getDate方法代码示例

本文整理汇总了PHP中Jfactory::getDate方法的典型用法代码示例。如果您正苦于以下问题:PHP Jfactory::getDate方法的具体用法?PHP Jfactory::getDate怎么用?PHP Jfactory::getDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Jfactory的用法示例。


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

示例1: store


//.........这里部分代码省略.........
     $zona['link_taketo'] = $data['link_taketo'];
     $zona['cellpadding'] = $data['cellpadding'];
     $zona['adparams'] = $data['adparams'];
     $zona['keywords'] = $data['showkeyws'];
     $zona['ignorestyle'] = $data['ignorestyle'];
     $zona['textadparams'] = @serialize($data['textadparams']);
     $zona['zone_text_below'] = $data['zone_text_below'];
     $zona['zone_content_visibility'] = $data['zone_content_visibility'];
     $zona['zone_content_location'] = $data['zone_content_location'];
     $zona['inventory_zone'] = $data['inventory_zone'];
     if (isset($data['taketo_url'])) {
         $zona['taketo_url'] = $data['taketo_url'];
     } else {
         $zona['taketo_url'] = 'http://';
     }
     /*$zona['suffix'] = 'moduleclass_sfx='.$data['params'];
     
     		$data['params'] = $zona['suffix'];*/
     //'moduleclass_sfx' => $data['params'],
     ////replaced with:
     //echo"<pre>";
     //print_r($data);
     //echo"</pre>";
     //die();
     $arr = array('moduleclass_sfx' => $data['suffix'], 'cache' => $data['cache']);
     $data['params'] = json_encode($arr);
     ///
     if (isset($data['zoneid'])) {
         $data['id'] = $data['zoneid'];
         $zonid = $data['zoneid'];
     }
     $data['module'] = 'mod_ijoomla_adagency_zone';
     if (!isset($data["publish_up"])) {
         $joomla_date = Jfactory::getDate();
         $data["publish_up"] = $joomla_date->toSql();
     }
     if (!$modul->bind($data)) {
         $this->setError($modul->getErrorMsg());
         return false;
     }
     if (!$modul->check()) {
         $this->setError($modul->getErrorMsg());
         return false;
     }
     if (!$modul->store()) {
         $this->setError($modul->getErrorMsg());
         return false;
     }
     if ($zona['zoneid'] == "") {
         $zona['zoneid'] = mysql_insert_id();
         if ($zona['zoneid'] == 0) {
             $ask = "SELECT `id` FROM `#__modules` ORDER BY `id` DESC LIMIT 1 ";
             $db->setQuery($ask);
             $zona['zoneid'] = $db->loadResult();
         }
         if (!isset($zona['z_ordering'])) {
             $zona['z_ordering'] = 0;
         }
         $query = "INSERT INTO #__ad_agency_zone ( `zoneid` , `banners`, `banners_cols` , `z_title` , `z_ordering` , `z_position` , `show_title` , `suffix`, `rotatebanners`, `rotaterandomize`, `rotating_time`, `show_adv_link`, `link_taketo`, `taketo_url`, `cellpadding`, `defaultad`, `keywords`, `adparams`, `ignorestyle`, `textadparams`, `inventory_zone`) VALUES ({$zona['zoneid']}, {$zona['banners']}, {$zona['banners_cols']}, '{$zona['z_title']}', {$zona['z_ordering']}, '{$zona['z_position']}', {$zona['showtitle']}, '{$zona['suffix']}', '{$zona['rotatebanners']}', '{$zona['rotaterandomize']}', '{$zona['rotating_time']}', '{$zona['show_adv_link']}', '{$zona['link_taketo']}', '{$zona['taketo_url']}', '{$zona['cellpadding']}', '{$zone['defaultad']}', '{$zone['keywords']}', '{$zona['adparams']}', '{$zona['ignorestyle']}','{$zona['textadparams']}', " . intval($zona["inventory_zone"]) . ")";
         $db->setQuery($query);
         $db->query();
     } else {
         if (!$item->bind($zona)) {
             $this->setError($item->getErrorMsg());
             return false;
         }
开发者ID:politik86,项目名称:test2,代码行数:67,代码来源:adagencyzone.php


注:本文中的Jfactory::getDate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。