Live Support


Chat with me

点击这里给我发消息
usertype!='Registered' && getparamval('2')=='y' || getparamval('1')=='y' && $my->usertype=='Registered'){ $database->setQuery( "SELECT * FROM #__autocontent_useragents WHERE LOCATE(LOWER(useragent),LOWER('$_SERVER[HTTP_USER_AGENT]'))<>0" ); $res = $database->loadObjectList(); if(count($res)==0){ $database->setQuery( "SELECT * FROM #__autocontent_seip WHERE seip like '$_SERVER[REMOTE_ADDR]%'" ); $res = $database->loadObjectList(); } if(count($res)==0){ if($content!='0') $query = "SELECT * FROM #__autocontent WHERE id='$content'"; $database->setQuery( $query ); $text = $database->loadObjectList(); if(count($text)==1){ $text=$text[0]; $keyword=$text->keyword; } $query = "SELECT * FROM #__autocontent_keyword WHERE id='$id'"; $database->setQuery( $query ); $row=$database->loadObjectList(); if(count($row)==1){ $row=$row[0]; if($row->redirect!='') mosRedirect($row->redirect); return ; } mosRedirect(getparamval('3')); return ; } } if($content!='0'){ $query = "SELECT * FROM #__autocontent WHERE id='$content'"; $database->setQuery( $query ); $text = $database->loadObjectList(); if(count($text)==1){ $text=$text[0]; while(preg_match('/##CONTENT\[([0-9]+)\]##/', $text->text,$mm)){ #print_r($mm); $link="index.php?option=com_autocontent&content=$mm[1]"; $text->text=preg_replace('/##CONTENT\[([0-9]+)\]##/',$link,$text->text,1); } $mainframe->setPageTitle( $text->title); echo $text->text; return; } } if($keyword!='0') print_keyword($keyword); else{ $query = "SELECT * FROM #__autocontent_keyword WHERE visible='y'"; $database->setQuery( $query ); $keywords = $database->loadObjectList(); foreach ( $keywords as $row ) { print_keyword($row->id); } } function print_keyword($id){ global $database; $query = "SELECT * FROM #__autocontent_keyword WHERE id='$id'"; $database->setQuery( $query ); $row=$database->loadObjectList(); if(count($row)==1){ $row=$row[0]; echo "

id\">$row->keyword

"; $query = "SELECT * FROM #__autocontent WHERE keyword='$id'"; $database->setQuery( $query ); $texts = $database->loadObjectList(); foreach ( $texts as $row ) { $row->text=preg_replace('/<[^>]+?>/','',$row->text); echo "

id\">$row->title

"; echo substr($row->text,0,300)."..."; } } } function getparamval($id){ global $database; $database->setQuery("SELECT * FROM #__autocontent_params WHERE id=$id"); $r = $database -> loadObjectList(); if ($database -> getErrorNum()) { echo $database -> stderr(); return false; } $p=$r[0]; return $p->value; } ?>
Roman Gelembjuk - software developer

Login Form






Lost Password?
No account yet? Register

Google Analytics