¤5 class Cms_Moduletpl_Contrast { public static function getModule($psid,$data) { $app = Zen┘<:registryT_-Nyegistry::APP); $request = Zend::registry(Git_Registry::REQUEST); $mdb = Git_Db::factory($app->config['db']); $sql = "SELECT * FROM piap_sites WHERE site_id = '$psid' LIMIT 1 "; $site = $mdb->fetch($sql,Cms::getCacheTime()); $sql = "SELECT * FROM piap_mod_contrast WHERE site_id = '$psid' ; "; $dane = $mdb->fetch($sql,Cms::getCacheTime()); // _dp($_SESSION); $txt = ''; if($dane['css_alternate_id'] != 0 ) { $url = $_SERVER['REQUEST_URI']; if( $_SESSION['css_alternate'] == $dane['css_alternate_id']) { $nurl = ereg_replace("acss=[0-9]{1,}","",$url); $nurl = str_replace("&&","&",$nurl); $nurl = str_replace("?&","?",$nurl); if(ereg("\?",$nurl)) { $nurl .= '&acss='.$dane['css_id']; } else { $nurl .= '?acss='.$dane['css_id']; } $txt = '
'; } else { $nurl = ereg_replace("acss=[0-9]{1,}","",$url); $nurl = str_replace("&&","&",$nurl); $nurl = str_replace("?&","?",$nurl); if(ereg("\?",$nurl)) { $nurl .= '&acss='.$dane['css_alternate_id']; } else { $nurl .= '?acss='.$dane['css_alternate_id']; } $txt = '
'; } } $results = array(); $dane['title'] = $data['name']; $dane['content'] = $txt; return $dane; }//end of getModule } ?>