sdsdfsdf
",$post,600,400); //$lastgrid=$db->sql_nextid(); //ostatni numer dodanego rekordu //$num=$db->sql_affectedrows(); //ile wukonanych np.update lub delete //print_r($_POST); //ini_set("memory_limit","80M"); if ($config['sadmindebug']==true){ ini_set('display_errors', 1); error_reporting(E_ALL ^ E_NOTICE); }else { error_reporting(0); ini_set('display_errors', 0); } session_start(); // PHP5 with register_long_arrays off? if (@phpversion() >= '5.0.0' && (!@ini_get('register_long_arrays') || @ini_get('register_long_arrays') == '0' || strtolower(@ini_get('register_long_arrays')) == 'off')) { $HTTP_POST_VARS = $_POST; $HTTP_GET_VARS = $_GET; $HTTP_SERVER_VARS = $_SERVER; $HTTP_COOKIE_VARS = $_COOKIE; $HTTP_ENV_VARS = $_ENV; $HTTP_POST_FILES = $_FILES; // _SESSION is the only superglobal which is conditionally set if (isset($_SESSION)) { $HTTP_SESSION_VARS = $_SESSION; } } global $mod,$dz,$op; //echo basename(dirname(__FILE__)); //print_r($_POST); require_once("include/function.php"); $op=getpost('op'); $dz=getpost('dz'); $mod=getpost('mod'); //echo "=========================".getpost('dz');exit; //echo "=========================".getpost('op'); // if ($_GET[ss] AND $_GET[ss]<>session_id() AND ($_GET[op]=="popup" OR $_GET[op]=="spopup")) { // session_id($_GET[ss]); // } require_once("GWPE.php"); //---cache start 1/2 if ($GO_CONFIG->chache_page_php_on){ include_once ('classes/gwpe.class.CACHE.inc'); $file_cache=new cache(); $file_cache->start_cache(); } //---cahce end 1/2 //echo "--".$GO_CONFIG->ticket_check(); //if ($GO_CONFIG->rewrite_on){ // $GO_CONFIG->gwpe_rewrite->parseURL(); // $GO_CONFIG->gwpe_rewrite->setRelative('relativeslash'); //relativeslash is variable name // $GO_CONFIG->gwpe_rewrite->setParts('dz','ss','pg'); //print_r($_GET);exit; //$_GET['pg']=$pg; //$_GET['ss']=$ss; // echo 'result query string
'; // echo 'pg = ' . $pg . '
'; // echo 'ss = '.$ss . '
'; // echo 'id = '.$id . '
'; //} //global $dyn_title,$dyn_page_title, $dyn_keywords,$dyn_desc; //-------------------------header rewrite start if ($GO_CONFIG->rewrite_on AND !$GO_CONFIG->ismoderator){ // get_urlencode();//dla polskich znakow w mod_rewrite ob_start(); //$dyn_title $dyn_keywords $dyn_desc if ($GO_CONFIG->dyntitle_on){ // $dyn_title=$GO_CONFIG->dz_title_tag; // $dyn_keywords=$GO_CONFIG->dz_keywords; // $dyn_desc=$GO_CONFIG->dz_description; $dyn_page_title=""; $dyn_page_keywords=""; $dyn_page_desc=""; $dyn_title=""; $dyn_keywords=""; $dyn_desc=""; $dyn_tags_page =""; } //echo "ddd"; include_once("classes/gwpe.class.rewrite.inc"); } //-------------------------header rewrite end require_once("classes/gwpe.class.API.inc");//API global $API; $API=new gwpe_api(); $GO_CONFIG->main_page_mod=""; //print_r($GO_CONFIG);exit; //global $API; //echo $GO_CONFIG->startdzial."==".$GO_CONFIG->startdz."==".$GO_CONFIG->startdzialdomain; //echo $GO_CONFIG->accesip."--".checkaccesip("global"); //----------acces views if ($GO_CONFIG->accesip AND !checkaccesip("global")){ echo error(_ACCESDENID); exit; } //---------acces views end if ($GO_CONFIG->external_tpl_type=="DRUPAL"){//=====================================================if DRUPAL include_once("theme_EXT/function_drupal.php"); }else if ($GO_CONFIG->external_tpl_type=="JOOMLA"){ //===============================================================if JOOMLA include_once("theme_EXT/function_joomla.php"); }else if ($GO_CONFIG->external_tpl_type=="MAMBO"){ //=====================================================================if MAMBO define('_VALID_MOS',"1"); include_once("theme_EXT/function_mambo.php"); }else if ($GO_CONFIG->external_tpl_type=="WPRESS"){ //=====================================================================if WORD PRESS include_once("theme_EXT/function_wpress.php"); }else if ($GO_CONFIG->external_tpl_type=="HTML"){ //=====================================================================if HTML define('_VALID_MOS',"1"); include_once("theme_EXT/function_html.php"); } //--------------------send mail form form start //form typu POST //form name=PRZED MALPA + malpa + input name="domain" //input name="type" ==== typ przedrostka dla zmiennych if ($_POST['action']=="semail"){ if ($_POST['ss'] == $GO_CONFIG->get_sesid() AND $GO_CONFIG->mailemail){ if ($_POST['type']=="email"){ $content=""._FROM.": ".$_POST['mail_name']." [".$_POST['mail_sender']."]
".$_POST['mail_content']; $reciver=$GO_CONFIG->mailemail; }else{ $content=""._POOL.":
"; foreach ($_POST as $param => $value){ if (strpos($param, $_POST['type']) === false){ }else{ // echo $param."==".$value."
"; $content .= "[$param]: ".$value."
"; } } // if ($_POST[form]) $reciver = str_replace("!","",$_POST[form])."@".$GO_CONFIG->maildomain; if ($_POST['owner']) $reciver = str_replace("!","",$_POST['owner'])."@".$_POST['domain']; else $reciver = $GO_CONFIG->mailemail; // print_r($_POST); exit; } sendmailer($reciver,$GO_CONFIG->mailtitle,$content,1,'iso-8859-2'); // sendmailer("biuro@grafnet.pl",$GO_CONFIG->mailtitle,$content,1,'iso-8859-2'); //print_r($_POST);exit; //echo $_POST[form]."---".$reciver;exit; $ret=""; // if ($_POST[pgret]) redirect(str_decode($_POST[pgret])); if ($_POST['pgret']) $ret .= "&pg=".$_POST['pgret']; if ($_POST['dz']) $ret .= "&dz=".$_POST['dz']; else $ret .= "&dz=".getpost(dz); redirect("mod.php?".$ret); }else echo error(_ERROR); } //--------------------send mail form form end //---------------------------both off left and right if (getpost('ofb')=="1" OR getpost('olr')=="1" OR getpost('orl')=="1"){ $_GET['off_left']="off"; $_GET['off_right']="off"; } if (getpost('offl')=="off" OR getpost('offl')=="0"){ $_GET['off_left']="off"; } if (getpost('offr')=="off" OR getpost('offr')=="0"){ $_GET['off_right']="off"; } //---------------dig url if ($_GET['digurl']){ $_GET['mod']="Dig"; $_GET['off_right']="off"; //---------------------------dig add url }else if (getpost('action')=="dfa"){ $_GET['off_left']="off"; $_GET['off_right']="off"; echo "add new...TODO"; //---------------------------dig toolbar login }else if (getpost('action')=="dfl" OR getpost('action')=="dflinfoupdate.xml" OR getpost('action')=="dflinfo/version.txt" OR getpost('action')=="dflget"){ //logg('','gp'); include_once("include/function_DigToolbarLogin.php"); exit; //---------------------------java vote dig }else if (getpost('action')=="dr"){ //echo "alert('".is_user()."');";exit; if (is_user()){ include_once("include/function_javaDIGrate.php"); exit; }else echo "window.location='mod.php?dz=".getpost('dz')."&action=login';\n"; exit; //---------------------------DIG top frame for below }else if (getpost('action')=="dfrt"){ //echo "========".getpost(rfd);exit; echo DIGmaketopframe(getpost('url'),getpost('ret'),str_decode(getpost('rfd')),getpost('sub')); exit; //---------------------------DIG open page in frame }else if (getpost('action')=="dfr"){ if (getpost('ret')) $retx=str_decode(getpost('ret')); else $retx=""; $ret="mod.php?dz=".getpost('dz'); if (getpost('mod')) $ret .="&mod=".getpost('mod'); if (getpost('did')) $ret .="&did=".getpost('did'); if (getpost('startp')) $ret .="&startp=".getpost('startp'); if ($retx) $ret .=$retx; $ret=str_code($ret); //echo getpost(did);exit; // if (getpost(url)) echo makeframepage(str_code("mod.php?action=dfrt&rfd=".str_code(getpost(did))."&ret=".$ret."&url=".getpost(url)),getpost(url),1); if (getpost('url')) echo makeframepage(str_code("mod.php?action=dfrt&rfd=".str_code(getpost('did2'))."&sub=".getpost('sub')."&ret=".$ret."&url=".getpost('url')),getpost('url'),1); else redirect("mod.php"); exit; } //---------------show users gallsery XML if (getpost(action)=="shgall"){ if ($_POST['ac']=="a" AND $_GET['ac']=="x1"){ if ($_POST['mu'] AND $_POST['mp'] AND $_POST['mg']>0 AND $_POST['mg'] AND $_POST['xmc'] AND $_POST['xuc'] AND $_POST['xg'] AND $_POST['xp']<>"" ){ // $sql = "SELECT id_am,id_owner FROM ".$GO_CONFIG->dbprefix."GalleryU_Albums WHERE id_am='".addslashes($_POST[xg])."' AND kay='".addslashes($_POST[mg])."' AND pass='".addslashes($_POST[mp])."' AND id_owner='".addslashes($_POST[mu])."' limit 1"; $sql = "SELECT id_am,id_owner FROM ".$GO_CONFIG->dbprefix."GalleryU_Albums WHERE id_am='".addslashes($_POST['xg'])."' AND pass='".addslashes($_POST['mp'])."' AND id_owner='".addslashes($_POST['mu'])."' limit 1"; //logg($sql); $result = $db->sql_query($sql); $rows=$db->sql_fetchrow($result); if ($rows['id_am']>0){ $protect=$rows['id_owner']*$rows['id_am']*14*date(m); $protect=md5($protect); echo "&acceptt=1&u=".$rows['id_owner']."&g=".$rows['id_am']."&pr=".$protect; }else echo "&u=0&g=0"; }else echo "&u=0&g=0"; //logg('','gp'); }else if ($_GET['ac']=="u" AND $_POST['Filename'] AND $_POST['Upload']=="Submit Query" AND $_FILES['Filedata']['tmp_name'] AND $_GET['pr']){ $protect=$_GET['mainu']*$_GET['maing']*14*date(m); $protect=md5($protect); if ($_GET['mainu']>0 AND $_GET['maing']>0 AND $_GET['pr']==$protect){ include_once("include/function_usersgallery.php"); //logg('','gp'); uploadusrImage($_FILES['Filedata']['tmp_name'],$_POST['Filename'],$_GET['mainu'],$_GET['maing'],$_GET['xp'],$_GET['xmc'],$_GET['xuc']); } }else if (getpost(spr)){ $sql = "SELECT id_am,id_owner FROM ".$GO_CONFIG->dbprefix."GalleryU_Albums WHERE kay='".addslashes($_GET['kay'])."' AND pass='".addslashes($_GET['pas'])."' limit 1"; $result = $db->sql_query($sql); $rows=$db->sql_fetchrow($result); if ($rows['id_am']>0){ echo "&acces=accesok&al=".$rows['id_owner']; } }else if ($_GET['ac']=="c1"){//lista katalogow include_once("include/function_usersgallery.php"); echo users_categoryXML(getpost(kay),getpost(pas),getpost(ali)); }else{//galeria include_once("include/function_usersgallery.php"); echo users_galleryXML(getpost(kay),getpost(pas),getpost(ali)); } exit; //---------------------------show online users }else if (getpost(action)=="online"){ echo users_online('FLASH'); exit; //---------------------------java to div rate }else if (getpost(action)=="jda"){ include_once("include/function_javadivads.php"); exit; //---------------------------java to div rate }else if (getpost(action)=="jdr"){ include_once("include/function_javadivrate.php"); exit; //---------------------------java to div pool }else if (getpost(action)=="jd"){ include_once("include/function_javadiv.php"); exit; } //---------------------------java to div //----------------------------synchro strat if ($_GET['action']=="sync"){ if ($_GET['w']=="pg"){ include_once("include/function_xml.php"); // echo export2XML($name,$whot,$lastid='',$encoding='iso-8859-2'); echo export2XML_pages("Pages","pg"); exit; }else if ($_GET['w']=="art"){ include_once("include/function_xml.php"); echo export2XML_arts("News","art",$_GET['tp']); exit; }else if ($_GET['w']=="cal"){ include_once("include/function_xml.php"); echo export2XML_calendar("Calendar","cal"); exit; } } //----------------------------synchro end //--------------------sudo start if ($_GET[action]=="sudo"){ if (is_sadmin()){ if ($_GET[suemuser] AND $_GET[suuser]){ $sql = "SELECT * FROM ".$GO_CONFIG->dbprefix."users WHERE email='".addslashes($_GET['suemuser'])."' AND user='".addslashes($_GET['suuser'])."' limit 1"; $result = $db->sql_query($sql); $row=$db->sql_fetchrow($result); if ($row['id']>0){ $_SESSION["autorizecode"]=$GO_CONFIG->keysecure; $_POST['execsudo']=$GO_CONFIG->keysecure; echo "LOGINAS: ".$row[user]; //echo $GO_CONFIG->keysecure."==".$_SESSION[autorizecode]; // session_unregister(); $_POST['action']="login"; $_GET['action']="login"; $_POST['fautorizecode_pic']=$GO_CONFIG->keysecure; $_GET['fautorizecode_pic']=$GO_CONFIG->keysecure; $_POST['fpasswd']=stripslashes($row['passwd']); $_GET['fpasswd']=stripslashes($row['passwd']); $_POST['fuser']=stripslashes($row['user']); $_GET['fuser']=stripslashes($row['user']); $op=""; $_POST['op']=""; $_GET['op']=""; }else echo error(); }else echo error(); }else redirect("mod.php?dz=".getpost(dz)); } //--------------------sudo end //echo RewriteUrl($_SERVER[REQUEST_URI]); //----------------------------------------------------------------- //------------------------------------------------pre page start //----------------------------------------------------------------- //if (is_adminmod($_GET["pid"])){ //echo "a|".getpost(dz); //echo "=======".is_admindzial($dz,1); if (is_admindzial($dz,1)){ //echo "adsas"; //echo "b";exit; //--------------------------kolejnosc stron start if ($_GET["action"]=="movepgright" AND $_GET["kid"] AND $_GET["pid"] AND $_GET["sid"] AND is_moderator($dz)){ $sql="UPDATE ".$GO_CONFIG->dbprefix."pages SET id_column=(id_column+1), kolejnosc='0' WHERE id_column<'3' AND id_dzial='".addslashes($dz)."' AND id='".addslashes($_GET["pid"])."' AND id_sekcja='".addslashes($_GET["sid"])."' limit 1"; $db->sql_query($sql); //echo "



".$sql; //---- $tmp_kol=$_GET["kid"]+1; $sql = "SELECT id,kolejnosc FROM ".$GO_CONFIG->dbprefix."pages WHERE id_dzial='".addslashes($dz)."' AND id_column='".addslashes($tmp_kol)."' AND id_sekcja='".addslashes($_GET["sid"])."' ORDER BY kolejnosc"; $result = $db->sql_query($sql); $q=0; while($row=$db->sql_fetchrow($result)){ $sql="UPDATE ".$GO_CONFIG->dbprefix."pages SET kolejnosc='$q' WHERE id='$row[id]' limit 1 "; $db->sql_query($sql); $q++; } redirect("?dz=".getpost('dz')); //---- }else if ($_GET["action"]=="movepgleft" AND $_GET["kid"] AND $_GET["pid"] AND $_GET["sid"] AND is_moderator($dz)){ $sql="UPDATE ".$GO_CONFIG->dbprefix."pages SET id_column=(id_column-1), kolejnosc='0' WHERE id_column>'1' AND id_dzial='".addslashes($dz)."' AND id='".addslashes($_GET["pid"])."' AND id_sekcja='".addslashes($_GET["sid"])."' limit 1"; $db->sql_query($sql); //---- $tmp_kol=$_GET["kid"]-1; $sql = "SELECT id,kolejnosc FROM ".$GO_CONFIG->dbprefix."pages WHERE id_dzial='".addslashes($dz)."' AND id_column='".addslashes($tmp_kol)."' AND id_sekcja='".addslashes($_GET["sid"])."' ORDER BY kolejnosc"; $result = $db->sql_query($sql); $q=0; while($row=$db->sql_fetchrow($result)){ $sql="UPDATE ".$GO_CONFIG->dbprefix."pages SET kolejnosc='$q' WHERE id='$row[id]' limit 1 "; $db->sql_query($sql); $q++; } redirect("?dz=".getpost('dz')); //---- }else if ($_GET["action"]=="movepgup" AND $_GET["kid"] AND $_GET["pid"] AND $_GET["sid"] AND is_moderator($dz)){ $sql="UPDATE ".$GO_CONFIG->dbprefix."pages SET kolejnosc=kolejnosc-2 WHERE id_dzial='".addslashes($dz)."' AND id_column='".addslashes($_GET["kid"])."' AND id_sekcja='".addslashes($_GET["sid"])."' AND id='".addslashes($_GET["pid"])."' limit 1"; $db->sql_query($sql); //echo "




".$sql."
"; //---- $sql = "SELECT id,kolejnosc FROM ".$GO_CONFIG->dbprefix."pages WHERE id_dzial='".addslashes($dz)."' AND id_column='".addslashes($_GET["kid"])."' AND id_sekcja='".addslashes($_GET["sid"])."' ORDER BY kolejnosc"; $result = $db->sql_query($sql); $q=0; while($row=$db->sql_fetchrow($result)){ $sql="UPDATE ".$GO_CONFIG->dbprefix."pages SET kolejnosc='$q' WHERE id='$row[id]' limit 1 "; $db->sql_query($sql); $q++; //echo $sql."
"; } redirect("?dz=".getpost('dz')); //---- }else if ($_GET["action"]=="movepgdown" AND $_GET["kid"] AND $_GET["pid"] AND $_GET["sid"] AND is_moderator($dz)){ $sql="UPDATE ".$GO_CONFIG->dbprefix."pages SET kolejnosc=kolejnosc+2 WHERE id_dzial='".addslashes($dz)."' AND id_column='".addslashes($_GET["kid"])."' AND id_sekcja='".addslashes($_GET["sid"])."' AND id='".addslashes($_GET["pid"])."' limit 1"; $db->sql_query($sql); //---- $sql = "SELECT id,kolejnosc FROM ".$GO_CONFIG->dbprefix."pages WHERE id_dzial='".addslashes($dz)."' AND id_column='".addslashes($_GET["kid"])."' AND id_sekcja='".addslashes($_GET["sid"])."' ORDER BY kolejnosc"; $result = $db->sql_query($sql); $q=0; while($row=$db->sql_fetchrow($result)){ $sql="UPDATE ".$GO_CONFIG->dbprefix."pages SET kolejnosc='$q' WHERE id='$row[id]' limit 1 "; $db->sql_query($sql); $q++; } //---- redirect("?dz=".getpost('dz')); } //--------------------------kolejnosc stron end //--------------------------kolejnosc dzialow strat if ($_GET['action']=="movedz" AND is_admin()){ if (!$_GET['dzcfgpz']) $_GET['dzcfgpz']=0; if ($_GET['op']=="moveupdz"){ $sql = "SELECT id_dzial,dz_kolejnosc FROM ".$GO_CONFIG->dbprefix."dzialy WHERE id2='".addslashes($_GET['dzcfgpz'])."' ORDER BY dz_kolejnosc"; $result = $db->sql_query($sql); $dzall=array(); while($row=$db->sql_fetchrow($result)){ $dzall[0][]=$row['id_dzial']; $dzall[1][]=$row['dz_kolejnosc']; } for ($i=0;$idbprefix."dzialy SET dz_kolejnosc='".$dzall[1][$i]."' WHERE id_dzial='".$dzall[0][$i]."' limit 1 "; $db->sql_query($sql); } }else if ($_GET[op]=="movedowndz"){ $sql = "SELECT id_dzial,dz_kolejnosc FROM ".$GO_CONFIG->dbprefix."dzialy WHERE id2='".addslashes($_GET['dzcfgpz'])."' ORDER BY dz_kolejnosc"; $result = $db->sql_query($sql); $dzall=array(); while($row=$db->sql_fetchrow($result)){ $dzall[0][]=$row['id_dzial']; $dzall[1][]=$row['dz_kolejnosc']; } for ($i=0;$idbprefix."dzialy SET dz_kolejnosc='".$dzall[1][$i]."' WHERE id_dzial='".$dzall[0][$i]."' limit 1 "; $db->sql_query($sql); } } //exit; // if ($_GET[retop]) redirect("mod.php?dz=".getpost(dz)."&op=".$_GET[retop]."&ss=".$GO_CONFIG->get_sesid()); if ($_GET['retop']) redirect("mod.php?dz=".getpost(dz)."&op=".$_GET['retop']."&ss=".$GO_CONFIG->get_sesid()); } //--------------------------kolejnosc dzialow end //--------------------------active/deactive page start if ($_GET["action"]=="pgon" AND $_GET["pid"] AND is_admindzial(getpost('dz'))){ $sql="UPDATE ".$GO_CONFIG->dbprefix."pages SET active='1' WHERE id='".addslashes($_GET["pid"])."' limit 1"; $db->sql_query($sql); //echo $sql;exit; if (getpost('lpg')) redirect("mod.php?dz=".getpost('dz')."&op=".$_GET[retop]."&pg=".getpost('lpg')."&ss=".$GO_CONFIG->get_sesid()); else if ($_GET["action2"]=="listpg" ) redirect("mod.php?action=listpg&dz=".getpost('dz')."&wh=pg&order=".getpost('order')."&snpg=".getpost('snpg')."&query=".getpost('query')."&op=".getpost('op')."&frm=".getpost('frm')."&ple=".getpost('ple')."&ple=".getpost('mainid')."&ss=".$GO_CONFIG->get_sesid()); else redirect("mod.php?dz=".getpost('dz')."&op=".$_GET['retop']."&ss=".$GO_CONFIG->get_sesid()); }else if ($_GET["action"]=="pgoff" AND $_GET["pid"] AND is_admindzial(getpost('dz'))){ $sql="UPDATE ".$GO_CONFIG->dbprefix."pages SET active='0' WHERE id='".addslashes($_GET["pid"])."' limit 1"; //echo $sql;exit; $db->sql_query($sql); if (getpost('lpg')) redirect("mod.php?dz=".getpost('dz')."&op=".$_GET['retop']."&pg=".getpost('lpg')."&ss=".$GO_CONFIG->get_sesid()); else if ($_GET["action2"]=="listpg" ) redirect("mod.php?action=listpg&dz=".getpost('dz')."&wh=pg&order=".getpost('order')."&snpg=".getpost('snpg')."&query=".getpost('query')."&op=".getpost('op')."&frm=".getpost('frm')."&ple=".getpost('ple')."&ple=".getpost('mainid')."&ss=".$GO_CONFIG->get_sesid()); else redirect("mod.php?dz=".getpost('dz')."&op=".$_GET['retop']."&ss=".$GO_CONFIG->get_sesid()); } //--------------------------active/deactive page end //--------------------------deletepage start if ($_GET["action"]=="delpage" AND $_GET["pid"] AND is_moderator()){ $sql="DELETE FROM ".$GO_CONFIG->dbprefix."pages WHERE id='".addslashes($_GET["pid"])."' limit 1"; $db->sql_query($sql); //---page tree start $sql="SELECT tto_page FROM ".$GO_CONFIG->dbprefix."pages_tree WHERE tid_page='".addslashes($_GET["pid"])."' LIMIT 1"; $result=$db->sql_query($sql); $row=$db->sql_fetchrow($result); $sql="UPDATE ".$GO_CONFIG->dbprefix."pages_tree SET tto_page='".addslashes($row['tto_page'])."' WHERE tto_page='".addslashes($_GET["pid"])."' "; $db->sql_query($sql); $sql="DELETE FROM ".$GO_CONFIG->dbprefix."pages_tree WHERE tid_page='".addslashes($_GET["pid"])."' LIMIT 1"; $db->sql_query($sql); //---page tree end // mod.php?action=listpg&dz=1&wh=pg&pid=0&ss=ee41fc5b09ace99832c83722608d03a2&order=&snpg=15&query=&op=&frm=&ple=&mainid= redirect("mod.php?action=listpg&dz=".getpost('dz')."&wh=pg&order=".getpost('order')."&snpg=".getpost('snpg')."&query=".getpost('query')."&op=".getpost('op')."&frm=".getpost('frm')."&ple=".getpost('ple')."&ple=".getpost('mainid')."&ss=".$GO_CONFIG->get_sesid()); } //--------------------------deletepage end //--------------------------delete dzial start //if ($_GET["op"]=="dzonoff" AND is_adminmod($_GET["dz"],"",$_GET["dz"])){ if ($_GET["op"]=="setting" AND $_GET["dzcfg"]>0 AND ($_GET["dzcfg"]<>$GO_CONFIG->startdz) AND $_GET['action']=="deletedz"){ //echo "TODO update page"; $sql="SELECT dz.* FROM ".$GO_CONFIG->dbprefix."dzialy dz, ".$GO_CONFIG->dbprefix."perm pem, ".$GO_CONFIG->dbprefix."users_group gr WHERE ( ( ( dz.id_dzial='".addslashes($_GET["dzcfg"])."' AND dz.id_dzial =pem.id_dzial AND pem.types='d' AND pem.id_group=gr.id_group AND pem.write='1' AND gr.id_user='".addslashes(conf(id_user))."' ) ) OR ( (dz.id_dzial='".addslashes($_GET["dzcfg"])."') AND (gr.id_user='".addslashes(conf(id_user))."') AND (gr.id_group='4') ) ) limit 1 "; $result = $db->sql_query($sql); $max=$db->sql_numrows($result); if ($max) { //delete dzial $sql="DELETE FROM ".$GO_CONFIG->dbprefix."dzialy WHERE id_dzial='".addslashes($_GET['dzcfg'])."' limit 1"; $db->sql_query($sql); //-----------------sprzatanie po tym dziale co byl... //upate page $sql="UPDATE ".$GO_CONFIG->dbprefix."pages SET id_dzial='0', id_sekcja='0', id_column='0' WHERE id_dzial='".addslashes($_GET['dzcfg'])."' "; $db->sql_query($sql); //upadte perm $sql="DELETE FROM ".$GO_CONFIG->dbprefix."perm WHERE id_dzial='".addslashes($_GET['dzcfg'])."' "; $db->sql_query($sql); //stat $sql="DELETE FROM ".$GO_CONFIG->dbprefix."stat_dzialy WHERE id_dzial='".addslashes($_GET['dzcfg'])."' "; $db->sql_query($sql); //domains $sql="UPDATE ".$GO_CONFIG->dbprefix."domain SET id_dzial='".$GO_CONFIG->startpage."' WHERE id_dzial='".addslashes($_GET['dzcfg'])."' "; $db->sql_query($sql); //banners $sql="UPDATE ".$GO_CONFIG->dbprefix."banners SET id_dzial='".$GO_CONFIG->startpage."' WHERE id_dzial='".addslashes($_GET['dzcfg'])."' "; $db->sql_query($sql); }//if perm ok for write // if ($_GET[retop]) redirect("mod.php?dz=".getpost(dz)."&ss=".$GO_CONFIG->get_sesid()."&op=".$_GET[retop]); if ($_GET['retop']) redirect("mod.php?dz=".getpost(dz)."&ss=".$GO_CONFIG->get_sesid()."&op=".$_GET['retop']); }//if op //--------------------------delete dzial end //--------------------------onoff dzial start //if ($_GET["op"]=="dzonoff" AND is_adminmod($_GET["dz"],"",$_GET["dz"])){ if ($_GET["op"]=="dzonoff" AND $_GET["dz"]>0 AND ($_GET["dz"]<>$GO_CONFIG->startdz)){ //-----------spr perm $sql="SELECT dz.* FROM ".$GO_CONFIG->dbprefix."dzialy dz, ".$GO_CONFIG->dbprefix."perm pem, ".$GO_CONFIG->dbprefix."users_group gr WHERE ( ( ( dz.id_dzial='".addslashes($_GET["dz"])."' AND dz.id_dzial =pem.id_dzial AND pem.types='d' AND pem.id_group=gr.id_group AND pem.write='1' AND gr.id_user='".addslashes(conf(id_user))."' ) ) OR ( (dz.id_dzial='".addslashes($_GET["dz"])."' AND dz.gid_owner=gr.id_group AND gr.id_user='".addslashes(conf(id_user))."') ) OR ( (dz.id_dzial='".addslashes($_GET["dz"])."') AND (gr.id_user='".addslashes(conf(id_user))."') AND (gr.id_group='4') ) ) limit 1 "; //echo $sql;exit; $result = $db->sql_query($sql); $max=$db->sql_numrows($result); if ($max) { //-----------spr perm ok $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."dzialy WHERE id_dzial='".addslashes($_GET["dz"])."' limit 1"; $result = $db->sql_query($sql); $row=$db->sql_fetchrow($result); if ($row['dz_active']) { $sql="UPDATE ".$GO_CONFIG->dbprefix."dzialy SET dz_active ='0' WHERE id_dzial='$row[id_dzial]' limit 1"; $GO_CONFIG->dz_active=0; }else{ $sql="UPDATE ".$GO_CONFIG->dbprefix."dzialy SET dz_active ='1' WHERE id_dzial='$row[id_dzial]' limit 1"; $GO_CONFIG->dz_active=1; } $db->sql_query($sql); // if ($_GET[retop]) redirect("mod.php?dz=".getpost(dz)."&ss=".$GO_CONFIG->get_sesid()."&op=".$_GET[retop]); }//if perm ok if ($_GET['retop']) redirect("mod.php?dz=".getpost(dz)."&ss=".$GO_CONFIG->get_sesid()."&op=".$_GET['retop']); else redirect("mod.php?dz=".getpost(dz)."&ss=".$GO_CONFIG->get_sesid()); //echo "


".$sql; }//if op //--------------------------onoff dzial end //--------------------------onoff top start if ($_GET["op"]=="toponoff" AND $_GET["dz"] ){ $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."dzialy WHERE id_dzial='".addslashes($_GET["dz"])."' limit 1"; $result = $db->sql_query($sql); $row=$db->sql_fetchrow($result); if ($row['dz_stop']) { $sql="UPDATE ".$GO_CONFIG->dbprefix."dzialy SET dz_stop ='0' WHERE id_dzial='$row[id_dzial]' limit 1"; $GO_CONFIG->dz_stop=0; }else{ $sql="UPDATE ".$GO_CONFIG->dbprefix."dzialy SET dz_stop ='1' WHERE id_dzial='$row[id_dzial]' limit 1"; $GO_CONFIG->dz_stop=1; } $db->sql_query($sql); //--------------------------onoff top end }else if ($_GET["op"]=="mtoponoff" AND $_GET["dz"] ){ //--------------------------onoff menutop start $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."dzialy WHERE id_dzial='".addslashes($_GET["dz"])."' limit 1"; $result = $db->sql_query($sql); $row=$db->sql_fetchrow($result); if ($row['dz_smenu']) { $sql="UPDATE ".$GO_CONFIG->dbprefix."dzialy SET dz_smenu ='0' WHERE id_dzial='".$row['id_dzial']."' limit 1"; $GO_CONFIG->dz_smenu=0; }else{ $sql="UPDATE ".$GO_CONFIG->dbprefix."dzialy SET dz_smenu ='1' WHERE id_dzial='".$row['id_dzial']."' limit 1"; $GO_CONFIG->dz_smenu=1; } $db->sql_query($sql); //--------------------------onoff menutop end }else if ($_GET["op"]=="bottomonoff" AND $_GET["dz"] ){ //--------------------------onoff top start $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."dzialy WHERE id_dzial='".addslashes($_GET["dz"])."' limit 1"; $result = $db->sql_query($sql); $row=$db->sql_fetchrow($result); if ($row[dz_sbottom]) { $sql="UPDATE ".$GO_CONFIG->dbprefix."dzialy SET dz_sbottom ='0' WHERE id_dzial='".$row['id_dzial']."' limit 1"; $GO_CONFIG->dz_sbottom=0; }else{ $sql="UPDATE ".$GO_CONFIG->dbprefix."dzialy SET dz_sbottom ='1' WHERE id_dzial='".$row['id_dzial']."' limit 1"; $GO_CONFIG->dz_sbottom=1; } $db->sql_query($sql); //--------------------------onoff top end }else if ($_GET['action']=="btoponoff" AND $_GET["op"]=="btoponoff" AND $_GET["dz"] ){ //--------------------------onoff bannertop start $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."dzialy WHERE id_dzial='".addslashes($_GET["dz"])."' limit 1"; $result = $db->sql_query($sql); $row=$db->sql_fetchrow($result); if ($row['dz_stop_banner']) { $sql="UPDATE ".$GO_CONFIG->dbprefix."dzialy SET dz_stop_banner ='0' WHERE id_dzial='".$row['id_dzial']."' limit 1"; $GO_CONFIG->dz_stop_banner=0; }else{ $sql="UPDATE ".$GO_CONFIG->dbprefix."dzialy SET dz_stop_banner ='1' WHERE id_dzial='".$row['id_dzial']."' limit 1"; $GO_CONFIG->dz_stop_banner=1; } $db->sql_query($sql); //--------------------------onoff bannertop end }else if ($_GET['action']=="bbottomonoff" AND $_GET["op"]=="bbottomonoff" AND $_GET["dz"] ){ //--------------------------onoff bannerbottom start $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."dzialy WHERE id_dzial='".addslashes($_GET["dz"])."' limit 1"; $result = $db->sql_query($sql); $row=$db->sql_fetchrow($result); if ($row['dz_sbottom_banner']) { $sql="UPDATE ".$GO_CONFIG->dbprefix."dzialy SET dz_sbottom_banner ='0' WHERE id_dzial='".$row['id_dzial']."' limit 1"; $GO_CONFIG->dz_sbottom_banner=0; }else{ $sql="UPDATE ".$GO_CONFIG->dbprefix."dzialy SET dz_sbottom_banner ='1' WHERE id_dzial='".$row['id_dzial']."' limit 1"; $GO_CONFIG->dz_sbottom_banner=1; } $db->sql_query($sql); //--------------------------onoff bannerbottom end }else if ($_GET["op"]=="topdelete" AND $_GET["dz"] AND $_GET["pid"]>0){ //--------------------------delete top start $sql="DELETE FROM ".$GO_CONFIG->dbprefix."pages WHERE id='".addslashes($_GET["pid"])."' AND is_specialpg='t' limit 1"; $db->sql_query($sql); $sql="UPDATE ".$GO_CONFIG->dbprefix."dzialy SET dz_top_idpage='' WHERE id_dzial='".addslashes($_GET['dz'])."' limit 1"; $db->sql_query($sql); $add=""; if (getpost(pg)) $add .= "&pg=".getpost(pg); redirect("mod.php?dz=".$_GET['dz'].$add); //--------------------------delete top end }else if ($_GET["op"]=="mtopdelete" AND $_GET["dz"] AND $_GET["pid"]>0){ //--------------------------delete mtop start $sql="DELETE FROM ".$GO_CONFIG->dbprefix."pages WHERE id='".addslashes($_GET["pid"])."' AND is_specialpg='m' limit 1"; //echo $sql;exit; $db->sql_query($sql); $sql="UPDATE ".$GO_CONFIG->dbprefix."dzialy SET dz_mtop_idpage='' WHERE id_dzial='".addslashes($_GET['dz'])."' limit 1"; $db->sql_query($sql); $add=""; if (getpost(pg)) $add .= "&pg=".getpost(pg); redirect("mod.php?dz=".$_GET['dz'].$add); //--------------------------delete mtop end }else if ($_GET["op"]=="bottomdelete" AND $_GET["dz"] AND $_GET["pid"]>0){ //--------------------------delete bottom start $sql="DELETE FROM ".$GO_CONFIG->dbprefix."pages WHERE id='".addslashes($_GET["pid"])."' AND is_specialpg='b' limit 1"; $db->sql_query($sql); $sql="UPDATE ".$GO_CONFIG->dbprefix."dzialy SET dz_bottom_idpage ='' WHERE id_dzial='".addslashes($_GET['dz'])."' limit 1"; $db->sql_query($sql); $add=""; if (getpost(pg)) $add .= "&pg=".getpost(pg); redirect("mod.php?dz=".$_GET['dz'].$add); //--------------------------delete bottom end } }//if is_adminmod()is_admindzial( //----------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------op //----------------------------------------------------------------------------------------------- //----------------------------------------------------------------- //------------------------------------------------pre page end //----------------------------------------------------------------- if ($GO_CONFIG->support_phpnuke){ require_once("include/mainfile.php"); } //-----------------------------banner click & show if ($_GET['action']=="shbanner" OR $_GET['click']){ if ($_GET['op']=="click" OR $_POST['ops']=="click" OR $_GET['click']){ if ($_GET['mid'] OR $_GET['click']){ if (!$_GET['mid']) $_GET['mid']=$_GET['click']; list($url,$id)=split("\|",str_decode($_GET['mid'])); //echo str_decode($_GET[mid]);exit; if ($id>0){ $sql = "UPDATE ".$GO_CONFIG->dbprefix."banners SET clicks=clicks+1 WHERE id='".addslashes($id)."' limit 1 "; $db->sql_query($sql); redirect("http://".$url); }else echo error(_ERROR); }else echo error(_ERROR); }else{ //echo "===".$_GET['what']."-".$_GET['name']."-"; require_once("include/function_bannrs.php"); echo bannerrotate($_GET['what'],$_GET['name'],$_GET['clickTag']); } //}else if ($_GET[action]=="logout" OR ($_GET[ss] AND $_GET[ss]<>session_id() AND $_GET[op]<>"popup" AND $_GET[op]<>"spopup")){ }else if ($_GET['action']=="logout" OR ($_GET['ss'] AND $_GET['ss']<>session_id() )){ //echo "=fsdf====".getpost(ss)."==".session_id();exit; //-------------------------------for toolbar start setcookie ("DIGSID", ""); setcookie ("DIGKAY", ""); setcookie ("save_sess", ""); // session_id(); // session_start (); // if ($_COOKIE['fbs_' . $app_id] if ($_SESSION['fb_login_app_id']){ // setcookie("fbs_" . $app_id, '', time()-3600, "/", ".otozakupy.pl"); setcookie("fbs_" . $_SESSION['fb_login_app_id'], '', time()-3600, "/", ".".str_replace("www.","",strtolower($_SERVER["SERVER_NAME"]))); //echo $_SERVER["SERVER_NAME"]; //echo "dsfdsF";exit; ?> isuser=""; unset($_SESSION); session_destroy (); ?> baseurl; redirect($urlret."/mod.php?action=login&user=".$_GET['ssh']); exit; //---------------show protect image code-captcha }else if (getpost(op)=="gfx"){ require_once ('classes/gwpe.class.captcha.php'); $server = new gwpe_captcha($newauthcode); if($_REQUEST[session_name()]){ $_SESSION['autorizecode']=$server->getKeyString(); } // gfx2xx($_SESSION[autorizecode]); exit; //---------------show protect image code-captcha OLD trudna }else if (getpost(op)=="gfx2"){ // session_id(getpost(ss)); // session_start(); $newauthcode=makeID(5); $_SESSION['autorizecode']=$newauthcode; require_once ('classes/class.captcha_x.php'); $server = &new captcha_x (); // $server->handle_request ($newauthcode); $server->handle_request ($_SESSION['autorizecode']); // gfx2xx($_SESSION[autorizecode]); exit; //--------------download file }else if (getpost(op)=="getfile" AND getpost(img)){ if ($GO_CONFIG->get_sesid()==getpost(ss)){ $img=str_decode(str_replace("#","=",getpost(img))); if (substr($img,-1)=="\\") $img=substr($img,0,-1); //echo $img;exit; if (getpost(def)==1){ file_show("./image/".str_replace(".php",".jpg",$img)); }else{ img_show(str_replace(".php",".jpg",$img)); } }else echo error(); exit; die(); //--------------print module }else if (getpost(op)=="prnmod" AND getpost(mid)<>""){ echo PrintPage(getpost(mid),'mod'); //--------------print page }else if (getpost('op')=="prnpg" AND getpost('pid')>0){ echo PrintPage(getpost('pid'),'pg'); //--------------print page to PDF }else if (getpost('op')=="prn2pdf" AND getpost('pid')>0){ echo PrintPage2PDF(getpost('pid'),'pg'); // echo PrintPagePDF(getpost('pid'),'pg'); //--------------print page to email }else if (getpost('op')=="prn2email" AND getpost('pid')>0){ echo PrintPage2email(getpost('pid'),'pg'); // echo PrintPagePDF(getpost('pid'),'pg'); //--------------print article }else if (getpost(op)=="prnart" AND getpost(art)>0){ echo PrintPage(getpost(art),'art'); //--------------print shop product cart //}else if (getpost(op)=="prncsp" AND getpost('csid')>0){ // $content="TODO SHOP..."; // echo PrintPage(getpost('csid'),'cshop',$content); //--------------show image }else if (getpost(op)=="showimg" AND getpost(img)){ //mod.php?op=showimg&img=aW1nPXY1LmpwZyZ0bXA9Ylc5a2RXeGxjeTlPWlhkekwyZGhiR3hsY25sZmFXMWhaMlZ6THpFdiZpbXQ9anBn //mg=v5.jpg&tmp=bW9kdWxlcy9OZXdzL2dhbGxlcnlfaW1hZ2VzLzEv&imt=jpg //echo str_decode("bW9kdWxlcy9OZXdzL2dhbGxlcnlfaW1hZ2VzLzEv");exit; //modules/News/gallery_images/1/ // $img=str_decode(getpost(img)); $img=str_decode(str_replace("#","=",getpost('img'))); list($img,$path,$imgtype,$thumb)=split("&",$img); list($xx,$img)=split("mg=",$img); list($xx,$path)=split("mp=",$path); list($xx,$imgtype)=split("imt=",$imgtype); $path=str_decode($path); //echo $path;exit; if ($imgtype=="img"){ $nazwa_pliku=str_replace("..","x",$img); }else if ($imgtype){ $name=str_replace("..","x",$img); $imgtype=str_replace("..","x",$imgtype); if ($thumb=="thb=1") $nazwa_pliku = $path."thumb_".$name.".".$imgtype; else $nazwa_pliku = $path.$name.".".$imgtype; }else{ $name=$img."_1.jpg"; $nazwa_pliku = $path.$name; } //echo $nazwa_pliku;exit; img_show($nazwa_pliku); exit; die(); //--------------show swf }else if (getpost(op)=="showswf" AND getpost(img)){ $img=str_decode(str_replace("#","=",getpost(img))); list($img,$path,$imgtype)=split("&",$img); list($xx,$img)=split("mg=",$img); list($xx,$path)=split("mp=",$path); list($xx,$imgtype)=split("imt=",$imgtype); $pathde=str_decode($path); if ($imgtype=="swf" AND $path){ $nazwa_pliku=str_replace("..","x",$img); $nazwa_pliku = $pathde.$nazwa_pliku.".swf"; }else{ $nazwa_pliku = "xxx"; } // img_show($nazwa_pliku."?ss=".$GO_CONFIG->get_sesid()); // img_show($nazwa_pliku); //echo $nazwa_pliku;exit; file_show_swf($nazwa_pliku); exit; die(); //--------------show exe }else if (getpost(op)=="getexe" AND getpost(img)){ $img=str_decode(str_replace("#","=",getpost(img))); list($img,$path,$imgtype)=split("&",$img); list($xx,$img)=split("mg=",$img); list($xx,$path)=split("mp=",$path); list($xx,$imgtype)=split("imt=",$imgtype); $pathde=str_decode($path); if ($imgtype=="exe" AND $path){ $nazwa_pliku=str_replace("..","x",$img); $nazwa_pliku = $pathde.$nazwa_pliku.".exe"; }else{ $nazwa_pliku = "xxx"; } // img_show($nazwa_pliku."?ss=".$GO_CONFIG->get_sesid()); // img_show($nazwa_pliku); file_show($nazwa_pliku); exit; die(); //--------------show tmp file tmp_gwpe }else if (getpost(op)=="getft" AND getpost(img)){ $img=str_decode(str_replace("#","=",getpost(img))); list($img,$path,$imgtype)=split("&",$img); list($xx,$img)=split("mg=",$img); list($xx,$path)=split("mp=",$path); list($xx,$imgtype)=split("imt=",$imgtype); $pathde=str_decode($path); if ($imgtype=="bin" AND $pathde=="tmp"){ $pathde="tmp_gwpe/"; $nazwa_pliku=str_replace("..","x",$img); $nazwa_pliku = $pathde.$nazwa_pliku.".bin"; }else if ($imgtype=="bin" AND $pathde=="tmpi"){//archive sql $pathde="include/tmp/"; $nazwa_pliku=str_replace("..","x",$img); $nazwa_pliku = $pathde.$nazwa_pliku.".bin"; }else if ($imgtype=="zip" AND $pathde=="tmp"){ $pathde="tmp_gwpe/"; $nazwa_pliku=str_replace("..","x",$img); $nazwa_pliku = $pathde.$nazwa_pliku.".zip"; }else if ($imgtype=="exe" AND $path){ $nazwa_pliku=str_replace("..","x",$img); $nazwa_pliku = $pathde.$nazwa_pliku.".exe"; }else{ $nazwa_pliku = "xxx"; } file_show($nazwa_pliku); exit; die(); }else{ //===========================================================================================================================MAIN //---------------------------------------dla edytora if (is_moderator()){ if ($GO_CONFIG->editor==1){ //aron!!! wylaczylem bo chyba jest wczesniej !!!! aron!!!============================================================================================== // include_once $spaw_root.'spaw_control.class.php'; //======================================================================================= // require_once 'edit/adm_makeimgtree.php'; //----//v2.5 include("edit/fckeditor.php");//v2.5 //print_r($_SESSION); //-----//v.3.1 // include_once("edit/ckeditor.php"); // include_once("edit/ckfinder/ckfinder.php");//v.3.1 - upload file //$ckeditor = new CKEditor(); //$ckeditor->basePath = '/ckeditor/'; //$ckfinder = new CKFinder(); //$ckfinder->BasePath = '/ckfinder/'; // Note: BasePath property in CKFinder class starts with capital letter //$ckfinder->SetupCKEditorObject($ckeditor); //$ckeditor->editor('CKEditor1'); } } //--------------------------------------end dla edytora //require_once("config/config.php"); if (!$dz) $dz=$GO_CONFIG->startdz; //echo "


====".$GO_LANGUAGE->curent_language(); ob_start(); if ($_POST["op"]=="setting" AND $_POST["dz_save"] AND is_admindzial($_POST['dz'],1)){ $is_addik=$GO_CONFIG->save_dzial_setting($_POST[dzcfg],$_POST[master]); if ($is_addik AND $_POST['dzcfg']=="0" AND $_POST['master']>0){ // $_GET['dzcfg']=$_POST['master']; redirect("mod.php?dz=".$_POST['master']); } }else if ($_POST["op"]=="setting" AND $_POST["dz_grab"] AND is_admindzial($_POST['dz'],1)){ $GO_CONFIG->save_dzial_setting_grab($_POST['grab_id'],$_POST['grab_format'],$_POST['grab_loyout'],$_POST['grab_toppage'],$_POST['grab_bottompage']); //--------------------------mTPLe }else if ($_POST["op"]=="setting" AND $_POST["dz_loadmtpl"] AND is_admindzial($_POST['dz'],1)){//zmien na mTPLa $GO_CONFIG->save_dzial_setting_loadmtpl($_POST['mtpl_tpl']); }else if ($_POST["op"]=="setting" AND $_POST["dz_uploadmtpl"] AND is_admindzial($_POST['dz'],1)){//wczytaj nowego mTPLa z pliku $GO_CONFIG->save_dzial_setting_uploadtpl($_FILES['new_mtpl']['name']); }else if ($_POST["op"]=="setting" AND $_POST["dz_savemtpl"] AND is_admindzial($_POST['dz'],1)){//zapisz sekcje bierzaca A jako mTPLa $GO_CONFIG->save_dzial_setting_savetpl($_POST['name_mtpl']); }else if ($_POST["op"]=="setting" AND $_POST["dz_gettpl"] AND is_admindzial($_POST['dz'],1)){//get ziped mTpl $GO_CONFIG->save_dzial_setting_gettpl($_POST['mtpl_tpl']); }else if ($_POST["op"]=="setting" AND $_POST["dz_deletetpl"] AND is_admindzial($_POST['dz'],1)){//delete mTPL $GO_CONFIG->save_dzial_setting_deletetpl($_POST['mtpl_tpl']); //--------------------------TPLe }else if ($_POST['action']=="edit" AND $_POST['dz_gettpl'] AND $_POST['f_mod_tpl']){//get ziped tpl if ($_POST['ss']==$GO_CONFIG->get_sesid()){ $GO_CONFIG->get_ziped_tpl($_POST['f_mod_tpl']); redirect("mod.php?action=edit&dz=".getpost(dz)."&pid=".getpost(savepid)."&wh=".getpost(wh)."&lmod=&lpg=&ss=".getpost(ss)); }else echo error(_NOACCES); }else if ($_POST['action']=="edit" AND $_POST['dz_deletetpl'] AND $_POST['f_mod_tpl']){//delete tpl if ($_POST['ss']==$GO_CONFIG->get_sesid()){ $erx=$GO_CONFIG->delete_tpl($_POST['f_mod_tpl']); if ($erx=="1") redirect("mod.php?action=edit&dz=".getpost(dz)."&pid=".getpost(savepid)."&wh=".getpost(wh)."&sm=".$_POST['sm']."&lmod=&lpg=&ss=".getpost(ss)); else exit; }else echo error(_NOACCES); }else if ($_POST['action']=="edit" AND $_POST[dz_uploadmtpl] AND $_FILES['new_mtpl']['name']){//upload new tpl if ($_POST['ss']==$GO_CONFIG->get_sesid()){ $erx=$GO_CONFIG->load_new_tpl($_FILES['new_mtpl']['name']); if ($erx=="1") redirect("mod.php?action=edit&dz=".getpost(dz)."&pid=".getpost(savepid)."&wh=".getpost(wh)."&sm=".$_POST['sm']."&lmod=&lpg=&ss=".getpost(ss)); else exit; }else echo error(_NOACCES); // echo "==";exit; }else if ($_POST["op"]=="system" AND $_POST["dz_save"] AND is_admindzial($_POST['dz'],1)){ $GO_CONFIG->save_system_setting($_POST['dz']); } $GO_CONFIG->main_page_mod_config= ob_get_contents(); // store buffer in $contents ob_end_clean(); // delete output buffer and stop buffering if (!$GO_CONFIG->external_tpl){ echo $GO_CONFIG->main_page_mod_config; } if (!getpost('head0')==1) require_once("stopki/header.php"); //---------------------------------------------------------------------------------dzial ty;lko dla zalogowanych if ($_GET['forwhologin']==1){ // if ($GO_CONFIG->external_tpl OR getpost('forwhologin')==1){ // ob_start(); // } //if ((!getpost('forwhologin') AND $GO_CONFIG->for_who=="l" AND !is_user()) OR $_GET['forwhologin']==1){ // $_GET['tdz']; echo "


"; echo "
"; if (getpost('retp')) { $urladd = "&retp=".getpost('retp'); }else{ $urladd =""; } // if (getpost('tdz')>0 OR getpost('dz')>0){ if (getpost('tdz')) echo ""; else echo ""; echo img("ico/LOGIN/kludka.gif"); // echo "
"; echo "

"._LOGIN."

"; echo "

"; echo ""; echo _ORGOTOMAINPAGE; echo ""; echo "


"; $fret=""; include("form/login_short.php"); echo errorpop(str_replace("'","\'",$fret)); // if ($GO_CONFIG->external_tpl){ // $GO_CONFIG->main_page_mod_loginshort = ob_get_contents(); // store buffer in $contents // ob_end_clean(); // del // } }else if (getpost("op")=="popup"){ // if ($GO_CONFIG->external_tpl){ // ob_start(); // } include("popup.php"); // if ($GO_CONFIG->external_tpl){ // $GO_CONFIG->main_page_mod_popup = ob_get_contents(); // store buffer in $contents // ob_end_clean(); // del // } }else{ //---------------------------------------------------------------------------------popupend if (getpost(op)<>"spopup" AND is_moderator()){ // $tx = "
"; // $tx = ""; // $tx .= "
"; $tx=""; $tx_jquery1_dzialy=""; $tx_jquery1_2_dzialy=""; $tx_jquery1_3_dzialy=""; $tx_jquery1_4_dzialy=""; $tx_jquery2_dzialy=""; $tx_jquery3_dzialy=""; $tx_jquery4_dzialy=""; if ($GO_CONFIG->dz_active){ $tx .= "
"; }else{ $tx .= "
"; } $tx_jquery=""; //echo getpost(op); if (getpost(op)=="setting" OR getpost(op)=="system" OR // if ((getpost(op)=="setting" && (!$GO_CONFIG->jquery_on || !$GO_CONFIG->jquery_mod_login_top)) OR getpost(op)=="system" OR $op=="config_modules" OR $op=="config_archive" OR $op=="config_translate" OR $op=="config_dzialy" OR $op=="config_acces" OR $op=="config_liveupdate" OR $op=="config_security" OR $op=="config_domain" OR $op=="config_news" OR $op=="config_tpledit" OR $op=="config_newsletter" OR $op=="config_info" OR $op=="config_note" OR $op=="config_stat" OR $op=="config_banner" ){ $txtmp =""; $txtmp .= img("ico/back_n.gif",_SECTIONLIST,16,16); $txtmp .=" "._SECTIONLIST; $txtmp .= ""; //mod.php?dz=26&ss=43935fc7dbd47bfc1ab79afbcac460b4&op=config_dzialy $txtmp .=" "; $txtmp .=""; $txtmp .= img("ico/back.gif",_BACK,16,16); $txtmp .=" "._BACK; $txtmp .= ""; // $txtmp .="  |   "; // $txtmp .= dzialy_lista("dz",$dz,0,'',0); if (getpost(op)=="setting") { $txtmp .="
"; $txtmp .= ""._EDITINGSECTIONNOW.":
".clear_txt($GO_CONFIG->dz_title,2)." [".$dz."]"; } $tx .=$txtmp; $tx_jquery1_dzialy .=$txtmp; }else{ if (is_moderator()){ $tx .="
"; if (is_admindzial($dz,1) AND is_admin()){ // $tx .="  |   "; // $tx .="get_sesid()."&op=setting\" style=\"display:inline-block;\">"; $txtmp ="get_sesid()."&op=setting\" style=\"display:inline !important;border:1pc solid #f00;width:auto;border:0;\">"; $txtmp .= img("ico/edit_section2.gif",_EDITDZIAL,16,16); $txtmp .= ""; $txtmp .=" "; $tx .=$txtmp; $tx_jquery1_dzialy .=$txtmp; } if (is_admin()){ $txtmp ="get_sesid()."&op=setting&master=".$dz."\" style=\"display:inline !important;border:1pc solid #f00;width:auto;border:0;\">"; $txtmp .= img("ico/plus_section2.gif",_ADDNEWSECTION,16,16); $txtmp .= ""; $txtmp .=" "; $tx .=$txtmp; $tx_jquery1_dzialy .=$txtmp; } if (is_admindzial($dz,1) AND is_admin()){ if ($GO_CONFIG->dz_active){ $txtmp ="get_sesid()."&op=dzonoff\" style=\"display:inline !important;border:1pc solid #f00;width:auto;border:0;\">"; $txtmp .= img("ico/off_section2.gif",_OFFDZIAL,16,16); $txtmp .= ""; }else{ $txtmp ="get_sesid()."&op=dzonoff\" style=\"display:inline !important;border:1pc solid #f00;width:auto;border:0;\">"; $txtmp .= img("ico/on_section2.gif",_ONDZIAL,16,16); $txtmp .= ""; } $txtmp .=" "; $tx .=$txtmp; $tx_jquery1_dzialy .=$txtmp; } $tx .="
"; //$tx .="        "; //$tx .="
"; $txtmp = "
 "._GOTODZIAL.":"; $txtmp .=" "; // $txtmp .= input_img("ico/enter.gif",16,16,_CHANGE,"docd"); // $txtmp .="        
"; $txtmp .="
"; //-------------------------------lista start $all=0; $main=''; $submit=1; if ($submit) $submit_it=" onchange=\"submit()\""; else $submit_it=""; // $tx .= ""; // $tx .= ""; $txtmp .= ""; // $tx .="
"; //-------------------------------lista end $txtmp .=" "; // $tx .=""; // img("ico/enter.gif", $txtmp .= input_img("ico/enter.gif",16,16,_CHANGE,"docd"); $tx .=$txtmp; $tx_jquery1_2_dzialy .=$txtmp; }//if is admin //$tx .="
"; }//if op == setting //if ($GO_CONFIG->dz_active){ $tx .= "
"; //} //---------------sktywacja systemu if (!$GO_CONFIG->ticket_check()){ $tx .= img("ico/news_sticky.gif",_ACTIVATESYSTEM,16,16).""._ACTIVATESYSTEM.""; } //$tx .="
"; // $tx .= ""; // $tx .= ""; // $tx .=""; // $tx .=""; // $tx .= img("ico/news_info.gif",_CONF_NEWS,"16px","16px"); // $tx .= ""; //---------------------------------------------------------------------------------------------------------------------------------------------standard menu //----------------------------------------moderator if (is_moderator()){ $ftd=flash_td(); $tx .= "
"; $txtmp = ""; //$ftd="style=\"margin:auto;padding:auto;\" "; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= "
"; $txtmp .= _STANDARDMENU; $txtmp .= "
"; $txtmp .= "get_sesid()."')\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= "\""._ADDPAGE."\""; $txtmp .= ""; $txtmp .= ""; $txtmp .= "get_sesid()."')\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= " "._ADDPAGE; $txtmp .= ""; $txtmp .= "
"; $txtmp .= "get_sesid()."')\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= "\""._ADDPAGETOTHISDZ."\""; $txtmp .= ""; $txtmp .= ""; $txtmp .= "get_sesid()."')\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= " "._ADDPAGETOTHISDZ."
 "._ADDPAGETOTHISDZ2.""; $txtmp .= "
"; $txtmp .= "
"; $txtmp .= "get_sesid()."')\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= "\""._LISTPAGE."\""; $txtmp .= ""; $txtmp .= ""; $txtmp .= "get_sesid()."')\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= " "._LISTPAGE; $txtmp .= ""; $txtmp .= "
"; $txtmp .= "
"; $txtmp .="get_sesid()."&op=config_info\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= img("ico/help1.gif",_CONF_INFO,"16px","16px"); $txtmp .= ""; $txtmp .= ""; $txtmp .="get_sesid()."&op=config_info\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= _CONF_INFO; $txtmp .= ""; $txtmp .= "
"; $txtmp .= ""; $txtmp .= "\""._LOGOUT."\""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= " "._LOGOUT; $txtmp .= ""; $txtmp .= "
"; $tx .=$txtmp; $tx_jquery1_3_dzialy .=$txtmp; $tx .= "
"; // $tx .= " "; $tx .="
"; $tx .= ""; $tx .= img("ico/config.gif",_MENU,"16px","16px"); $tx .= " "._MENU; $tx .= ""; $tx .=" | "; //$tx .="
"; } //---------------------------------------------------------------------------------------------------------------------------------------------tools menu // $tx .= "
"; // $tx .= ""; // $tx .= "
"; // $tx .= "000
"; // $tx .= "
"; $tx .= "
"; $txtmp = "
"; //----------------------------------------super admin if (is_sadmin()){ $ftd=flash_td(); $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; // if ($GO_CONFIG->multidomains==1 AND $GO_CONFIG->gwpetype==1){ if ($GO_CONFIG->multidomains==1){ $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; } if ($GO_CONFIG->systemnotepad==1 ){ $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; } $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; if ($GO_CONFIG->accesip){ $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; } if ($GO_CONFIG->liveupdateon != false){ $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; } } //---------------------------------------admin if (is_admin()){ $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $sqlspr="SELECT pem.id_dzial FROM ".$GO_CONFIG->dbprefix."perm pem, ".$GO_CONFIG->dbprefix."users_group gr WHERE ( ( ( gr.id_user='".addslashes(conf(id_user))."' AND gr.id_group=pem.id_group) OR ( gr.id_user='".addslashes(conf(id_user))."' AND (gr.id_group='4' OR gr.id_group='3') ) ) ) limit 1"; $resultspr = $db->sql_query($sqlspr); if ($db->sql_numrows($resultspr)==1){ $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; } if ($GO_CONFIG->statystyka==1){ $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; } if ($GO_CONFIG->banners==1){ $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; } if ($GO_CONFIG->newsletter==1){ $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; } $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; } //----------------------------------------moderator if (is_moderator()){ $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; if ($GO_CONFIG->systemnews==1){ $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; // $txtmp .= ""; // $txtmp .= ""; // $txtmp .= ""; } } $txtmp .= "
"; $txtmp .= _SADMIN; $txtmp .= "
"; $txtmp .="get_sesid()."&op=system\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= img("ico/config.gif",_CONFSYSTEM,"16px","16px"); $txtmp .= ""; $txtmp .= ""; $txtmp .="get_sesid()."&op=system\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= _CONFSYSTEM; $txtmp .= ""; $txtmp .= "
"; $txtmp .="get_sesid()."&op=config_modules\" style=\"background:transparent;text-decoration:none;\">"; $txtmp .= img("ico/config3.gif",_CONF_MODULES,"16px","16px"); $txtmp .= ""; $txtmp .= ""; $txtmp .="get_sesid()."&op=config_modules\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= _CONF_MODULES; $txtmp .= ""; $txtmp .= "
"; $txtmp .="get_sesid()."&op=config_domain\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= img("ico/folder6.gif",_CONF_DOMAIN,"16px","16px"); $txtmp .= ""; $txtmp .= ""; $txtmp .="get_sesid()."&op=config_domain\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= _CONF_DOMAIN; $txtmp .= ""; $txtmp .= "
"; $txtmp .="get_sesid()."&op=config_note\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= img("ico/rate1.gif",_CONF_NOTE,"16px","16px"); $txtmp .= ""; $txtmp .= ""; $txtmp .="get_sesid()."&op=config_note\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= _CONF_NOTE; $txtmp .= ""; $txtmp .= "
"; $txtmp .="get_sesid()."&op=config_archive\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= img("ico/config.gif",_CONFARCIVE,"16px","16px"); $txtmp .= ""; $txtmp .= ""; $txtmp .="get_sesid()."&op=config_archive\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= _CONFARCIVE; $txtmp .= ""; $txtmp .= "
"; $txtmp .="get_sesid()."&op=config_translate\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= img("ico/translate.gif",_TRANSLATE,"16px","16px"); $txtmp .= ""; $txtmp .= ""; $txtmp .="get_sesid()."&op=config_translate\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= _TRANSLATE; $txtmp .= ""; $txtmp .= "
"; $txtmp .="get_sesid()."&op=config_acces\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= img("ico/fpse_off.gif",_CONF_ACCES,"16px","16px"); $txtmp .= ""; $txtmp .= ""; $txtmp .="get_sesid()."&op=config_acces\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= _CONF_ACCES; $txtmp .= ""; $txtmp .= "
"; $txtmp .="get_sesid()."&op=config_liveupdate\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= img("ico/refresh99.png",_LIVEUPDATE,16,16); $txtmp .= ""; $txtmp .= ""; $txtmp .="get_sesid()."&op=config_liveupdate\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= _LIVEUPDATE; $txtmp .= ""; $txtmp .= "
"; $txtmp .= _ADMIN; $txtmp .= "
"; $txtmp .="get_sesid()."&op=config_security\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= img("ico/icon_members.gif",_CONF_SECURITY,"16px","16px"); $txtmp .= ""; $txtmp .= ""; $txtmp .="get_sesid()."&op=config_security\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= _CONF_SECURITY; $txtmp .= ""; $txtmp .= "
"; $txtmp .="get_sesid()."&op=config_dzialy\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= img("ico/folder.gif",_CONF_DZIALY,"16px","16px"); $txtmp .= ""; $txtmp .= ""; $txtmp .="get_sesid()."&op=config_dzialy\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= _CONF_DZIALY; $txtmp .= ""; $txtmp .= "
"; $txtmp .="get_sesid()."&op=config_stat\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= img("ico/icon_poll.gif",_CONF_STAT,"16px","16px"); $txtmp .= ""; $txtmp .= ""; $txtmp .="get_sesid()."&op=config_stat\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= _CONF_STAT; $txtmp .= ""; $txtmp .= "
"; $txtmp .="get_sesid()."&op=config_banner\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= img("ico/statban.gif",_CONF_BANNERSTAT,"16px","16px"); $txtmp .= ""; $txtmp .= ""; $txtmp .="get_sesid()."&op=config_banner\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= _CONF_BANNERSTAT; $txtmp .= ""; $txtmp .= "
"; $txtmp .="get_sesid()."&op=config_newsletter\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= img("ico/news_answer.gif",_CONF_NEWSLETTER,"16px","16px"); $txtmp .= ""; $txtmp .= ""; $txtmp .="get_sesid()."&op=config_newsletter\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= _CONF_NEWSLETTER; $txtmp .= ""; $txtmp .= "
"; $txtmp .="get_sesid()."&op=config_tpledit\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= img("ico/ed_section.gif",_TPL_EDITOR,"16px","16px"); $txtmp .= ""; $txtmp .= ""; $txtmp .="get_sesid()."&op=config_tpledit\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= _TPL_EDITOR; $txtmp .= ""; $txtmp .= "
"; $txtmp .= _MODERATOR; $txtmp .= "
"; $txtmp .="get_sesid()."&op=config_news\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= img("ico/news_info.gif",_CONF_NEWS,"16px","16px"); $txtmp .= ""; $txtmp .= ""; $txtmp .="get_sesid()."&op=config_news\" style=\"background:transparent;text-decoration:none;font-weight:normal;\">"; $txtmp .= _CONF_NEWS; $txtmp .= ""; $txtmp .= "
"; // $txtmp .= img("ico/pkt.gif","","1px","1px"); // $txtmp .= "
"; $tx .= $txtmp; $tx_jquery2_dzialy .=$txtmp; $tx .= "
"; $tx .= ""; $tx .= img("ico/narzedzia_n.gif",_TOOLS,"16px","16px"); $tx .= " "._TOOLS; $tx .= ""; $tx .=" | "; //---------------------------------------------------------------------------------------------------------------------------------------------modules menu // if (is_moderator()){ if (is_admin()){ //----------div start // $tx .= "
"; // $tx .= "
"; $tx .= "
"; $txtmp = ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $txtmp .= ""; $dd = dir("modules"); //echo "sss33"; while (false !== ($entry = $dd->read())) { if ($entry != '.' && $entry != '..' && is_dir("modules/".$entry)) $arDir[$entry] = $entry; } $dd->close(); // print_r($arDir); ksort($arDir); $f_c=""; $is_sadmin=is_sadmin(); foreach($arDir as $key) { //echo $key."==".is_adminmod(addslashes($key))."
"; if (is_adminmod(addslashes($key))){ $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."perm WHERE types='im' AND module_name='".addslashes($key)."' limit 1"; $result=$db->sql_query($sql); $row=$db->sql_fetchrow($result); if ($row['installed']) { $adminlink=""; $configlink=""; include("modules/".addslashes($key)."/admin/admin.php"); if (($adminlink OR $configlink)){ $f_c .= ""; $f_c .= ""; $f_c .= ""; $f_c .= ""; } }//if jest choc jeden }//if isadminmod }//foreach $txtmp .= $f_c; $txtmp .= "
"; $txtmp .= _MODERATOR; $txtmp .= "
"; $txtmp .= ""._ACTION.""; $txtmp .= ""; $txtmp .= ""._MODULENAME.""; $txtmp .= "
"; if ($adminlink){ $f_c .=""; // $f_c .="get_sesid()."&op=config_modules\" >"; $f_c .= img("ico/edit3.gif",_ADMIN_MODULE,"16px","16px"); $f_c .= ""; $f_c .= " "; }else { $f_c .= img("ico/pkt.gif",_NOADMIN,"16px","16px"); $f_c .= " "; } if ($configlink AND $is_sadmin){ $f_c .="get_sesid()."&op=config_modules&action=setting&setmodule=$key\" style=\"display:inline !important;border:1pc solid #f00;width:auto;border:0;\">"; $f_c .= img("ico/env.gif",_CONF_MODULE,"16px","16px"); // $f_c .= img("ico/configure.png",_CONF_MODULE,"16px","16px"); $f_c .= ""; $f_c .= " "; }else{ $f_c .= img("ico/pkt.gif",_NOCONFIG,"16px","16px"); $f_c .= " "; } $f_c .= ""; $f_c .= $key; $f_c .= "
"; $tx .=$txtmp; $tx_jquery3_dzialy=$txtmp; $tx .= "
"; //----------div end $tx .= ""; $tx .= img("ico/block.gif",_MODULES,"16px","16px"); $tx .= " "._MODULES; $tx .= ""; $tx .=" | "; } //---------------------------------------------------------------------------------------------------------------------------------------------Your menu if (is_user()){ include_once("modules/YourAccount/forms/config.php"); // $mret = ""; $mret = "
"; $mret .= ""; $mret .= ""; $mret .= ""; $mret .= ""; $mret .= ""; $mret .= ""; $mret .= ""; if ($GO_CONFIG->mod_YourAccountUser){ $mret .= ""; $mret .= ""; $mret .= ""; $mret .= ""; } $mret .= ""; $mret .= ""; $mret .= ""; $mis=0; for ($i=1;$i{$YourAccount[$i][0]}){ if ($GO_CONFIG->{"mod_".$YourAccount[$i][0]}){ $mis=1; // include("modules/".$YourAccount[$i][0]."/language/".$GO_CONFIG->dz_language.".inc"); $mret .= ""; $mret .= ""; $mret .= ""; $mret .= ""; } }//for if ($mis>0){ $mret .= ""; $mret .= ""; $mret .= ""; } $mret .= ""; $mret .= ""; $mret .= ""; $mret .= ""; $mret .= "
"; $mret .= "".conf(user)." "; $mret .= "
"; $mret .= img("ico/home.gif",_HOME,16,16); // $mret .= img("ico/home3.gif",_HOME,16,16); $mret .= ""; $mret .=""; $mret .=_HOME; $mret .= ""; $mret .= "
"; $mret .= img("ico/admin.gif",_YOURACCOUNT,16,16); $mret .= ""; $mret .="get_sesid()."&off_left=off\">"; $mret .=_YOURACCOUNT; $mret .= ""; $mret .= "
"; $mret .= "
"; $mret .= "
"; $mret .= img("ico/".$YourAccount[$i][2],$YourAccount[$i][1],16,16); $mret .= ""; if ($modparam[tdz]>0) $mret .= ""; else $mret .= ""; define("_MODADS","aa"); $a=$YourAccount[$i][1]; eval("\$b = \"$a\";"); $mret .= $YourAccount[$i][1]; $mret .= ""; $mret .= "
"; $mret .= "
"; $mret .= "
"; $mret .= img("ico/exit.png",_LOGOUT,16,16); $mret .= ""; $mret .= ""; $mret .=_LOGOUT; $mret .= ""; $mret .= "
"; }else{ // $mret = ""; $mret = "
"; $mret .= ""; $mret .= ""; $mret .= ""; $mret .= ""; $mret .= ""; $mret .= ""; $mret .= ""; if ($GO_CONFIG->can_login){ $mret .= ""; $mret .= ""; $mret .= ""; $mret .= ""; } $mret .= "
"; $mret .= ""._GUEST." "; $mret .= "
"; $mret .= img("ico/home.gif",_HOME,16,16); // $mret .= img("ico/home3.gif",_HOME,16,16); $mret .= ""; $mret .=""; $mret .=_HOME; $mret .= ""; $mret .= "
"; $mret .= img("ico/admin.gif",_LOGIN,16,16); $mret .= ""; $mret .= ""; $mret .=_LOGIN; $mret .= ""; $mret .= "
"; } /* // $tx .=" | "; // $tx .= ""; // $tx .= img("ico/security.gif",_LOGOUT."\n"._USER.": ".conf(user),16,16); // $tx .= ""; // $tx .=""; */ $ftd=flash_td(); $tx .= "
"; // $tx .= ""; $tx .= $mret; $tx_jquery4_dzialy .=$mret; $tx .= ""; $tx .= ""; $tx .= img("ico/users.gif",_YOURMENU,16,16); $tx .= " "._YOURMENU; $tx .= ""; $tx .="
"; $txtmp =""; $txtmp .= img("ico/home.gif",_HOME,16,16); $txtmp .= ""; $txtmp .=" "; // $txtmp .= img("ico/i-info.gif",_CURENTDZIAL.":\n".get_dzialname($dz)."[ID:".$dz."]",16,16); // $txtmp .=get_dzialname($dz); $txtmp .=" | "; //---------------------------------------------------------------------------------------------------------------------------------------------LiveUpdate if ($GO_CONFIG->liveupdateon !=false AND is_sadmin()){ //$txtmp .="
"; $txtmp .="get_sesid()."&op=config_liveupdate\" style=\"display:inline !important;border:1pc solid #f00;width:auto;border:0;\">"; $txtmp .= img("ico/refresh99.png",_LIVEUPDATE,16,16); $txtmp .= " "._LIVEUPDATE; $txtmp .= ""; $txtmp .=" | "; } //---------------------------------download template if (is_admin()){ //$txtmp .="
"; // $txtmp .="  |   "; $txtmp .="get_sesid()."&op=setting&sm=1\" style=\"display:inline !important;border:1pc solid #f00;width:auto;border:0;\">"; $txtmp .= img("ico/paint.gif",_DOWNLOADTEMPLATE,16,16)." "._DOWNLOADTEMPLATE; $txtmp .= ""; $txtmp .=" "; } $txtmp .="
"; //$txtmp .="
"; $tx .=$txtmp; $tx_jquery1_4_dzialy .=$txtmp; $txtmp ="
"; if (!$GO_CONFIG->jquery_on || !$GO_CONFIG->jquery_mod_login_top){ $txtmp .="".img("ico/left9.gif",_HIDE_MENU,16,16)." "._HIDE_MENU.""; } $txtmp .="    "; $txtmp .=" ["; $txtmp .= "ver.".$GO_CONFIG->version; if ($GO_CONFIG->version_text) $txtmp .= " ".$GO_CONFIG->version_text; $txtmp .="] "; // $txtmp .= _AUTOLOGOUT.":   "; // $txtmp .= "  "; $txtmp .="
"; $tx .=$txtmp; $tx_jquery1_4_dzialy .=$txtmp; //$txtmp .= input_img("ico/enter.gif",16,16,_CHANGE,"docd")." "._BACK; // $txtmp .="".img("ico/left9.gif",_HIDE_MENU,16,16)." "._HIDE_MENU.""; // $txtmp .=" | "; $txtmp =""; $txtmp .= img("ico/enter.gif",_CHANGE,16,16); $txtmp .=" "._CHANGE; $txtmp .= ""; // $txtmp .= "
"; $txtmp .= "
"; /* $txtmp .= "\n\n\n"; */ // $txtmp .=" "; // $tx .= ""; // $tx .= ""; // $tx .= "
"; // $tx .= "
"; // $tx .= ""; $tx .=$txtmp; $tx_jquery1_4_dzialy .=$txtmp; ob_start(); include("include_web/loader/startloading.php"); //=========================SSYTEM MENU START //===menu top start /* if ($GO_CONFIG->dz_active){ echo "
"; echo table($tx,'#88dd88'); echo "
"; }else{ echo "
"; echo table($tx,''); echo "
"; } echo "
"; echo "
"; // echo img("ico/pkt.gif","",1,32); echo "
"; */ //===menu top end //if ($GO_CONFIG->jquery_on && $GO_CONFIG->jquery_mod_login_top){ if (is_jqquery_on('jquery_mod_login_top')){ echo "
"; //echo "
"; echo ""; //echo "
"; //echo $tx; echo "
".$tx_jquery1_dzialy." ".$tx_jquery1_2_dzialy."
".$tx_jquery1_4_dzialy."
".$tx_jquery1_3_dzialy."
".$tx_jquery2_dzialy."
".$tx_jquery3_dzialy."
".$tx_jquery4_dzialy."
"; //echo "
"; echo "
"; echo "
"; /* echo "

Welcome to aCMS.a6.pl

CMS Demo with jQuery

The only limit is your imagination!

Download

To download Acms.a6.pl go to web site »

"; */ echo "
"; if (is_user()){ echo "
"; //sss echo "
"; echo "
"; echo "
"; }else{ echo "

Member Login

Lost your password?

Not a member yet? Sign Up!

"; }//if is user else echo "
"; }else{//not jquery menu //=========menu main left start echo "
"; echo "
"; echo "
"; echo $tx; echo "
"; echo "
"; echo "
"; echo "\""._SHOW_HIDE_MENU."\""; echo "
"; echo "
"; }//if jquery menu //----------maon menu left end //=========================SSYTEM MENU END /* echo "
"; echo "
"; echo "\""._SHOW_HIDE_MENU."\""; echo "
"; echo "
"; echo "
"; echo $tx; echo "
"; echo "
"; echo "
"; */ /* ?> "; echo "
"; echo "\n"; echo "
"; */ //=========menu main end $GO_CONFIG->main_page_mod .= ob_get_contents(); // store buffer in $contents // upadte_timesession(); // if ($GO_CONFIG->external_tpl){ //echo "afsdafsdf11"; // $GO_CONFIG->main_page_mod .= ob_get_contents(); // store buffer in $contents // echo ob_get_contents(); // store buffer in $contents // }else{ //echo "afsdafsdf22"; // echo ob_get_contents(); // store buffer in $contents // } ob_end_clean(); // delete output buffer and stop buffering // echo $contents; if (!$GO_CONFIG->external_tpl){ //echo "dupa"; echo $GO_CONFIG->main_page_mod ; } //--------------------------------------------------------------------------------------------------------------------------- //exit; }//if is moderator //echo "sss".getpost(op); //====================================================================================================START //====================================================================================================START //====================================================================================================START //echo "
"; if (!$GO_CONFIG->external_tpl OR getpost('forwhologin')==1){ echo "
"; } /* przeniesione nizej //----------top if (getpost("action")<>"edit"){ if ($GO_CONFIG->dz_stop){ echo $GWPE->s_top(get_page($GO_CONFIG->dz_top_idpage)); } if ($GO_CONFIG->dz_stop_banner){ echo $GWPE->s_btop("bannertop"); } if ($GO_CONFIG->dz_smenu){ echo $GWPE->s_mtop("menu"); } } */ //echo getpost("action")."--".getpost(op)."==".getpost(ss)."==".session_id();exit; //--------------------------listpg start //echo "fsdF";exit; if (getpost("action")=="listpg" AND (is_moderator() OR (getpost(op)=="spopup" AND getpost(ss)==session_id()) ) ){ //echo "fsdf";exit; if ($GO_CONFIG->external_tpl){ //echo "fsdf";exit; ob_start(); } echo "
"; //echo "=fsdf====".getpost(ss)."==".session_id();exit; if (getpost("order")=="actasc") $orderx =" ORDER BY active ASC"; else if (getpost("order")=="actdesc") $orderx =" ORDER BY active DESC"; else if (getpost("order")=="iddzasc") $orderx =" ORDER BY id_dzial ASC"; else if (getpost("order")=="iddzdesc") $orderx =" ORDER BY id_dzial DESC"; else if (getpost("order")=="idasc") $orderx =" ORDER BY id ASC"; else if (getpost("order")=="iddesc") $orderx =" ORDER BY id DESC"; else if (getpost("order")=="titasc") $orderx =" ORDER BY name ASC"; else if (getpost("order")=="titdesc") $orderx =" ORDER BY name DESC"; else if (getpost("order")=="datasc") $orderx =" ORDER BY lastmodyfi ASC"; else if (getpost("order")=="datdesc") $orderx =" ORDER BY lastmodyfi DESC"; else $orderx =" ORDER BY lastmodyfi DESC"; if (getpost(query)){ $fquery=getpost('query'); if (strtoupper($fquery[0])=="I" AND strtoupper($fquery[1])=="D" AND strtoupper($fquery[2])==":"){ $fquery=substr($fquery,3); $searchword=" (id='".addslashes($fquery)."') "; }else{ $fquery=addslashes($fquery); $searchword=" ("; $searchword .=" (name like '%".addslashes($fquery)."%') "; if (getpost('in_content')==1) $searchword .=" OR (content like '%".addslashes($fquery)."%') "; $searchword .=")"; } }else $searchword=" 1 "; $snpg=getpost(snpg); if (!$snpg) $snpg=0; $limit=" limit ".$snpg.",".$GO_CONFIG->perpage; if (getpost(op)=="spopup" AND getpost(ss)==session_id() AND getpost('mainid')>0){ if ($GO_CONFIG->issadmin){ $sql="SELECT pg.* FROM ".$GO_CONFIG->dbprefix."pages pg ".$limit; }else{ if ($searchword) $searchword=" WHERE ".$searchword; $sql="SELECT pg.* FROM ".$GO_CONFIG->dbprefix."pages pg (pg.id_owner='".addslashes(getpost('mainid'))."') ".$limit; } }else{ if ($GO_CONFIG->issadmin){ if ($searchword) $searchword=" WHERE ".$searchword; $sql="SELECT pg.* FROM ".$GO_CONFIG->dbprefix."pages pg ".$searchword." ".$orderx." ".$limit; }else{ $sql="SELECT pg.* FROM ".$GO_CONFIG->dbprefix."pages pg WHERE (pg.id_owner='".addslashes(conf('id_user'))."') ".$searchword." ".$orderx." ".$limit; } } // } //echo $sql; $result=$db->sql_query($sql); include("form/pagelist.php"); echo "
"; if ($GO_CONFIG->external_tpl){ $external_tpl_csetting = ob_get_contents(); // store buffer in $contents ob_end_clean(); // delete output buffer and stop buffering // echo $external_tpl_config } //--------------------------listpg end //if ($op=="setting" AND (is_admin() OR is_sadmin())){ //===============================================================------------------------------------------------------------------- } else if ($op=="setting" AND ( ($dzcfg>0 AND is_admindzial($dzcfg,1)) OR (!$dzcfg AND is_admin()) OR is_sadmin()) ){ if ($GO_CONFIG->external_tpl){ ob_start(); } //echo "
"; define("A_SETTING","1"); include("config/setting.php"); //echo "
"; if ($GO_CONFIG->external_tpl){ $external_tpl_csetting = ob_get_contents(); // store buffer in $contents ob_end_clean(); // delete output buffer and stop buffering } //===================================================================------------------------------------------------------- } else if ($op=="system" AND is_sadmin()){ if ($GO_CONFIG->external_tpl){ ob_start(); } include("config/system.php"); if ($GO_CONFIG->external_tpl){ $external_tpl_csetting = ob_get_contents(); // store buffer in $contents ob_end_clean(); // delete output buffer and stop buffering } //====================================================================------------------------------------------------------ } else if ($op=="config_dzialy" AND is_admindzial(0,1)){ if ($GO_CONFIG->external_tpl){ ob_start(); } include("config/dzialy.php"); if ($GO_CONFIG->external_tpl){ $external_tpl_csetting = ob_get_contents(); // store buffer in $contents ob_end_clean(); // delete output buffer and stop buffering } //=========================================================================------------------------------------------ } else if ($op=="config_note" AND is_admin()){ if ($GO_CONFIG->external_tpl){ ob_start(); } include("config/notepad.php"); if ($GO_CONFIG->external_tpl){ $external_tpl_csetting = ob_get_contents(); // store buffer in $contents ob_end_clean(); // delete output buffer and stop buffering } //================================================================----------------------------- } else if ($op=="config_stat" AND is_admin()){ if ($GO_CONFIG->external_tpl){ ob_start(); } define("A_SETTING_STAT","1"); if ($_GET['action']=="clearallstat"){ $sql="TRUNCATE TABLE ".$GO_CONFIG->dbprefix."stat "; $db->sql_query($sql); $sql="TRUNCATE TABLE ".$GO_CONFIG->dbprefix."statrefresh "; $db->sql_query($sql); $sql="TRUNCATE TABLE ".$GO_CONFIG->dbprefix."stat_domains "; $db->sql_query($sql); $sql="TRUNCATE TABLE ".$GO_CONFIG->dbprefix."stat_dzialy "; $db->sql_query($sql); $sql="TRUNCATE TABLE ".$GO_CONFIG->dbprefix."stat_firstpg "; $db->sql_query($sql); $sql="TRUNCATE TABLE ".$GO_CONFIG->dbprefix."stat_fromcountry "; $db->sql_query($sql); $sql="TRUNCATE TABLE ".$GO_CONFIG->dbprefix."stat_fromip "; $db->sql_query($sql); $sql="TRUNCATE TABLE ".$GO_CONFIG->dbprefix."stat_modules "; $db->sql_query($sql); $sql="TRUNCATE TABLE ".$GO_CONFIG->dbprefix."stat_pages "; $db->sql_query($sql); $sql="TRUNCATE TABLE ".$GO_CONFIG->dbprefix."stat_referer "; $db->sql_query($sql); $sql="TRUNCATE TABLE ".$GO_CONFIG->dbprefix."stat_scr "; $db->sql_query($sql); $sql="TRUNCATE TABLE ".$GO_CONFIG->dbprefix."stat_system "; $db->sql_query($sql); } include("config/stat.php"); if ($GO_CONFIG->external_tpl){ $external_tpl_csetting = ob_get_contents(); // store buffer in $contents ob_end_clean(); // delete output buffer and stop buffering } //=============================================================------------------------------------------ } else if ($op=="config_banner" AND is_admin()){ if ($GO_CONFIG->external_tpl){ ob_start(); } define("A_SETTING_BANNERS","1"); $res=""; if ($_POST['action']=="addclient"){ if ($_POST['upclid']>0){//update client if ($_POST['bcl_passwd']) $clpasswd=" password='".addslashes($_POST['bcl_passwd'])."', "; else $clpasswd=""; $sql="UPDATE ".$GO_CONFIG->dbprefix."banners_owners SET $clpasswd id_user='".addslashes($_POST['bcl_iduser'])."', gid_owner='".addslashes($_POST['bcl_gidowner'])."', name='".addslashes($_POST['bcl_name'])."', email='".addslashes($_POST['bcl_email'])."', adres='".addslashes($_POST['bcl_adres'])."' WHERE id='".addslashes($_POST['upclid'])."' limit 1"; $result = $db->sql_query($sql); //return edit client $_GET['action']="addclient"; $_GET['edidcl']=$_POST['upclid']; echo "upadte client"; }else{//insert client if ($_POST['bcl_gidowner'] AND $_POST['bcl_name'] AND $_POST['bcl_passwd']){ $sql = "INSERT INTO ".$GO_CONFIG->dbprefix."banners_owners ( id, id_user, gid_owner, name, password, email, adres, last_data_login, last_ip_login, all_login )VALUES( '','".addslashes($_POST['bcl_iduser'])."','".addslashes($_POST['bcl_gidowner'])."', '".addslashes($_POST['bcl_name'])."','".addslashes($_POST['bcl_passwd'])."','".addslashes($_POST['bcl_email'])."', '".addslashes($_POST['bcl_adres'])."', '','','' )"; $result = $db->sql_query($sql); $newinsid=$db->sql_nextid(); if ($newinsid>0){ $res= ""._ADDBANNERUSEROK." "._IDBANERUSER.": ".$newinsid.""; }else echo error(_ERRORINSERTDB); }else echo error(_NONEEDFIELD); }//insert client end }else if ($_POST['action']=="addbanner"){ if ($_POST['ban_alwaysshow']==1) $ban_alwaysshow=1; else $ban_alwaysshow=0; if ($_POST['ban_piorytet']<1) $_POST['ban_piorytet']=1; if ($_POST['ban_width']<1) $_POST['ban_width']="100px"; if ($_POST['ban_height']<1) $_POST['ban_height']="100px"; if ($_POST['upbanid']>0){//update if ($_POST['ban_www']){ if ($_POST['ban_counter_data']) $databan=" '".date2timestamp($_POST['ban_counter_data'])."' "; else $databan="NULL"; $sql="UPDATE ".$GO_CONFIG->dbprefix."banners SET id_banowner='".addslashes($_POST['ban_owners'])."', www='".addslashes($_POST['ban_www'])."',banner_type='".addslashes($_POST['ban_type'])."', file_width='".addslashes($_POST['ban_width'])."',file_height='".addslashes($_POST['ban_height'])."', file_border='".addslashes($_POST[ban_brweight])."', file_colborder='".addslashes($_POST[ban_borcol])."', counter_views='".addslashes($_POST['ban_counter_views'])."', counter_click='".addslashes($_POST['ban_counter_visit'])."', counter_datae=".$databan.", counter_always='".$ban_alwaysshow."', active='".addslashes($_POST['ban_active'])."', done_prio='".addslashes($_POST['ban_piorytet'])."' WHERE id='".addslashes($_POST['upbanid'])."' limit 1"; $result = $db->sql_query($sql); }else echo error(_ERRORNONEEDFIELD); //return edit banner $_GET['action']="addbanner"; $_GET['edidb']=$_POST['upbanid']; }else{//insert new banner start if ($_FILES["ban_file"]["tmp_name"] AND $_POST['ban_www'] AND $_POST['ban_filetype'] AND $_POST['ban_owners'] AND $_POST['ban_width'] AND $_POST['ban_height']){ if ($_POST['ban_counter_data']) $databan=" '".date2timestamp($_POST['ban_counter_data'])."' "; else $databan="NULL"; $sql = "INSERT INTO ".$GO_CONFIG->dbprefix."banners ( id, id_banowner, www, banner_type, file_type, file_width, file_height, file_border, file_colborder, id_dzial, counter_views, counter_click, counter_datae, counter_always, active, done, done_prio, views, clicks )VALUES( '','".addslashes($_POST['ban_owners'])."', '".addslashes($_POST['ban_www'])."','".addslashes($_POST['ban_type'])."','".addslashes($_POST['ban_filetype'])."', '".addslashes($_POST['ban_width'])."','".addslashes($_POST['ban_height'])."','".addslashes($_POST['ban_brweight'])."','".addslashes($_POST['ban_borcol'])."', '".addslashes($_POST['ban_iddzial'])."', '".addslashes($_POST['ban_counter_views'])."','".addslashes($_POST['ban_counter_visit'])."',".$databan.", '".$ban_alwaysshow."','".addslashes($_POST['ban_active'])."', '".addslashes($_POST['ban_piorytet'])."','".addslashes($_POST['ban_piorytet'])."', '1','1' ) "; $result = $db->sql_query($sql); $newinsid=$db->sql_nextid(); if ($newinsid>0){ $newfile="image_banners/".$_POST['ban_owners']."/".$newinsid.".".addslashes($_POST['ban_filetype']); if (!is_dir("image_banners/".$_POST['ban_owners'])){ mkdir("image_banners/".$_POST['ban_owners'], 0700); } if (!move_uploaded_file($_FILES["ban_file"]["tmp_name"],$newfile)) { $sql = "DEKLETE FROM ".$GO_CONFIG->dbprefix."banners WHERE id='$newinsid' LIMIT 1"; $db->sql_query($sql); echo error(_ERRORUPLOADING); }else $res= ""._ADDBANNEROK." "._IDBANER.": ".$newinsid.""; }else echo error(_ERRORINSERTDB); }else echo error(_ERRORNONEEDFIELD); }//insert } if ($_GET['action']=="addclient"){ if ($_GET['edidcl']>0) { $sql = "SELECT * FROM ".$GO_CONFIG->dbprefix."banners_owners WHERE id='".addslashes($_GET['edidcl'])."' limit 1"; $result = $db->sql_query($sql); $rowecl=$db->sql_fetchrow($result); // echo "edit client"; } else if ($_GET[delidcl]>0) { //delete file start $sql="SELEDT id FROM ".$GO_CONFIG->dbprefix."banners WHERE id_banowner='".addslashes($_GET['delidcl'])."' "; $result = $db->sql_query($sql); while($row=$db->sql_fetchrow($result)){ unlink("image_banners/".$row['id_banowner']."/".$row['id'].".".$row['file_type']); } //delete file end $sql="DELETE FROM ".$GO_CONFIG->dbprefix."banners_owners WHERE id='".addslashes($_GET['delidcl'])."' limit 1"; $db->sql_query($sql); $sql="DELETE FROM ".$GO_CONFIG->dbprefix."banners WHERE id_banowner='".addslashes($_GET['delidcl'])."' "; $db->sql_query($sql); echo "delete client TODO UNLINK FILE"; } }else if ($_GET['action']=="addbanner"){ if ($_GET[edidb]>0) { //edit banner $sql = "SELECT * FROM ".$GO_CONFIG->dbprefix."banners WHERE id='".addslashes($_GET['edidb'])."' limit 1"; $result = $db->sql_query($sql); $rowedb=$db->sql_fetchrow($result); // echo "edit banner"; }else if ($_GET[delidb]>0) {//delete banner //delete file start $sql="SELEDT id FROM ".$GO_CONFIG->dbprefix."banners WHERE id='".addslashes($_GET['delidb'])."' limit 1"; $result = $db->sql_query($sql); $row=$db->sql_fetchrow($result); unlink("image_banners/".$row['id_banowner']."/".$row['id'].".".$row['file_type']); //delete file end $sql="DELETE FROM ".$GO_CONFIG->dbprefix."banners WHERE id='".addslashes($_GET['delidb'])."' limit 1"; $db->sql_query($sql); echo "delete banner TODO UNLINK FILE"; }else if ($_GET[offidb]>0){//unactive banner $sql="UPDATE ".$GO_CONFIG->dbprefix."banners SET active='0' WHERE id='".addslashes($_GET['offidb'])."' AND active='1' limit 1"; $db->sql_query($sql); // echo "OFF banner"; }else if ($_GET[onidb]>0){//active banner $sql="UPDATE ".$GO_CONFIG->dbprefix."banners SET active='1' WHERE id='".addslashes($_GET['onidb'])."' AND active='0' limit 1"; $db->sql_query($sql); // echo "ON banner"; } } include("config/banners.php"); if ($GO_CONFIG->external_tpl){ $external_tpl_csetting = ob_get_contents(); // store buffer in $contents ob_end_clean(); // delete output buffer and stop buffering } //===================================================================------------------------------------------------------- } else if ($op=="config_domain" AND is_sadmin()){ if ($GO_CONFIG->external_tpl){ ob_start(); } if ($_POST['sm']=="0" AND $_POST['domainquery']<>"" AND $_POST['searchdomain'] AND $_POST['searchdomainwhere']<>""){ $sql = "SELECT * FROM ".$GO_CONFIG->dbprefix."domain WHERE name like '%".addslashes($_POST['domainquery'])."%' AND types='".addslashes($_POST['searchdomainwhere'])."' "; $result = $db->sql_query($sql); }else if ($_POST['sm']=="1" AND $_POST['newdomain']<>"" AND $_POST['domainsub_id2']>0){ if ($_POST['newdomainlock']) $_POST['newdomainlock']=1; else $_POST['newdomainlock']=0; $sql="INSERT INTO ".$GO_CONFIG->dbprefix."domain ( id_domain, name, types, id_dzial, param, active, `lock`, id_owner, top_user, top_active, todate )VALUES( '','".addslashes($_POST['newdomain'])."','s', '".addslashes($_POST['domainsub_id2'])."','".addslashes($_POST['newdomainparam'])."','".addslashes($_POST['newdomainact'])."', '".addslashes($_POST['newdomainlock'])."', '','','',NOW() )"; $db->sql_query($sql); }else if ($_POST['sm']=="0" AND $_POST['editdomain']<>"" AND $_POST['editdomainsub_id2']>0 AND $_POST['editdomainid']){ if ($_POST['editdomainlock']==1) $_POST['editdomainlock']=1; else $_POST['editdomainlock']=0; $sql="UPDATE ".$GO_CONFIG->dbprefix."domain SET name='".addslashes($_POST['editdomain'])."', id_dzial='".addslashes($_POST['editdomainsub_id2'])."', `lock`='".addslashes($_POST['editdomainlock'])."', param='".addslashes($_POST['editdomainparam'])."', active='".addslashes($_POST['editdomainact'])."' WHERE id_domain='".addslashes($_POST['editdomainid'])."' limit 1"; $db->sql_query($sql); }else if ($_GET['sm']=="0" AND $_GET['action']=="editdomain" AND $_GET['dmcfg']>0){ $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."domain WHERE id_domain='".addslashes($_GET['dmcfg'])."' limit 1"; $result = $db->sql_query($sql); $row=$db->sql_fetchrow($result); define("_editdomain","".$_GET['dmcfg'].""); }else if ($_GET['sm']=="0" AND $_GET['action']=="deletedomain" AND $_GET['dmcfg']>0){ $sql="DELETE FROM ".$GO_CONFIG->dbprefix."domain WHERE id_domain='".addslashes($_GET['dmcfg'])."' limit 1"; $db->sql_query($sql); } include("config/domain.php"); if ($GO_CONFIG->external_tpl){ $external_tpl_csetting = ob_get_contents(); // store buffer in $contents ob_end_clean(); // delete output buffer and stop buffering } //=============================================================================------------------------------------------ } else if ($op=="config_info"){ if ($GO_CONFIG->external_tpl){ ob_start(); } include("config/info.php"); if ($GO_CONFIG->external_tpl){ $external_tpl_csetting = ob_get_contents(); // store buffer in $contents ob_end_clean(); // delete output buffer and stop buffering } //=========================================================================------------------------------------------------ } else if ($op=="config_newsletter" AND is_admin()){ if ($GO_CONFIG->external_tpl){ ob_start(); } //-----save if ($_POST['action']=="sendmailsnl" AND $_POST['idnl']>0 AND $_POST['f_content']){ if ($_POST['nl_name']) $subiect=$_POST['nl_name']; else $subiect=_NEWSLETTERSUBIECT; $contentnl_foother .="
\nNewsletter ".gdate()."
\n
\n "; $contentnl .=$_POST['f_content']; // $contentnl .=$_POST[nl_name]."
\n "; $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."newsletter_recepient WHERE type_nl='".addslashes($_POST['idnl'])."' AND active='1' "; $result = $db->sql_query($sql); $mok=0; $merr=0; $merror=""; while($row = $db->sql_fetchrow($result)){ if ($row['email']){ $recipient=stripslashes($row['email']); $contentnl_header .="Witaj [".$recipient."],
\n"; $contentnlok=$contentnl_header.$contentnl.$contentnl_foother; $mailsstatus=sendmailer($recipient,$subiect,$contentnlok,1); if ($mailsstatus==true){ $mok++; }else{ $merror .= "
".$mailsstatus; $merr++; } }else $merr++; } echo "Wyslano maili: ".($mok+$merr).", "; echo "W tym: "; echo "Pomyslnie: ".$mok.", "; echo "Blednie: ".$merr.", "; if ($merror) echo "Mail status: ".$merror; // if ($_GET[action]=="sendnewsletter" AND $_GET[idnl]>0){ // echo "send prepere"; }else if ($_GET['action']=="deletenl" AND $_GET['idnl']>0){ $sql="DELETE FROM ".$GO_CONFIG->dbprefix."newsletter_type WHERE nl_id='".addslashes($_GET['idnl'])."' LIMIT 1"; $db->sql_query($sql); $sql="DELETE FROM ".$GO_CONFIG->dbprefix."newsletter_recepient WHERE type_nl='".addslashes($_GET['idnl'])."' "; $db->sql_query($sql); }else if ($_GET['action']=="editnewsletter" AND $_GET['idnl']>0){ $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."newsletter_type WHERE nl_id='".addslashes($_GET['idnl'])."' LIMIT 1"; $result = $db->sql_query($sql); $editnl = $db->sql_fetchrow($result); }else if ($_POST['action']=="updatenl" AND $_POST['idnl']>0 AND $_POST['nl_name'] AND $_POST['nlidgrowner']>0){ $sql="UPDATE ".$GO_CONFIG->dbprefix."newsletter_type SET name='".addslashes($_POST['nl_name'])."', gid_owner='".addslashes($_POST['nlidgrowner'])."' WHERE nl_id='".addslashes($_POST['idnl'])."' LIMIT 1"; $db->sql_query($sql); }else if ($_POST['action']=="addnewnl" AND $_POST['nlidgrowner']>0 AND $_POST['nl_name']){ $sql="INSERT INTO ".$GO_CONFIG->dbprefix."newsletter_type ( nl_id , name, gid_owner , last_send_date )VALUES ( '', '".addslashes($_POST['nl_name'])."', '".addslashes($_POST['nlidgrowner'])."', NOW( ) )"; $db->sql_query($sql); } //-----show lista if (is_sadmin()){ $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."newsletter_type ORDER BY gid_owner, name "; }else{ $sql="SELECT st.* FROM ".$GO_CONFIG->dbprefix."newsletter_type st, ".$GO_CONFIG->dbprefix."users_group gr WHERE ( ( (st.gid_owner=gr.id_group) AND (gr.id_user='".addslashes(conf(id_user))."') ) ) ORDER BY st.name DESC"; //echo $sql; } $result = $db->sql_query($sql); include("config/config_newsletter.php"); if ($GO_CONFIG->external_tpl){ $external_tpl_csetting = ob_get_contents(); // store buffer in $contents ob_end_clean(); // delete output buffer and stop buffering } //} else if ($op=="config_tpledit" AND is_moderator()){ //====================================================================------------------------------------------------------------------ } else if ($op=="config_tpledit" AND is_admin()){ if ($GO_CONFIG->external_tpl){ ob_start(); } //echo "sss"; echo "
"._TPLSEDITOR."
"; if ($GO_CONFIG->get_sesid()==$_POST['ss']){ if ($_POST["op"]=="config_tpledit" AND $_POST['op2']=="tplsource"){//save source if ($_POST['pt'] AND $_POST['tpl_tplsource'] AND is_file("form/menu_edpage/template/".$_POST['pt'].".tpl")){//update $handle = fopen("form/menu_edpage/template/".$_POST['pt'].".tpl", "wb"); $newstring =str_replace("TPLxPATH","include_web/tpl_preview/".$_POST['pt'],stripslashes($_POST['tpl_tplsource'])); $numbytes = fwrite($handle, $newstring); fclose($handle); // echo ok($numbytes." bytes written"); echo ok(round(($numbytes/1024),2)." KB written"); } }else if ($_POST["op"]=="config_tpledit" AND $_POST['op2']=="class"){//save class // if ($_POST['pt'] AND $_POST['tpl_class'] AND is_file("form/menu_edpage/template/".$_POST['pt'].".tpl")){//update if ($_POST['pt'] AND $_POST['tpl_class']){//update $filex=$_POST['pt']; $newstring =str_replace("TPLxPATH","tpl_preview/".$filex,stripslashes($_POST['tpl_class'])); $uchwyt = @fopen ("include_web/tpl_preview.css", "rb"); $ret=""; if ($uchwyt) { $is=0; while (!feof($uchwyt)) { $buffer = fgets($uchwyt, 4096); $buffer = str_replace("\n","",$buffer); $buffer = str_replace("\r","",$buffer); if ($buffer=="/* ---TPL:".$filex."S--- */") $is=1; else if ($buffer=="/* ---TPL:".$filex."E--- */") $is=2; if ($is<>1 AND $is<>2){ if ($buffer) $ret .= $buffer."\n"; } if ($is==2) { $ret .="\n/* ---TPL:".$filex."S--- */\n"; $ret .=$newstring; $ret .="\n/* ---TPL:".$filex."E--- */\n"; $is=0; } } fclose ($uchwyt); } if ($ret){ $uchwyt = fopen("include_web/tpl_preview.TMP_update", 'wb'); if ($uchwyt) { $numbytes=fwrite($uchwyt, $ret); // echo ok(round(($numbytes/1024),2)." KB written"); echo ok(round((strlen($newstring)/1024),2)." KB written"); fclose($uchwyt); } } if (copy("include_web/tpl_preview.TMP_update","include_web/tpl_preview.css")); unlink("include_web/tpl_preview.TMP_update"); }//aaaaaaaaaaaaaaaaa }else if ($_POST["op"]=="config_tpledit" AND $_POST['op2']=="image"){//save image echo "save image todo..."; if ($_POST['pt'] AND $_POST['dz_deletetpl_img'] AND $_POST['f_mod_tpl_img']){//delete echo ok("DELETED"); if (is_file("include_web/tpl_preview/".$_POST['pt']."/".$_POST['f_mod_tpl_img'])) unlink("include_web/tpl_preview/".$_POST['pt']."/".$_POST['f_mod_tpl_img']); else echo error(_NOFOUNDFILE); }else if ($_POST['pt'] AND $_FILES['new_mtpl_img']['name']){//upload $new_name=str_replace(" ","_",$_FILES['new_mtpl_img']['name']); $new_name=str_replace("..","x",$new_name); if (move_uploaded_file($_FILES['new_mtpl_img']['tmp_name'], "include_web/tpl_preview/".$_POST['pt']."/".$new_name)){ echo ok("UPLOAD OK"); }else echo error(_NOLUPOADED); } }else if ($_POST["op"]=="config_tpledit" AND $_POST['f_mod_tpl'] AND $_POST["make_new_tpl"] AND $_POST['name_new_tpl'] AND is_admindzial($_POST['dz'],1)){//COPY AND SAVE AS NEW TPL // echo "NEW TPL SAVE FROM"; $_POST['name_new_tpl']=clear_username($_POST['name_new_tpl']); if (!is_dir("include_web/tpl_preview/".$_POST['name_new_tpl']) AND !is_file("form/menu_edpage/template/".$_POST['name_new_tpl'].".tpl")){ //--make image dir if (mkdir("include_web/tpl_preview/".$_POST['name_new_tpl'])){ //copy tpl copy("form/menu_edpage/template/".$_POST['f_mod_tpl'].".tpl","form/menu_edpage/template/".$_POST['name_new_tpl'].".tpl"); //---replace $uchwyt = @fopen ("form/menu_edpage/template/".$_POST['name_new_tpl'].".tpl", "rb"); $ret=""; while (!feof($uchwyt)) { $buffer = fgets($uchwyt, 4096); $ret .= $buffer; } fclose ($uchwyt); if ($ret){ $uchwyt = fopen("form/menu_edpage/template/".$_POST['name_new_tpl'].".tpl", 'wb'); if ($uchwyt) { $ret=str_replace($_POST['f_mod_tpl'],$_POST['name_new_tpl'],$ret); fwrite($uchwyt, $ret); fclose($uchwyt); } } //------------------ // copy("form/menu_edpage/template/".$_POST['f_mod_tpl'].".txt","form/menu_edpage/template/".$_POST['name_new_tpl'].".txt"); $uchwyt = fopen("form/menu_edpage/template/".$_POST['name_new_tpl'].".txt", 'wb'); if ($uchwyt) { fwrite($uchwyt, $_POST['name_new_tpl'].">"); fclose($uchwyt); } //copy class start $filex=$_POST['f_mod_tpl']; $uchwyt = @fopen ("include_web/tpl_preview.css", "rb"); $ret=""; if ($uchwyt) { $is=0; $newstring=""; while (!feof($uchwyt)) { $buffer = fgets($uchwyt, 4096); $buffer = str_replace("\n","",$buffer); $buffer = str_replace("\r","",$buffer); if ($buffer=="/* ---TPL:".$filex."S--- */") $is=1; else if ($buffer=="/* ---TPL:".$filex."E--- */") $is=2; if ($buffer) $ret .= $buffer."\n"; if ($is==1) { $newstring .= $buffer."\n"; } if ($is==2) { $newstring .= $buffer."\n"; // $newstring ="\n/* ---TPL:".$_POST['name_new_tpl']."S--- */\n".str_replace($filex,$_POST['name_new_tpl'],$newstring)."\n/* ---TPL:".$_POST['name_new_tpl']."E--- */\n"; $newstring =str_replace($filex,$_POST['name_new_tpl'],$newstring); $is=3; } } if ($newstring) $ret .=$newstring; fclose ($uchwyt); } if ($ret){ $uchwyt = fopen("include_web/tpl_preview.TMP_addnew", 'wb'); if ($uchwyt) { fwrite($uchwyt, $ret); fclose($uchwyt); } } if (copy("include_web/tpl_preview.TMP_addnew","include_web/tpl_preview.css")); unlink("include_web/tpl_preview.TMP_addnew"); //copy class end }else echo error(_CANTMAKEDIR); }else echo error(_NAMEALREADYEXIST); }else if ($_POST["op"]=="config_tpledit" AND $_POST["dz_gettpl"] AND is_admindzial($_POST['dz'],1)){//get ziped mTpl $GO_CONFIG->save_dzial_setting_gettpl($_POST['f_mod_tpl']); }else if ($_POST["op"]=="config_tpledit" AND $_POST["dz_uploadmtpl"] AND is_admindzial($_POST['dz'],1)){//wczytaj nowego mTPLa z pliku $GO_CONFIG->save_dzial_setting_uploadtpl($_FILES['new_mtpl']['name']); }else if ($_POST["op"]=="config_tpledit" AND $_POST['dz_deletetpl'] AND $_POST['f_mod_tpl']){//delete tpl if ($_POST['ss']==$GO_CONFIG->get_sesid()){ $erx=$GO_CONFIG->delete_tpl($_POST['f_mod_tpl']); if ($erx=="1") redirect("mod.php?dz=".getpost(dz)."&ss=".getpost(ss)."&op=config_tpledit"); else exit; }else echo error(_NOACCES); } }//if ss define("A_SETTING_TPL","1"); include("config/tpledit.php"); if ($GO_CONFIG->external_tpl){ $external_tpl_csetting = ob_get_contents(); // store buffer in $contents ob_end_clean(); // delete output buffer and stop buffering } //===========================================================================================-------------------------------------------------------- } else if ($op=="config_news" AND is_moderator()){ //print_r($_GET);exit; if ($GO_CONFIG->external_tpl){ ob_start(); } //echo "=


dupa=".is_moderator(); if ($_GET['action']=="show_article"){ define("A_SHOWART","1"); if (is_sadmin()){ $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."stories WHERE topic_id='".addslashes($_GET['topic'])."' ORDER BY startdate DESC,title"; }else{ $sql="SELECT st.* FROM ".$GO_CONFIG->dbprefix."stories st, ".$GO_CONFIG->dbprefix."topics tp, ".$GO_CONFIG->dbprefix."users_group gr WHERE ( ( (st.topic_id='".addslashes($_GET['topic'])."') AND (st.topic_id=tp.topic_id) AND (tp.gid_owner =gr.id_group) AND (gr.id_user='".addslashes(conf('id_user'))."') ) ) ORDER BY st.startdate DESC, st.title"; } $result = $db->sql_query($sql); }else if ($_GET['action']=="addnewarticle"){ define("A_ADDART","1"); $row=""; }else if ($_GET['action']=="editarticle"){ $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."stories WHERE `sid`='".addslashes($_GET['idart'])."' limit 1"; $result = $db->sql_query($sql); $row=$db->sql_fetchrow($result); if ($_GET['idart']>0 AND $row['sid']>0) { define("A_EDITART","".$_GET['idart'].""); } }else if ($_GET['action']=="onarticle"){ if ($_GET[idart]>0) { $sql="UPDATE ".$GO_CONFIG->dbprefix."stories SET active='1' WHERE `sid`='".addslashes($_GET['idart'])."' limit 1"; $db->sql_query($sql); if ($_GET['retop']) redirect("mod.php?dz=".getpost(dz)."&ss=".$GO_CONFIG->get_sesid()."&op=config_news&action=".$_GET['retop']."&topic=".$_GET['topic'].""); } }else if ($_GET['action']=="offarticle"){ if ($_GET['idart']>0) { $sql="UPDATE ".$GO_CONFIG->dbprefix."stories SET active='0' WHERE `sid`='".addslashes($_GET['idart'])."' limit 1"; $db->sql_query($sql); if ($_GET['retop']) redirect("mod.php?dz=".getpost(dz)."&ss=".$GO_CONFIG->get_sesid()."&op=config_news&action=".$_GET['retop']."&topic=".$_GET['topic'].""); } }else if ($_GET['action']=="deletearticle"){ if ($_GET['idart']>0){ $sql="DELETE FROM ".$GO_CONFIG->dbprefix."stories WHERE `sid`='".addslashes($_GET['idart'])."' limit 1"; $db->sql_query($sql); //--------delete gallery start $dir="modules/News/gallery_images/".$_GET['idart']."/"; if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { if (is_file($dir.$file)){ unlink($dir.$file); } }//while } rmdir($dir); } //--------delete gallery end if ($_GET['retop']) redirect("mod.php?dz=".getpost(dz)."&ss=".$GO_CONFIG->get_sesid()."&op=config_news&action=".$_GET['retop']."&topic=".$_GET['topic'].""); } //-- }else if (getpost(action)=="addtopic"){ if ($_POST['subtopicid']<>"" AND $_POST['idgrowner']>0){ if ($_POST[newnametopic]<>""){ //---spr perm for topics if ($_POST['subtopicid']=="0" AND is_sadmin()){ $error=0; }else if ($_POST['subtopicid']>"0"){ $sql="SELECT tp.* FROM ".$GO_CONFIG->dbprefix."topics tp, ".$GO_CONFIG->dbprefix."users_group gr WHERE ( ( (tp.topic_id='".addslashes($_POST['subtopicid'])."') AND (tp.gid_owner =gr.id_group) AND (gr.id_user='".addslashes(conf(id_user))."') ) OR ( (tp.topic_id='".addslashes($_POST['subtopicid'])."') AND (gr.id_group ='4') AND (gr.id_user='".addslashes(conf(id_user))."') ) ) limit 1"; $result=$db->sql_query($sql); if ($db->sql_numrows($result)==1) $error=0; else $error=1; }else{ $error=1; } //---spr perm for topics end if (!$error){ if ($_POST['ftopicactive']==1) $ftopicactive=1; else $ftopicactive=0; $sql="INSERT INTO ".$GO_CONFIG->dbprefix."topics ( topic_id, topicname, topicimage, topictext, counter, id2, active, gid_owner, id_domain )VALUES( '','".addslashes($_POST['newnametopic'])."','','','','".addslashes($_POST['subtopicid'])."','".addslashes($ftopicactive)."','".addslashes($_POST['idgrowner'])."','' )"; //echo $sql; $db->sql_query($sql); $lastgrid=$db->sql_nextid(); //----------------------------------dodaje nowe zdjecie dla topica if ($lastgrid>0 AND $_FILES["uplotopicimg"]["tmp_name"]){ //-----deletr first unlink("modules/News/imagetopic/".addslashes($lastgrid).".jpg"); unlink("modules/News/imagetopic/".addslashes($lastgrid).".gif"); //----file start $uploaddir="modules/News/imagetopic/"; if (!is_dir($uploaddir)) mkdir($uploaddir); // $max_x=$GO_CONFIG->Ads_widthimagebig; // $max_y=$GO_CONFIG->Ads_heightimagebig; $max_x=100; $max_y=150; $jpeg_quality=60; $file_extension = strtolower(substr(strrchr($_FILES["uplotopicimg"]["name"],"."),1)); $userimage=$lastgrid.".".$file_extension; if(!move_uploaded_file($_FILES["uplotopicimg"]["tmp_name"], $uploaddir.$userimage)) { echo error(_NOUPLOADFILE); }else{ $source=$uploaddir.$userimage; resize_existing_photo ($source,$uploaddir,$userimage,1,$max_x,$max_y,$jpeg_quality); } //----file end } //----------------------------------dodaje zdjecieend // if ($_GET[retop]) redirect("mod.php?dz=".getpost(dz)."&ss=".$GO_CONFIG->get_sesid()."&op=config_news&action=".$_GET[retop]."&topic=".$_GET['ftopicid'].""); }else{ echo error(_NOPERM); } } }else if ($_GET['topic']<>""){ define("A_ADDTOPIC",1); } }else if (getpost(action)=="edittopic" ){ if ($_POST['subtopicid']<>"" AND $_POST['idgrowner']>0 AND $_POST['idtopicedid']>0){ if ($_POST['newnametopic']<>""){ //---spr perm for topics if ($_POST['subtopicid']=="0" AND is_sadmin()){ $error=0; }else if ($_POST['subtopicid']>"0"){ $sql="SELECT tp.* FROM ".$GO_CONFIG->dbprefix."topics tp, ".$GO_CONFIG->dbprefix."users_group gr WHERE ( ( (tp.topic_id='".addslashes($_POST['subtopicid'])."') AND (tp.gid_owner =gr.id_group) AND (gr.id_user='".addslashes(conf(id_user))."') ) OR ( (tp.topic_id='".addslashes($_POST['subtopicid'])."') AND (gr.id_group ='4') AND (gr.id_user='".addslashes(conf(id_user))."') ) ) limit 1"; $result=$db->sql_query($sql); if ($db->sql_numrows($result)==1) $error=0; else $error=1; }else{ echo error(_NOPERM); } //---spr perm for topics end if (!$error){ if ($_POST['idtopicedid']<>""){ if ($_POST[ftopicactive]==1) $ftopicactive=1; else $ftopicactive=0; $sql="UPDATE ".$GO_CONFIG->dbprefix."topics SET topicname='".addslashes($_POST['newnametopic'])."', id2='".addslashes($_POST['subtopicid'])."', gid_owner ='".addslashes($_POST['idgrowner'])."', active='".addslashes($ftopicactive)."' WHERE `topic_id`='".addslashes($_POST['idtopicedid'])."' limit 1"; $db->sql_query($sql); //echo $sql;exit; //----------------------------------dodaje nowe zdjecie dla topica if ($_FILES["uplotopicimg"]["tmp_name"]){ //-----deletr first unlink("modules/News/imagetopic/".addslashes($_POST['idtopicedid']).".jpg"); unlink("modules/News/imagetopic/".addslashes($_POST['idtopicedid']).".gif"); //----file start $uploaddir="modules/News/imagetopic/"; if (!is_dir($uploaddir)) mkdir($uploaddir); // $max_x=$GO_CONFIG->Ads_widthimagebig; // $max_y=$GO_CONFIG->Ads_heightimagebig; $max_x=100; $max_y=150; $jpeg_quality=60; $file_extension = strtolower(substr(strrchr($_FILES["uplotopicimg"]["name"],"."),1)); $userimage=$_POST[idtopicedid].".".$file_extension; if(!move_uploaded_file($_FILES["uplotopicimg"]["tmp_name"], $uploaddir.$userimage)) { echo error(_NOUPLOADFILE); }else{ $source=$uploaddir.$userimage; resize_existing_photo ($source,$uploaddir,$userimage,1,$max_x,$max_y,$jpeg_quality); } //----file end //----------------------------------kasuje zdjecie jak kazoano }else if ($_POST['deletetopicimg']==1){ unlink("modules/News/imagetopic/".addslashes($_POST[idtopicedid]).".jpg"); unlink("modules/News/imagetopic/".addslashes($_POST[idtopicedid]).".gif"); } //---------------------------------end kasowaanie zdjec if ($_POST[opret]) redirect("mod.php?dz=".getpost(dz)."&ss=".$GO_CONFIG->get_sesid()."&op=config_news&action=show_article&topic=".$_POST['ftopicid'].""); } }else{ echo error(_NOPERM); } } }else if ($_GET['topiced']>0){ $sql="SELECT tp.* FROM ".$GO_CONFIG->dbprefix."topics tp, ".$GO_CONFIG->dbprefix."users_group gr WHERE ( ( (tp.topic_id='".addslashes($_GET['topiced'])."') AND (tp.gid_owner =gr.id_group) AND (gr.id_user='".addslashes(conf(id_user))."') ) OR ( (tp.topic_id='".addslashes($_GET['topiced'])."') AND (gr.id_group ='4') AND (gr.id_user='".addslashes(conf(id_user))."') ) ) limit 1"; $result=$db->sql_query($sql); if ($db->sql_numrows($result)==1){ $rowtp=$db->sql_fetchrow($result); define("A_EDITTOPIC",1); } } }else if ($_GET['action']=="deletetopic"){ //---spr perm for topics if ($_GET['topic']>0 AND is_sadmin()){ $error=0; }else if ($_GET['topic']>0){ $sql="SELECT tp.* FROM ".$GO_CONFIG->dbprefix."topics tp, ".$GO_CONFIG->dbprefix."users_group gr WHERE ( ( (tp.topic_id='".addslashes($_GET['topic'])."') AND (tp.gid_owner =gr.id_group) AND (gr.id_user='".addslashes(conf(id_user))."') ) OR ( (tp.topic_id='".addslashes($_GET['topic'])."') AND (gr.id_group ='4') AND (gr.id_user='".addslashes(conf(id_user))."') ) ) limit 1"; $result=$db->sql_query($sql); if ($db->sql_numrows($result)==1) { $error=0; //----------------------------------kasuje zdjecie jak kazoano unlink("modules/News/imagetopic/".addslashes($_GET['topic']).".jpg"); unlink("modules/News/imagetopic/".addslashes($_GET['topic']).".gif"); //---------------------------------end kasowaanie zdjec }else $error=1; }else{ echo error(_NOPERM); } //---spr perm for topics end if (!$error){ $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."stories WHERE topic_id='".addslashes($_GET['topic'])."' limit 1"; $result=$db->sql_query($sql); if ($db->sql_numrows($result)==1){ echo error(_TOPICHASSTORIES); }else{ $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."topics WHERE id2='".addslashes($_GET['topic'])."' limit 1"; $result=$db->sql_query($sql); if ($db->sql_numrows($result)==1){ echo error(_TOPICHASSUNTOPICS); }else{ $sql="DELETE FROM ".$GO_CONFIG->dbprefix."topics WHERE topic_id='".addslashes($_GET['topic'])."' limit 1"; $db->sql_query($sql); } } } }else if ($_GET['action']=="activetopic"){ if ($_GET[topic]>0) { $sql="UPDATE ".$GO_CONFIG->dbprefix."topics SET active='1' WHERE `topic_id`='".addslashes($_GET['topic'])."' limit 1"; $db->sql_query($sql); } }else if ($_GET['action']=="deactivetopic"){ if ($_GET[topic]>0) { $sql="UPDATE ".$GO_CONFIG->dbprefix."topics SET active='0' WHERE `topic_id`='".addslashes($_GET['topic'])."' limit 1"; $db->sql_query($sql); } }else if ($_POST['action']=="savegallerynews"){//--------------------------------------------------save news gallery if ($_POST['idart']>0){ // echo "sfsd"; //$_FILES['plik']['tmp_name']; //echo count($_FILES['tmp_name']);exit; //print_r($_FILES); //print_r($_POST); if (count($_POST['gal_news_delete'])>0){ for ($i=0;$i"; //-----upload new image if ($_FILES['gal_news']['tmp_name'][$i] AND is_file($_FILES['gal_news']['tmp_name'][$i])){ $ext=strtolower(substr($_FILES['gal_news']['name'][$i], -3, 3)); $fname=clear_username(substr($_FILES['gal_news']['name'][$i], 0, -4)); if (!is_dir("modules/News/gallery_images/")){ mkdir("modules/News/gallery_images/"); } if (!is_dir("modules/News/gallery_images/".$_POST['idart'])){ mkdir("modules/News/gallery_images/".$_POST['idart']); } $newdestpath="modules/News/gallery_images/".$_POST['idart']."/"; $newmainfile=$fname.".".strtolower($ext); $newthumbfile="thumb_".$fname.".".strtolower($ext); $newfile=$newdestpath.$newmainfile; //print_r($_FILES); if(!move_uploaded_file($_FILES['gal_news']['tmp_name'][$i], $newfile)){ echo error(_ERROR.": Cant upload file"); $error=1; }else{ //ng_maxx ng_maxy ng_quality //--------zoom if (getpost('ng_maxx')) $imgmaxx=getpost('ng_maxx'); else if ($GO_CONFIG->imgmax_x) $imgmaxx=$GO_CONFIG->imgmax_x; else if (!$GO_CONFIG->Gallery_widthimagebig) $imgmaxx=300; else $imgmaxx=$GO_CONFIG->Gallery_widthimagebig; if (getpost('ng_maxy')) $imgmaxy=getpost('ng_maxy'); else if ($GO_CONFIG->imgmax_y) $imgmaxy=$GO_CONFIG->imgmax_y; else if (!$GO_CONFIG->Gallery_heightimagebig) $imgmaxy=400; else $imgmaxy=$GO_CONFIG->Gallery_heightimagebig; //-------thumbal if (!$GO_CONFIG->Gallery_widthimage) $imgmaxtx=200; else $imgmaxtx=$GO_CONFIG->Gallery_widthimage; if (!$GO_CONFIG->Gallery_heightimage) $imgmaxty=200; else $imgmaxty=$GO_CONFIG->Gallery_heightimage; //--------quality if (getpost('ng_quality')) $imgquality=getpost('ng_quality'); else if ($GO_CONFIG->imgquality) $imgquality=$GO_CONFIG->imgquality; else if (!$GO_CONFIG->Gallery_quality) $imgquality=65; else $imgquality=$GO_CONFIG->Gallery_quality; //echo $imgmaxx."==".$imgmaxy;exit; // resize_existing_photo ($newfile,$newdestpath,$newthumbfile,1,$imgmaxtx,$imgmaxty,60); //make thumb resize_existing_photo ($newfile,$newdestpath,$newmainfile,1,$imgmaxx,$imgmaxy,$imgquality); //resize resize_existing_photo ($newfile,$newdestpath,$newthumbfile,1,$imgmaxtx,$imgmaxty,$imgquality); //make thumb } } //-----end upload new image } } //echo "===".$ile; //exit; } redirect("mod.php?dz=5&action=editarticle&idart=".$_POST['idart']."&ss=".$GO_CONFIG->get_sesid()."&op=config_news&opret=show_article&topic=".$_POST['ftopicid']."&off_right=off&off_left=off"); }else if ($_POST['action']=="saveeditnews"){//--------------------------------------------------save news article //echo "===$_POST[dz_save],$_POST[ftitle],$_POST[ftopicid]"; if ($_POST['dz_save']<>"" AND $_POST['ftitle']<>"" AND $_POST['f_content']<>"" AND $_POST['ftopicid']>0){ //---spr perm for topics if (!is_admin() OR !is_sadmin()){ $sql="SELECT tp.* FROM ".$GO_CONFIG->dbprefix."topics tp, ".$GO_CONFIG->dbprefix."users_group gr WHERE ( ( (tp.topic_id='".addslashes($_POST['ftopicid'])."') AND (tp.gid_owner =gr.id_group) AND (gr.id_user='".addslashes(conf(id_user))."') ) ) limit 1"; $result=$db->sql_query($sql); $row=$db->sql_fetchrow($result); if (!$row[topic_id]) $error=1; else $error=0; } //---spr perm for topics end if (!$error){ $startdate=date2imestamp($_POST['fstart_date']); $today=date2imestamp(gdate('sql')); //fcalenddate //fin_calendar if ($_POST['fin_calendar']){ $incalendar ="in_calendar='1',"; $dataendcal=date2imestamp($_POST['fcalenddate']); if (!$dataendcal OR $dataendcal<$startdate) $dataendcal=$startdate; $data_calendar_end=$dataendcal; $incalendar .="calenddate='".addslashes($dataendcal)."',"; }else{ $incalendar ="in_calendar='0',calenddate=NULL,"; } // $f_content=corect_to_save($_POST['f_content']); if ($_POST['idart']>0){ if (!$_POST[factive]) $active=0; else $active=1; if (strpos($_POST['f_content'], "src=")===false AND strpos($_POST['f_content'], "SRC=")===false){ $isimage=0; $oneimage=""; }else{ $isimage=1; $oneimage=get_first_img($_POST['f_content'],1); } $sqladd=",`id_owner`='".addslashes($_POST['fidowner'])."', `gid_owner`='".addslashes($_POST['fgidowner'])."'"; $sql="UPDATE ".$GO_CONFIG->dbprefix."stories SET startdate='".addslashes($startdate)."', ".$incalendar." title='".addslashes($_POST['ftitle'])."', bodytext ='".corect_to_save($_POST['f_content'])."', topic_id='".addslashes($_POST['ftopicid'])."', author ='".addslashes($_POST['fautor'])."', active='".addslashes($factive)."', is_image='".$isimage."', one_image='".addslashes($oneimage)."' $sqladd WHERE `sid`='".addslashes($_POST['idart'])."' limit 1"; $db->sql_query($sql); //------------insert into calendar start // if ($_POST['fin_calendar']){ // } $sql="DELETE FROM ".$GO_CONFIG->dbprefix."Calendar WHERE id_stories='".addslashes($_POST['idart'])."' LIMIT 1"; $db->sql_query($sql); if ($_POST['fin_calendar']){ $sql="INSERT INTO ".$GO_CONFIG->dbprefix."Calendar ( id, id_page, cat_id, ext,id_language ,id_group_owner ,id_owner , id_stories , title ,startdate ,todate, active )VALUES( '','0','0','','0','0','0', '".addslashes($_POST['idart'])."','".addslashes($_POST['ftitle'])."','".addslashes($startdate)."','".addslashes($data_calendar_end)."', '1' )"; $db->sql_query($sql); } //------------insert into calendar end if ($_POST['opret']) redirect("mod.php?dz=".getpost(dz)."&ss=".$GO_CONFIG->get_sesid()."&op=config_news&action=show_article&topic=".$_POST['ftopicid'].""); }else{ if ($startdate>$today AND !$_POST['factive']) $active=0; else $active=1; if (strpos($_POST['f_content'], "src=")===false AND strpos($_POST['f_content'], "SRC=")===false){ $isimage=0; $oneimage=""; }else{ $isimage=1; $oneimage=get_first_img($_POST['f_content'],1); } if (is_sadmin()) $owner=addslashes($_POST['fidowner']); else $owner=conf(id_user); if ($_POST['fin_calendar']){ $incalendar ="'1',"; $dataendcal=date2imestamp($_POST['fcalenddate']); if (!$dataendcal OR $dataendcal<$startdate) $dataendcal=$startdate; $data_calendar_end=$dataendcal; $incalendar .="'".addslashes($dataendcal)."',"; }else{ $incalendar ="'0',NULL,"; } $sql="INSERT INTO ".$GO_CONFIG->dbprefix."stories ( `sid`, `aid` , `title`, `startdate`, `in_calendar`,`calenddate`, `hometext` , `bodytext`, `comments`, `counter`, `topic_id`, `informant`, `notes`, `ihome`, `author`, `acomm`, `haspoll`, `pollID`, `score`, `ratings`, `active`, `inform_mail`, `is_image`, `one_image`, `id_miasto`, `id_owner`, `gid_owner` )VALUES( '','".conf(user)."', '".addslashes($_POST['ftitle'])."','".addslashes(date2imestamp($_POST['fstart_date']))."', ".$incalendar." '','".corect_to_save($_POST['f_content'])."', '','', '".addslashes($_POST['ftopicid'])."', '','','','".addslashes($_POST['fautor'])."', '','','','','', '".addslashes($active)."','','".$isimage."','".addslashes($oneimage)."','', '".$owner."','".addslashes($_POST['fgidowner'])."' )"; $db->sql_query($sql); //------------insert into calendar start $lastgrid=$db->sql_nextid(); if ($_POST['fin_calendar'] AND $lastgrid>0){ $sql="INSERT INTO ".$GO_CONFIG->dbprefix."Calendar ( id, id_page, cat_id, ext,id_language ,id_group_owner ,id_owner , id_stories , title ,startdate ,todate, active )VALUES( '','0','0','','0','0','0', '".addslashes($lastgrid)."','".addslashes($_POST['ftitle'])."','".addslashes(date2imestamp($_POST['fstart_date']))."','".addslashes($data_calendar_end)."', '1' )"; $db->sql_query($sql); } //------------insert into calendar end //echo $sql;exit; // if ($_GET[retop]) redirect("mod.php?dz=".getpost(dz)."&ss=".$GO_CONFIG->get_sesid()."&op=config_news&action=".$_GET[retop]."&topic=".$_GET['ftopicid'].""); redirect("mod.php?dz=".getpost(dz)."&off_right=off&off_left=off&ss=".$GO_CONFIG->get_sesid()."&op=config_news&action=addnewarticle&topic=".$_POST['ftopicid']."&eddate=".$startdate."&edlang=".$_POST['cat_language'].""); } }else{ echo error(_NOPERM); } //echo "ddd"; // if ($_POST[opret]) redirect("mod.php?dz=".getpost(dz)."&ss=".$GO_CONFIG->get_sesid()."&op=config_news&action=".$_POST[opret]."&topic=".$_POST['topic'].""); }else echo error(_FILLTITLEANDCONTENT); } include("config/news.php"); if ($GO_CONFIG->external_tpl){ $external_tpl_csetting = ob_get_contents(); // store buffer in $contents ob_end_clean(); // delete output buffer and stop buffering } //====================================================================================================------------------------------------------------------------------- } else if ($op=="config_acces" AND is_admin()){ if ($GO_CONFIG->external_tpl){ ob_start(); } if (($_GET['delip']>0 OR $_GET['delip']=="*") AND $_GET['deltype'] AND $_GET['action']=="delip"){ //-------------------------------spr deny for delete self $delete=1; if (get_userip()==$_GET['delip'] OR $_GET['delip']=="*"){ if ($_GET['delip']=="*"){ $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."acces_ip WHERE `type`='".addslashes($_GET['deltype'])."' AND ( (a_ip='".addslashes(get_userip())."' AND acces='1') ) "; }else{ $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."acces_ip WHERE `type`='".addslashes($_GET['deltype'])."' AND ( (a_ip='*' AND acces='1') ) "; } //echo $sql; $result = $db->sql_query($sql); $ilejest=$db->sql_numrows($result); if ($ilejest>0) $delete=1; else $delete=0; } //--------------------------------end spr delete self if ($delete){ $sql="DELETE FROM ".$GO_CONFIG->dbprefix."acces_ip WHERE a_ip ='".addslashes($_GET['delip'])."' AND `type`='".addslashes($_GET['deltype'])."' limit 1"; $db->sql_query($sql); }else echo error(_CANTDELETESELF); }else if ($_POST['newipadd']<>"" AND $_POST['addtype'] AND ($_POST['ipacces']=="0" OR $_POST['ipacces']=="1")){ //-----------------------------------spr deny for delete self $cadd=1; if (!$_POST['ipacces'] AND (get_userip()==$_POST['newipadd'] OR $_POST['newipadd']=="*")){ if ($_POST['newipadd']=="*"){ $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."acces_ip WHERE `type`='".addslashes($_POST['addtype'])."' AND ( (a_ip='".addslashes(get_userip())."' AND acces='1') ) "; }else{ $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."acces_ip WHERE `type`='".addslashes($_GET['deltype'])."' AND ( (a_ip='*' AND acces='1') ) "; } //echo $sql; $result = $db->sql_query($sql); if ($db->sql_numrows($result)) $cadd=1; else $cadd=0; } //--------------------------------------end spr self if ($cadd){ if ($_POST['ipacces']==1) $ipacces=1; else $ipacces=0; $sql="INSERT INTO ".$GO_CONFIG->dbprefix."acces_ip ( a_ip,`type`,acces )VALUES( '".addslashes($_POST['newipadd'])."','".addslashes($_POST['addtype'])."','".$ipacces."' )"; //echo $sql; $db->sql_query($sql); }else echo error(_CANTADDSELF); } include("config/acces.php"); if ($GO_CONFIG->external_tpl){ $external_tpl_csetting = ob_get_contents(); // store buffer in $contents ob_end_clean(); // delete output buffer and stop buffering } //===================================================================================-------------------------------------------------------------- } else if ($op=="config_liveupdate" AND is_sadmin()){//---------------------------------------------------------------------- LIVE UPDATE if ($GO_CONFIG->external_tpl){ ob_start(); } if ($_POST['update_modules']){//------------------------------------------- update modules ini_set("memory_limit","150M"); $result_update_modules=""; //echo $GO_CONFIG->updateacmsurl; exit; if ($_POST['update_modules'] AND $_POST['ss']==$GO_CONFIG->get_sesid()){ //print_r($_POST); if ($_POST['ssupdate'] AND $_POST['ident'] AND $_POST['updatedmod'] AND $_POST['updatevfrom']){ // $listtoupdate=$_POST['updatedmod']; // $listtoupdate=$_POST['updatedmod']; $listtoupdate=array(); $xx=$_POST['updatedmod']; if (is_array($xx)) $listtoupdate=$xx; else $listtoupdate[0]=$xx; $listvfrom=$_POST['updatevfrom']; //-----main //print_r($listtoupdate); if (in_array('MAIN_System_',$listtoupdate)){ $download_succes=false; $filev=$listvfrom['MAIN_System_']; $filefrom=$GO_CONFIG->updateacmsurl."?action=doupdate&ident=".$_POST['ident']."&updatemod=MAIN_System_&ssupdate=".$_POST['ssupdate']."&vfrom=".$filev; //echo $filefrom; if (download_fromweb($filefrom,"tmp_gwpe/MAIN_System__".$filev.".php")){ if (is_file("tmp_gwpe/MAIN_System__".$filev.".php") AND filesize("tmp_gwpe/MAIN_System__".$filev.".php")>0){ include("tmp_gwpe/MAIN_System__".$filev.".php"); unlink("tmp_gwpe/MAIN_System__".$filev.".php"); //----sql if (is_file("include/sql.php")){ include("include/sql.php"); if ($mod_update){ if ($GO_CONFIG->dbprefix<>"gwpe_") $mod_update=str_replace("gwpe_",$GO_CONFIG->dbprefix,$mod_update); require("classes/gwpe.class.Parse_Sql.inc"); $parsesql=new parse_sql(); $mod_update = $parsesql->remove_remarks($mod_update); $mod_update = $parsesql->remove_comments($mod_update); $mod_update = $parsesql->split_sql_file($mod_update, ";"); for ($i = 0; $i < sizeof($mod_update); $i++){ if (trim($mod_update[$i]) != ''){ // echo $mod_update[$i]; // echo "------------\n"; $sql=$mod_update[$i]; $db->sql_query($sql); } } } // unlink("include/sql.php"); $myString ="<"; $myString .="?\n"; $myString .="\$"; $myString .="mod_update="; $myString .="\"\";\n"; $myString .="?"; $myString .=">\n"; $fh=fopen('include/sql.php',"w"); // fwrite($fh,utf8_encode($myString)); fwrite($fh,$myString); fclose($fh); } //----sql end $download_succes=true; }else if (is_file("tmp_gwpe/MAIN_System__".$filev.".php")){ unlink("tmp_gwpe/MAIN_System__".$filev.".php"); } } if ($download_succes==true){ $result_update_modules .= ""; $result_update_modules .= ""; $result_update_modules .= "";+ $result_update_modules .= ""; $result_update_modules .=""._MAINSYSTEM.""; $result_update_modules .= ""; $result_update_modules .= ""; // $result_update_modules .="".$GO_CONFIG->version.""; // $result_update_modules .= "new version 111"; $result_update_modules .= ""; $result_update_modules .= ""; $result_update_modules .= "Update... OK"; $result_update_modules .= ""; $result_update_modules .= ""; }else{ $result_update_modules .= ""; $result_update_modules .= ""; $result_update_modules .= ""; $result_update_modules .= ""; $result_update_modules .=""._MAINSYSTEM.""; $result_update_modules .= ""; $result_update_modules .= ""; // $result_update_modules .="".$GO_CONFIG->version.""; // $result_update_modules .= "new version 111"; $result_update_modules .= ""; $result_update_modules .= ""; $result_update_modules .= "Update... ERROR"; $result_update_modules .= ""; $result_update_modules .= ""; } } //-----main end //----modules $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."perm WHERE types='im' AND installed='1' AND active='1' ORDER BY module_name "; $result = $db->sql_query($sql); while($row=$db->sql_fetchrow($result)){ if (in_array($row['module_name'],$listtoupdate)){ $download_succes=false; $filev=$listvfrom[$row['module_name']]; $filefrom=$GO_CONFIG->updateacmsurl."?action=doupdate&ident=".$_POST[ident]."&updatemod=".$row['module_name']."&ssupdate=".$_POST['ssupdate']."&vfrom=".$filev; if (download_fromweb($filefrom,"tmp_gwpe/".$row['module_name']."_".$filev.".php")){ if (is_file("tmp_gwpe/".$row['module_name']."_".$filev.".php") AND filesize("tmp_gwpe/".$row['module_name']."_".$filev.".php")>0){ include("tmp_gwpe/".$row['module_name']."_".$filev.".php"); unlink("tmp_gwpe/".$row['module_name']."_".$filev.".php"); //----sql if (is_file("./modules/".$row['module_name']."/info/sql.php")){ include("./modules/".$row['module_name']."/info/sql.php"); if ($mod_update){ if ($GO_CONFIG->dbprefix<>"gwpe_") $mod_update=str_replace("gwpe_",$GO_CONFIG->dbprefix,$mod_update); require("classes/gwpe.class.Parse_Sql.inc"); $parsesql=new parse_sql(); $mod_update = $parsesql->remove_remarks($mod_update); $mod_update = $parsesql->remove_comments($mod_update); $mod_update = $parsesql->split_sql_file($mod_update, ";"); for ($i = 0; $i < sizeof($mod_update); $i++){ if (trim($mod_update[$i]) != ''){ // echo $mod_update[$i]; // echo "------------\n"; $sql=$mod_update[$i]; $db->sql_query($sql); } } } // unlink("./modules/".$row[module_name]."/info/sql.php"); } //----sql end $download_succes=true; }else if (is_file("tmp_gwpe/".$row['module_name']."_".$filev.".php")){ unlink("tmp_gwpe/".$row['module_name']."_".$filev.".php"); } } if ($download_succes==true){ $result_update_modules .= ""; $result_update_modules .= ""; $result_update_modules .= ""; $result_update_modules .= ""; $result_update_modules .= $row['module_name']; $result_update_modules .= ""; $result_update_modules .= ""; // $result_update_modules .= "new version 222"; $result_update_modules .= ""; $result_update_modules .= ""; $result_update_modules .= "Update... OK"; $result_update_modules .= ""; $result_update_modules .= ""; }else { $result_update_modules .= ""; $result_update_modules .= ""; $result_update_modules .= ""; $result_update_modules .= ""; $result_update_modules .= $row['module_name']; $result_update_modules .= ""; $result_update_modules .= ""; // $result_update_modules .= "new version 222"; $result_update_modules .= ""; $result_update_modules .= ""; $result_update_modules .= "Update... ERROR"; $result_update_modules .= ""; $result_update_modules .= ""; } }//if mod do udate w array }//while $result_update_modules .= ""; $result_update_modules .= ""; $result_update_modules .= "
"; $result_update_modules .= ""._DOREPEATUPDATE.""; $result_update_modules .= "

"; $result_update_modules .= "get_sesid()."&op=config_liveupdate\">"; $result_update_modules .= img("ico/refresh99.png",_LIVEUPDATE,16,16); $result_update_modules .= " "; $result_update_modules .= ""._LIVEUPDATE.""; $result_update_modules .= ""; $result_update_modules .= "   "; $result_update_modules .= "

"; $result_update_modules .= ""; $result_update_modules .= ""; //----modules end } } //echo "sssssssssss"; $versions_mods=""; $versions_mods_toupdate=""; // include("config/liveupdate.php"); }else if ($_POST['checkout_modules']){//----------------------------------- sprawdzenie dostepnych if (count($_POST['installedmod'])>0){ $versions_mods['MAIN_System_']=$GO_CONFIG->version; $versions_mods_toupdate['MAIN_System_']="0.0"; foreach($_POST[installedmod] as $modname){ $modname=str_replace("..","x",$modname); if (is_dir("modules/".$modname."/info")){ if (is_file("modules/".$modname."/info/info.txt")){ $info=getFile("modules/".$modname."/info/info.txt"); $info=str_replace("\n\r","\n",$info); $info=explode("\n",$info); list($name,$version)=split(":",$info[1]); $versions_mods[$modname]=$version; $versions_mods_toupdate[$modname]="0.0"; } } }//foreach if ($versions_mods){//---------------------------------------sprawdzam jakie sa aktualne wersje dostepne $ret_modver=open_page($GO_CONFIG->updateacmsurl,"action=sprmod&smod=sss&cvmod=".Array2txt($versions_mods)); $actual_modver=txt2Array(stripslashes($ret_modver)); if (count($actual_modver)>0){ foreach($actual_modver as $mname => $mvalue){ $versions_mods_toupdate[$mname]=$mvalue; } } } } }else { $versions_mods=""; $versions_mods_toupdate=""; } include("config/liveupdate.php"); if ($GO_CONFIG->external_tpl){ $external_tpl_csetting = ob_get_contents(); // store buffer in $contents ob_end_clean(); // delete output buffer and stop buffering } //============================================================================================------------------------------------------------------------------------- } else if ($op=="config_security" AND is_admin()){//------------------------------------------------------------------------- SECURITY if ($GO_CONFIG->external_tpl){ ob_start(); } if ($_GET['action']=="delgroup" AND $_GET['grcfg']>99 AND $_GET['sm']=="0"){ $sql="DELETE FROM ".$GO_CONFIG->dbprefix."group WHERE id='".addslashes($_GET['grcfg'])."' limit 1"; $db->sql_query($sql); //delusergroup $sql="DELETE FROM ".$GO_CONFIG->dbprefix."users_group WHERE id_group ='".addslashes($_GET['grcfg'])."' limit 1"; $db->sql_query($sql); //delperm $sql="DELETE FROM ".$GO_CONFIG->dbprefix."perm WHERE id_group='".addslashes($_GET['grcfg'])."' limit 1"; $db->sql_query($sql); //update-domain-owner // $sql="UPDATE ".$GO_CONFIG->dbprefix."domain SET id_owner='1' WHERE id_owner=".addslashes($_GET[grcfg])."' "; // $db->sql_query($sql); //updat-topics-owner $sql="UPDATE ".$GO_CONFIG->dbprefix."topics SET id_group_owner='1' WHERE id_group_owner=".addslashes($_GET['grcfg'])."' "; $db->sql_query($sql); //updat-stories-owner $sql="UPDATE ".$GO_CONFIG->dbprefix."stories SET gid_owner='1' WHERE gid_owner=".addslashes($_GET['grcfg'])."' "; $db->sql_query($sql); }else if ($_POST['gr_addnew'] AND $_POST['sm']=="0"){ $sql="INSERT INTO ".$GO_CONFIG->dbprefix."group (id,name,gid_owner)VALUES('','".addslashes($_POST['gr_addnew'])."','".addslashes($_POST['gr_groupacces'])."')"; $db->sql_query($sql); $lastgrid=$db->sql_nextid(); //echo $sql; //add self for new group $sql="INSERT INTO ".$GO_CONFIG->dbprefix."users_group (id_user, id_group , gid_owner )VALUES('".addslashes(conf(id_user))."','".addslashes($_POST['gr_groupacces'])."','".addslashes($_POST['gr_groupacces'])."')"; $db->sql_query($sql); $lastgridGR=$db->sql_nextid(); if ($lastgrid<100 AND $lastgrid>1){ $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."group WHERE id>'99' ORDER BY id DESC limit 1"; $result = $db->sql_query($sql); $row=$db->sql_fetchrow($result); $newid=$row[id]+1; if ($newid<100) $newid=100; $sql="UPDATE ".$GO_CONFIG->dbprefix."group SET id='$newid' WHERE id='$lastgrid' limit 1"; $db->sql_query($sql); //group $sql="UPDATE ".$GO_CONFIG->dbprefix."users_group SET id_group='".$lastgrid."', gid_owner ='".$lastgrid."' WHERE id_ug='".$lastgrid."' limit 1"; $db->sql_query($sql); }else if ($lastgrid<1){ echo error(_GROUPEXIST); } }else if ($_POST[sm]=="0"){ $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."group WHERE id>'99' ORDER BY name"; $result = $db->sql_query($sql); while($row=$db->sql_fetchrow($result)){ if ($row['name']<>$_POST["gr_".$row['id']] AND $_POST["gr_".$row['id']]<>""){ $sql="UPDATE ".$GO_CONFIG->dbprefix."group SET name='".addslashes($_POST["gr_".$row['id']])."' WHERE id='".$row['id']."' limit 1"; $db->sql_query($sql); } } }else if ($_POST['updateuser'] AND $_POST['sm']==1){//update user if (is_sadmin()){ // if ($_POST[u_uid] AND $_POST[u_user] AND $_POST[u_user_emal] AND $_POST[u_user_username] AND $_POST[eaged] AND $_POST[eagem] AND $_POST[eagey]){ if ($_POST['u_uid'] AND $_POST['u_user'] AND $_POST['u_user_emal'] AND $_POST['u_user_username']){ if ($_POST['u_user_passwd2'] AND $_POST['u_user_passwd']<>"" AND $_POST['u_user_passwd']<>" " AND $_POST['u_user_passwd']<>" " AND $_POST['u_user_passwd']<>" "){ if ($_POST['u_user_passwd2']==$_POST['u_user_passwd']){ $id_unique = md5(uniqid(rand())); $hash = crypt($_POST['u_user_passwd2'], substr($_POST['u_user_passwd2'], 0, 2)); $add=" passwd='".addslashes($hash)."', "; }else { echo error(_PASSWD); $add=""; } }else $add=""; $_POST['u_user_username']=clear_username($_POST['u_user_username']); $sql = "SELECT * FROM ".$GO_CONFIG->dbprefix."users where user like '".addslashes($_POST['u_user_username'])."' AND id<>'".addslashes($_POST['u_uid'])."' limit 1"; $result = $db->sql_query($sql); $authuser = $db->sql_numrows($result); $sql = "SELECT * FROM ".$GO_CONFIG->dbprefix."users where email='".addslashes($_POST['u_user_emal'])."' AND id<>'".addslashes($_POST['u_uid'])."' limit 1"; $result = $db->sql_query($sql); $authemail = $db->sql_numrows($result); //eage //echo $authuser."==".$authemail; if (!$authuser AND !$authemail){ // $eage=date2timestamp($_POST[eaged]."-".$_POST[eagem]."-".$_POST[eagey]); $sql="UPDATE ".$GO_CONFIG->dbprefix."users SET user='".addslashes($_POST['u_user_username'])."', email='".addslashes($_POST['u_user_emal'])."', ".$add." eage='".addslashes($eage)."' WHERE id='".addslashes($_POST['u_uid'])."' AND user='".addslashes($_POST['u_user'])."' limit 1"; $db->sql_query($sql); //------group if ($_POST['u_user_groups']){ $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."users_group WHERE id_user='".addslashes($_POST['u_uid'])."' AND id_group='".addslashes($_POST['u_user_groups'])."' LIMIT 1"; $resultg = $db->sql_query($sql); $row_gr=$db->sql_fetchrow($resultg); if ($row_gr['id_group'] != $_POST['u_user_groups']){ $sql="INSERT INTO ".$GO_CONFIG->dbprefix."users_group ( id_ug, id_user, id_group, gid_owner )VALUES( '','".addslashes($_POST['u_uid'])."','".addslashes($_POST['u_user_groups'])."','1' )"; $db->sql_query($sql); } //-----------update group $sql="SELECT id_group FROM ".$GO_CONFIG->dbprefix."users_group WHERE id_user='".addslashes($_POST['u_uid'])."' AND id_group='".addslashes($_POST['u_user_groups'])."' ORDER BY id_group DESC LIMIT 1"; $resultg = $db->sql_query($sql); $row_gr=$db->sql_fetchrow($resultg); if ($row_gr['id_group']>0){ $sql="UPDATE ".$GO_CONFIG->dbprefix."users SET id_group='".addslashes($row_gr['id_group'])."' WHERE id='".addslashes($_POST['u_uid'])."' AND user='".addslashes($_POST['u_user'])."' LIMIT 1"; $db->sql_query($sql); } } //------group //echo $sql; }else echo error(_USERADDEXIST); }else echo error(); }else echo error(); }else if (($_POST['usersearch_user'] OR $_POST['addnewuser']) AND $_POST['sm']==1){ //echo "sss";exit; if ($_POST['addnewuser'] AND $_POST['user_username'] AND $_POST['user_emal'] AND $_POST['user_passwd'] AND ($_POST['user_passwd'] == $_POST['user_passwd2']) AND $_POST['user_groups']>0){ $id_unique = md5(uniqid(rand())); $hash = crypt($_POST['user_passwd2'], substr($_POST['user_passwd2'], 0, 2)); $_POST['user_username']=clear_username($_POST['user_username']); $sql = "SELECT * FROM ".$GO_CONFIG->dbprefix."users where user like '".addslashes($_POST['user_username'])."' limit 1"; $result = $db->sql_query($sql); $authuser = $db->sql_numrows($result); $sql = "SELECT * FROM ".$GO_CONFIG->dbprefix."users where email='".addslashes($_POST['user_emal'])."' limit 1"; $result = $db->sql_query($sql); $authemail = $db->sql_numrows($result); if (!$authuser AND !$authemail){ $sql="INSERT INTO ".$GO_CONFIG->dbprefix."users ( id, user, passwd, email, id_group, active, id_unique, gid_owner )VALUES( '', '".addslashes($_POST['user_username'])."','".addslashes($hash)."','".addslashes($_POST['user_emal'])."', '".addslashes($_POST['user_groups'])."','".addslashes($_POST['user_active'])."','$id_unique', '".addslashes($_POST['user_groupsowner'])."' )"; $db->sql_query($sql); $newuserid=$db->sql_nextid(); if ($newuserid>0){ $sql="INSERT INTO ".$GO_CONFIG->dbprefix."users_group (id_ug,id_user,id_group,gid_owner) VALUES ('','".$newuserid."','1','".addslashes($_POST['user_groupsowner'])."')"; $db->sql_query($sql); if ($_POST[user_groups]<>1){ $sql="INSERT INTO ".$GO_CONFIG->dbprefix."users_group (id_ug,id_user,id_group,gid_owner) VALUES ('','".$newuserid."','".addslashes($_POST['user_groups'])."','".addslashes($_POST['user_groupsowner'])."')"; $db->sql_query($sql); } if ($_POST['user_active']==-1){ $body_url=makeurl("action=activate&uid=$id_unique","mod.php"); $body = _EMAILREGISTER; $body .=""._ACTIVATEACCOUNT." - "._USER.": ".$_POST['user_username']." \n"; $body .= _ORTYPEANDPASTE." \n $body_url "; $to = $_POST['user_emal']; $subject = $GO_CONFIG->mailtitle; $makecodeok=sendmailer($to,$subject,$body,1,$GO_CONFIG->mailcodepage); if ($makecodeok){ echo ok(_USERADDSENDMAILOK."
ID:".$newuserid); } } echo ok(_USERADDOK."
ID:".$newuserid); }else{ echo error(_USERADDERROR); } }else{ echo error(_USERADDEXIST); } //-------powyzej przenioslem z 2 }else if ($_POST['usersearch_user']=="*"){ // $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."users ORDER by user "; $sql="SELECT us.* FROM ".$GO_CONFIG->dbprefix."users us, ".$GO_CONFIG->dbprefix."users_group gr, ".$GO_CONFIG->dbprefix."users_group growner WHERE ( (gr.id_group>'99' AND us.id=gr.id_user AND ( (gr.id_group=growner.id_group) OR (gr.gid_owner=growner.id_group) ) AND growner.id_user='".addslashes(conf(id_user))."' ) OR (growner.id_group ='4' AND growner.id_user='".addslashes(conf(id_user))."') ) GROUP BY us.id ORDER BY us.user limit 100"; //echo $sql; }else{ // $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."users WHERE id='".addslashes($_POST[usersearch_user])."' OR user like '%".addslashes($_POST[usersearch_user])."%' "; $sql="SELECT us.* FROM ".$GO_CONFIG->dbprefix."users us, ".$GO_CONFIG->dbprefix."users_group gr, ".$GO_CONFIG->dbprefix."users_group growner WHERE ( (gr.id_group>'99' AND us.id=gr.id_user AND ( (gr.id_group=growner.id_group) OR (gr.gid_owner=growner.id_group) ) AND growner.id_user='".addslashes(conf(id_user))."' ) OR (growner.id_group ='4' AND growner.id_user='".addslashes(conf(id_user))."') ) AND (id='".addslashes($_POST['usersearch_user'])."' OR user like '%".addslashes($_POST['usersearch_user'])."%') GROUP BY us.id ORDER BY us.user"; } $resultu=$db->sql_query($sql); $usersfind=$db->sql_numrows($resultu); // }else if ($_POST[sm]==2){ }else if (($_POST['sm']==2 OR ($_GET['sm']==2 AND $_GET['action']=="delpermgroupfile")) AND is_admin()){ if ($_GET['permgr_group']>0 AND $_GET['permdir']){ $_GET['permdir']=str_decode($_GET['permdir']); $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."perm WHERE types='f' AND module_name='".addslashes($_GET['permdir'])."' AND id_group='".addslashes($_GET['permgr_group'])."' limit 1"; $result = $db->sql_query($sql); if ($db->sql_numrows($result)==1){ $sql="DELETE FROM ".$GO_CONFIG->dbprefix."perm WHERE types='f' AND module_name='".addslashes($_GET['permdir'])."' AND id_group='".addslashes($_GET['permgr_group'])."' limit 1"; $db->sql_query($sql); }else{ echo error(_NOFINDGROUP); } }else if ($_POST['permdz_dzial']>0 AND $_POST['permfile_groupacces']>0 AND $_POST['file_catname']){ $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."perm WHERE types='f' AND module_name='".addslashes($_POST['file_catname'])."' AND id_group='".addslashes($_POST['permfile_groupacces'])."' limit 1"; $result = $db->sql_query($sql); $jest=$db->sql_numrows($result); if ($jest!=1){ if ($_POST['permfile_canwrite']==1) $permdz_canwrite=1; else $permdz_canwrite=0; if ($_POST['permfile_canread']==1) $permdz_canread=1; else $permdz_canread=0; $sql="INSERT INTO ".$GO_CONFIG->dbprefix."perm ( types, id_group, id_dzial, module_name, `read`, `write`, `installed` , active, gid_owner )VALUES( 'f','".addslashes($_POST['permfile_groupacces'])."','0','".addslashes($_POST['file_catname'])."', '$permdz_canread','$permdz_canwrite', '','', '".addslashes($_POST['grfile_groupowner'])."' )"; $db->sql_query($sql); }else{ echo error(_ALREADYSET); } } }else if ($_POST['sm']==3 OR ($_GET['sm']==3 AND $_GET['action']=="delusergroup")){ if ($_GET['sm']==3 AND ($_GET['action']=="delusergroup") AND $_GET['ggrcfg']>0 AND $_GET['ugrcfg']>0){ if ($_GET['ggrcfg']>99 OR ($_GET['ggrcfg']<100 AND $_GET['ugrcfg']>1)){ $sql="DELETE FROM ".$GO_CONFIG->dbprefix."users_group WHERE id_user='".addslashes($_GET['ugrcfg'])."' AND id_group='".addslashes($_GET['ggrcfg'])."' limit 1"; $db->sql_query($sql); if ($_GET['retop']) redirect("mod.php?dz=".getpost(dz)."&ss=".$GO_CONFIG->get_sesid()."&op=".$_GET['retop']."&sm=3"); }else{ echo error(_NOPERM); } }else if ($_POST['user_idtogroup']>0 AND $_POST['user_addgroups']>0 AND $_POST['user_groupacces']>0){ $sql = "SELECT * FROM ".$GO_CONFIG->dbprefix."users where id='".addslashes($_POST['user_idtogroup'])."' limit 1"; $result = $db->sql_query($sql); if ($db->sql_numrows($result)>0){ $sql="INSERT INTO ".$GO_CONFIG->dbprefix."users_group ( id_ug,id_user, id_group, gid_owner )VALUES( '','".addslashes($_POST['user_idtogroup'])."','".addslashes($_POST['user_addgroups'])."','".addslashes($_POST['user_groupacces'])."' )"; //echo $sql; $db->sql_query($sql); }else{ echo error(_NOFINFUSER); } } }else if (($_POST['sm']==4 OR ($_GET['sm']==4 AND $_GET['action']=="delpermgroupdzial")) AND is_admin()){ if ($_GET['permdz_dzial']>0 AND $_GET['permgr_group']>0){ $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."perm WHERE types='d' AND module_name IS NULL AND id_group='".addslashes($_GET['permgr_group'])."' AND id_dzial='".addslashes($_GET['permdz_dzial'])."' limit 1"; $result = $db->sql_query($sql); if ($db->sql_numrows($result)==1){ $sql="DELETE FROM ".$GO_CONFIG->dbprefix."perm WHERE types='d' AND module_name IS NULL AND id_group='".addslashes($_GET['permgr_group'])."' AND id_dzial='".addslashes($_GET['permdz_dzial'])."' limit 1"; $db->sql_query($sql); }else{ echo error(_NOFINDGROUP); } }else if ($_POST['permdz_dzial']>0 AND $_POST['permdz_user_addgroups']>0){ $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."perm WHERE types='d' AND module_name IS NULL AND id_group='".addslashes($_POST['permdz_user_addgroups'])."' AND id_dzial='".addslashes($_POST['permdz_dzial'])."' limit 1"; $result = $db->sql_query($sql); $jest=$db->sql_numrows($result); if ($jest!=1){ if ($_POST['permdz_canwrite']==1) $permdz_canwrite=1; else $permdz_canwrite=0; if ($_POST['permdz_canread']==1) $permdz_canread=1; else $permdz_canread=0; $sql="INSERT INTO ".$GO_CONFIG->dbprefix."perm ( types, id_group, id_dzial, module_name, `read`, `write`, `installed` , active, gid_owner )VALUES( 'd','".addslashes($_POST['permdz_user_addgroups'])."','".addslashes($_POST['permdz_dzial'])."',NULL, '$permdz_canread','$permdz_canwrite', '','', '".addslashes($_POST['gr_groupacces'])."' )"; $db->sql_query($sql); }else{ echo error(_ALREADYSET); } } }else if (($_POST['sm']==5 OR ($_GET['sm']==5 AND $_GET['mocfg']<>"" AND $_GET['ggrcfg']>0)) AND is_admin()){ if ($_GET['mocfg']<>"" AND $_GET['ggrcfg']>0){ $sql="DELETE FROM ".$GO_CONFIG->dbprefix."perm WHERE types='m' AND module_name='".addslashes($_GET['mocfg'])."' AND id_group='".addslashes($_GET['ggrcfg'])."' AND id_dzial='0' limit 1"; //echo $sql; $db->sql_query($sql); }else if ($_POST['permmod_user_addgroups']>0 AND $_POST['permmod_modulename']<>""){ $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."perm WHERE types='m' AND id_group='".addslashes($_POST['permmod_user_addgroups'])."' AND module_name='".addslashes($_POST['permmod_modulename'])."' limit 1"; $result = $db->sql_query($sql); $jest=$db->sql_numrows($result); if ($jest!=1){ if ($_POST['permmod_canwrite']==1) $permdz_canwrite=1; else $permdz_canwrite=0; if ($_POST['permmod_canread']==1) $permdz_canread=1; else $permdz_canread=0; $sql="INSERT INTO ".$GO_CONFIG->dbprefix."perm ( types, id_group, id_dzial, module_name, `read`, `write`, `installed` , active )VALUES( 'm','".addslashes($_POST['permmod_user_addgroups'])."','','".addslashes($_POST['permmod_modulename'])."', '$permdz_canread','$permdz_canwrite', '','' )"; $db->sql_query($sql); }else{ echo error(_ALREADYSET); } } } include("config/security.php"); if ($GO_CONFIG->external_tpl){ $external_tpl_csetting = ob_get_contents(); // store buffer in $contents ob_end_clean(); // delete output buffer and stop buffering } //===========================================================================================----------------------------------------------------------------------- } else if ($op=="config_translate" AND is_sadmin()){//----------------------------------------------------------------------TRANSLATE if ($GO_CONFIG->external_tpl){ ob_start(); } define("A_SETTING_UPDATE","1"); $fret =""; //print_r($_POST); //echo "

".$_POST[op]."=".count($_POST[MAINSYSTEM])."=".count($_POST[MAINMODULE])."
"; if ($_GET['op']=="config_translate" AND !$_POST['MAINSYSTEM'] AND !$_POST['MAINMODULE'] AND $_GET['action']=="load_mainsystem"){//----------------------------------LOAD system language define("_SAVED_SYSTEM","0"); $_POST['sm']=0; $_GET['sm']=0; $sql="SELECT lan FROM ".$GO_CONFIG->dbprefix."language WHERE active='1' ORDER BY lan"; $result=$db->sql_query($sql); while($row=$db->sql_fetchrow($result)){ $dir_all[] =$row['lan']; } $fret = $dir_all; //print_r($fret ); //-----------------dir end }else if ($_POST['op']=="config_translate" AND !$_POST['save_language_module'] AND (!$_POST['MAINSYSTEM'] OR !$_POST['MAINMODULE']) AND $_POST['actionc']=="load_modules" AND $_POST['lang_module_edit']<>""){//-----------LOAD module language define("_SAVED_MODULE","0"); //echo "ss"; $_POST['sm']=1; $_GET['sm']=1; // if (is_file("modules/".str_replace("..","",$_GET[lang_module_edit])."/language/en.inc")){ if (is_dir("modules/".str_replace("..","",$_POST['lang_module_edit'])."/language/")){ $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."language WHERE active='1' ORDER BY lan"; $result=$db->sql_query($sql); while($row=$db->sql_fetchrow($result)){ $dir_all[] =$row['lan']; } $fret = $dir_all; }else $fret = _NOLANGUAGE; }else if ($_POST['op']=="config_translate" AND !$_POST['load_modules'] AND count($_POST['MAINSYSTEM'])>0 AND $_POST['do_save_language_sys']==$GO_CONFIG->get_sesid()){ //----------save language system $_POST[sm]=0; $sql="SELECT lan FROM ".$GO_CONFIG->dbprefix."language WHERE active='1' ORDER BY lan"; $result=$db->sql_query($sql); while($row=$db->sql_fetchrow($result)){ $dir_all[] =$row['lan']; } $fret = $dir_all; for($l=0;$l"; copy("language/".$fret[$l],"language/".$fret[$l].".inc_COPY"); $ok=putFile("language/".$fret[$l].".inc",$record); //---------restiore if ($ok) { echo ok (_SAVEDSYSLANGUAGES."
OK FILE: language/".$fret[$l].".inc"); }else { copy("language/".$fret[$l].".inc_COPY","language/".$fret[$l].".inc"); echo ok (_SAVEDERRORSYSLANGUAGES."
ERROR FILE: language/".$fret[$l].".inc"); } //---------restore } // if ($ok) { // echo ok (_SAVEDSYSLANGUAGES); //// }else { // copy("language/".$fret[$l].".inc_COPY","language/".$fret[$l].".inc"); // echo ok (_SAVEDERRORSYSLANGUAGES); // } define("_SAVED_SYSTEM","1"); // }else if ($_POST['op']=="config_translate" AND !$_POST[load_modules] AND $_POST['save_language_module'] AND $_POST['do_save_language_sys']==$GO_CONFIG->get_sesid()){ //--------------------------save language modules }else if ($_POST['op']=="config_translate" AND count($_POST['MAINMODULE'])>0 AND $_POST['save_language_module']<>"" ){ //--------------------------save language modules $_POST['sm']=1; define("_SAVED_MODULE","1"); $sql="SELECT lan FROM ".$GO_CONFIG->dbprefix."language WHERE active='1' ORDER BY lan"; $result=$db->sql_query($sql); while($row=$db->sql_fetchrow($result)){ $dir_all[] =$row['lan']; //echo $row['lan']; } $fret = $dir_all; for($l=0;$l"; //echo $lanchar."====".$fret[$l]."
"; copy("modules/".str_replace("..","",$_POST['lang_module_edit'])."/language/".$fret[$l].".inc","modules/".str_replace("..","",$_POST['lang_module_edit'])."/language/".$fret[$l].".inc_COPY"); $ok=putFile("modules/".str_replace("..","",$_POST['lang_module_edit'])."/language/".$fret[$l].".inc",$record); //-----restore if ($ok==true) { echo ok (_SAVEDSYSLANGUAGES."
OK FILE: modules/".str_replace("..","",$_POST['lang_module_edit'])."/language/".$dir_all[$l].".inc
"); }else { copy("modules/".str_replace("..","",$_POST['lang_module_edit'])."/language/".$fret[$l].".inc_COPY","modules/".str_replace("..","",$_POST['lang_module_edit'])."/language/".$fret[$l].".inc"); echo ok (_SAVEDERRORSYSLANGUAGES."
ERROR FILE: modules/".str_replace("..","",$_POST['lang_module_edit'])."/language/".$dir_all[$l].".inc
"); } //-----restore } }//end save module language //echo "===============".getpost(sm); include("config/translate.php"); if ($GO_CONFIG->external_tpl){ $external_tpl_csetting = ob_get_contents(); // store buffer in $contents ob_end_clean(); // delete output buffer and stop buffering } //============================================================================================================---------------------------------------------------------------- } else if ($op=="config_archive" AND is_sadmin()){ if ($GO_CONFIG->external_tpl){ ob_start(); } define("A_SETTING_UPDATE","1"); //-------------------------------------------------------------------------------------------veryfikacja if ($_GET['op']=="config_archive" AND $_GET['action']=="veryfydatabase"){ $sql="show tables"; $result=$db->sql_query($sql); // $myrow=$db->sql_fetchrow($result); //print_r($myrow);exit; $ret=""; while($myrow=$db->sql_fetchrow($result,"num")){ $table_name=$myrow[0]; $ret .= "
"._CHECKING.": ".$table_name."..."; $sql="CHECK TABLE `".$table_name."`"; $res=$db->sql_query($sql); if (!$res || $db->sql_numrows($res)<0) $ret .= "ERROR!!!"; else $ret .= "OK"; } //$bgcolor='#fff',$align="left", $width="100%", $padding="0px", $spacing="0px" $back=""; $back .= img("ico/back_n.gif",_DATABASE,16,16)." "._DATABASE; $back .= "
"; echo table($back.$ret,"#eeeeee","left","770px"); //-------------------------------------------------------------------------------------------optymalizacja }else if ($_GET['op']=="config_archive" AND $_GET['action']=="optimizedatabase"){ $sql="show tables"; $result=$db->sql_query($sql); // $myrow=$db->sql_fetchrow($result); //print_r($myrow);exit; $ret=""; while($myrow=$db->sql_fetchrow($result,"num")){ $table_name=$myrow[0]; $ret .= "
"._OPTIMALIZING.": ".$table_name."..."; $sql="OPTIMIZE TABLE `".$table_name."`"; $res=$db->sql_query($sql); if (!$res || $db->sql_numrows($res)<0) $ret .= "ERROR!!!"; else $ret .= "OK"; } //$bgcolor='#fff',$align="left", $width="100%", $padding="0px", $spacing="0px" $back=""; $back .= img("ico/back_n.gif",_DATABASE,16,16)." "._DATABASE; $back .= "
"; echo table($back.$ret,"#eeeeee","left","770px"); //-------------------------------------------------------------------------------------------naprawa }else if ($_GET['op']=="config_archive" AND $_GET['action']=="repeirdatabase"){ $sql="show tables"; $result=$db->sql_query($sql); // $myrow=$db->sql_fetchrow($result); //print_r($myrow);exit; $ret=""; while($myrow=$db->sql_fetchrow($result,"num")){ $table_name=$myrow[0]; $ret .= "
"._REPERING.": ".$table_name."..."; $sql="REPAIR TABLE `".$table_name."`"; $res=$db->sql_query($sql); if (!$res || $db->sql_numrows($res)<0) $ret .= "ERROR!!!"; else $ret .= "OK"; } //$bgcolor='#fff',$align="left", $width="100%", $padding="0px", $spacing="0px" $back=""; $back .= img("ico/back_n.gif",_DATABASE,16,16)." "._DATABASE; $back .= "
"; echo table($back.$ret,"#eeeeee","left","770px"); //-------------------------------------------------------------------------------------------archiwizacja }else if ($_GET['op']=="config_archive" AND $_GET['action']=="archivedatabase"){ include_once("include/dump_sql.php"); $back=""; $back .= img("ico/back_n.gif",_DATABASE,16,16)." "._DATABASE; $back .= "
"; $back .= backupdatabase("include/tmp/archivum.sql"); echo table($back,"#eeeeee","left","770px"); }else if ($_GET['op']=="config_archive" AND $_GET['action']=="doupdate"){ include("config/update_do.php"); echo $f_c; }else{ include("config/archive.php"); } if ($GO_CONFIG->external_tpl){ $external_tpl_csetting = ob_get_contents(); // store buffer in $contents ob_end_clean(); // delete output buffer and stop buffering } //=========================================================================================================------------------------------------------------------------------ } else if ($op=="config_modules" AND is_admin()){ if ($GO_CONFIG->external_tpl){ ob_start(); } if (($_POST['action']=="modupload" OR $_GET['action']=="install" OR $_GET['action']=="uninstall" OR $_GET['action']=="active" OR $_GET['action']=="unactive") AND ($_GET['acmodule'] OR $_POST['action']=="modupload") AND is_sadmin()){ if ($_POST['action']=="modupload"){//instalacja nowego modulu zewnetrznego // $_FILES['newmodulef']['name']; if (is_uploaded_file($_FILES['newmodulef']['tmp_name'])){ if (strtolower(substr($_FILES['newmodulef']['name'],-3))=="bin"){ if (is_writable("modules/")){ $modinstalname=str_replace("..","",substr($_FILES['newmodulef']['name'],0,-4)); $modinstalldir="modules/".$modinstalname."/"; if (!is_dir($modinstalldir)){ mkdir($modinstalldir); move_uploaded_file($_FILES['newmodulef']['tmp_name'], $modinstalldir.$modinstalname.".php"); include ($modinstalldir.$modinstalname.".php"); unlink($modinstalldir.$modinstalname.".php"); echo ok(_NEWMODINSTSUCCES); }else echo error(_TMODULEALREADYINSTALLED); }else echo error(_DIRECTORYMNOTWRITABLE); }else echo error(_MODINSTALLFATALFORMAT); }else echo error(_NOUPOADEDMODFILE); }else if ($_GET['action']=="active"){ $sql="UPDATE ".$GO_CONFIG->dbprefix."perm SET active='1' WHERE types='im' AND module_name='".addslashes($_GET['acmodule'])."' AND active='0' limit 1"; $db->sql_query($sql); }else if ($_GET['action']=="unactive"){ $sql="UPDATE ".$GO_CONFIG->dbprefix."perm SET active='0' WHERE types='im' AND module_name='".addslashes($_GET['acmodule'])."' AND active='1' limit 1"; $db->sql_query($sql); }else if ($_GET['action']=="install"){ if (is_file("modules/".addslashes(str_replace("..","",$_GET['acmodule']))."/info/sql.php")){ require("modules/".addslashes(str_replace("..","",$_GET['acmodule']))."/info/sql.php"); if ($mod_install<>"") { if ($GO_CONFIG->dbprefix<>"gwpe_") $mod_install=str_replace("gwpe_",$GO_CONFIG->dbprefix,$mod_install); //----sql require("classes/gwpe.class.Parse_Sql.inc"); $parsesql=new parse_sql(); $mod_install = $parsesql->remove_remarks($mod_install); $mod_install = $parsesql->remove_comments($mod_install); $mod_install = $parsesql->split_sql_file($mod_install, ";"); for ($i = 0; $i < sizeof($mod_install); $i++){ if (trim($mod_install[$i]) != ''){ // echo $mod_install[$i]; // echo "------------\n"; $sql=$mod_install[$i]; $db->sql_query($sql); } } //----sql end // echo $mod_install; } $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."perm WHERE types='im' AND module_name='".addslashes($_GET['acmodule'])."' limit 1"; $result = $db->sql_query($sql); $jest=$db->sql_numrows($result); if ($jest!=1){ $sql="INSERT INTO ".$GO_CONFIG->dbprefix."perm ( types,id_group, id_dzial, module_name, `read`, `write`, installed, active )VALUES( 'im','','','".addslashes($_GET['acmodule'])."','','','1','1' )"; $db->sql_query($sql); } }else echo error(_NOFILE.": modules/".addslashes(str_replace("..","",$_GET['acmodule']))."/info/sql.php"); }else if ($_GET['action']=="uninstall"){ if (is_file("modules/".addslashes(str_replace("..","",$_GET['acmodule']))."/info/sql.php")){ require("modules/".addslashes(str_replace("..","",$_GET['acmodule']))."/info/sql.php"); if ($mod_deinstall<>"") { if ($GO_CONFIG->dbprefix<>"gwpe_") $mod_deinstall=str_replace("gwpe_",$GO_CONFIG->dbprefix,$mod_deinstall); //----sql require("classes/gwpe.class.Parse_Sql.inc"); $parsesql=new parse_sql(); $mod_deinstall = $parsesql->remove_remarks($mod_deinstall); $mod_deinstall = $parsesql->remove_comments($mod_deinstall); $mod_deinstall = $parsesql->split_sql_file($mod_deinstall, ";"); for ($i = 0; $i < sizeof($mod_deinstall); $i++){ if (trim($mod_deinstall[$i]) != ''){ // echo $mod_deinstall[$i]; // echo "------------\n"; $sql=$mod_deinstall[$i]; $db->sql_query($sql); } } //----sql end // print_r($mod_deinstall); } $sql="DELETE FROM ".$GO_CONFIG->dbprefix."perm WHERE types='im' AND module_name='".addslashes($_GET['acmodule'])."' "; $db->sql_query($sql); }else echo error(_NOFILE.": modules/".addslashes(str_replace("..","",$_GET['acmodule']))."/info/sql.php"); } }else if (($_GET['action']=="setting" OR $_POST['action']=="saveconfig") AND getpost(setmodule)<>""){ $sql="SELECT perm.* FROM ".$GO_CONFIG->dbprefix."users_group gr, ".$GO_CONFIG->dbprefix."perm perm, ".$GO_CONFIG->dbprefix."perm uperm WHERE ( ( perm.types='im' AND perm.installed='1' AND uperm.module_name='".addslashes($_GET['setmodule'])."' AND uperm.id_group=gr.id_group AND gr.id_user='".addslashes(conf(id_user))."' ) OR ( gr.id_user='".addslashes(conf(id_user))."' AND gr.id_group='4' ) ) LIMIT 1 "; //echo $sql; $result=$db->sql_query($sql); if ($db->sql_numrows($result)>0){ define("A_ADMINMODULE","".getpost(setmodule).""); define("A_SETMODULE",1); } } include("config/modules.php"); // if ($GO_CONFIG->external_tpl){ // $external_tpl_config = ob_get_contents(); // store buffer in $contents // ob_end_clean(); // delete output buffer and stop buffering // echo $external_tpl_config // } //echo "sfdsf";exit; if ($GO_CONFIG->external_tpl){ $external_tpl_csetting = ob_get_contents(); // store buffer in $contents ob_end_clean(); // delete output buffer and stop buffering } //======================================================================================================--------------------------------------------------- }else{ //=================================================== //----------top //=================================================== //if (getpost("action")<>"edit"){ if (getpost("action")!="edit" AND getpost("action")<>"listpg" AND getpost('action')!="login" AND getpost('action')!="forget"){ if ($GO_CONFIG->external_tpl){ $external_tpl_top=""; $external_tpl_top_banner=""; $external_tpl_top_menu=""; $external_tpl_s1_left=""; $external_tpl_s1_center=""; $external_tpl_s1_right=""; $external_tpl_s2_left=""; $external_tpl_s2_center=""; $external_tpl_s2_right=""; $external_tpl_s3_left=""; $external_tpl_s3_center=""; $external_tpl_s3_right=""; $external_tpl_bottom_baner=""; $external_tpl_bottom=""; } if ($GO_CONFIG->dz_stop){ if ($GO_CONFIG->external_tpl){ ob_start(); } echo "
"; echo $GWPE->s_top($GO_CONFIG->dz_top_idpage,$dz,1,$rowp); //---------------zewnetrzny modul includowany start $rowp=get_page($GO_CONFIG->dz_top_idpage); if ($rowp['mod_name'] AND $rowp['mod_active']){ $ismodule=$rowp['mod_name']; unset($modparam); $mod_param=""; if ($rowp['mod_param']){ $x=explode(";", $rowp['mod_param']); $q=0; while($x[$q]){ list($p1,$p2)=split("=", $x[$q]); // ${$p1}=$p2; $mod_param .= "&".$p1."=".$p2; $modparam[$p1]=$p2; $q++; } } $GO_CONFIG->scookie('_MODULE_PAGE',$rowp['id']); $GO_CONFIG->read_module_config($ismodule); if ($GO_CONFIG->support_phpnuke) { $is_module=str_replace("..","_",$ismodule); define('MODULE_FILE',$ismodule); if ($file) include("modules/$ismodule/$file.php"); else include("modules/$ismodule/index.php"); }else{ include("modules/$ismodule/index.php"); } $GO_CONFIG->dcookie('_MODULE_PAGE'); } //---------------zewnetrzny modul includowany end // echo "
"; echo ""; //-----------------top stopka if ($GO_CONFIG->external_tpl){ $external_tpl_top = ob_get_contents(); // store buffer in $contents ob_end_clean(); // delete output buffer and stop buffering // echo $contents; } //-----------------top stopka } //=================================================== //----------baner gorny //=================================================== if ($GO_CONFIG->dz_stop_banner){ if ($GO_CONFIG->external_tpl){ ob_start(); } echo $GWPE->s_btop($dz); if ($GO_CONFIG->external_tpl){ $external_tpl_top_banner = ob_get_contents(); // store buffer in $contents ob_end_clean(); // delete output buffer and stop buffering // echo $contents; } //$external_tpl_top_banner=""; } //=================================================== //----------dodatkowe menu gorne //=================================================== if ($GO_CONFIG->dz_smenu){ if ($GO_CONFIG->external_tpl){ ob_start(); } echo $GWPE->s_mtop($GO_CONFIG->dz_mtop_idpage,$dz); //---------------zewnetrzny modul includowany start $rowp=get_page($GO_CONFIG->dz_mtop_idpage); if ($rowp['mod_name'] AND $rowp['mod_active']){ if ($isadmin OR ($GO_CONFIG->dz_width AND $GO_CONFIG->dz_width!="100%")) { echo "
dz_width.";\">"; } $ismodule=$rowp['mod_name']; unset($modparam); $mod_param=""; if ($rowp['mod_param']){ $x=explode(";", $rowp['mod_param']); $q=0; while($x[$q]){ list($p1,$p2)=split("=", $x[$q]); // ${$p1}=$p2; $mod_param .= "&".$p1."=".$p2; $modparam[$p1]=$p2; $q++; } } $GO_CONFIG->scookie('_MODULE_PAGE',$rowp['id']); $GO_CONFIG->read_module_config($ismodule); if ($GO_CONFIG->support_phpnuke) { $is_module=str_replace("..","_",$ismodule); define('MODULE_FILE',$ismodule); if ($file) include("modules/$ismodule/$file.php"); else include("modules/$ismodule/index.php"); }else{ include("modules/$ismodule/index.php"); } $GO_CONFIG->dcookie('_MODULE_PAGE'); if ($isadmin OR ($GO_CONFIG->dz_width AND $GO_CONFIG->dz_width!="100%")) { // echo "
"; echo "
"; } } //---------------zewnetrzny modul includowany end // echo ""; if ($GO_CONFIG->external_tpl){ $external_tpl_top_menu = ob_get_contents(); // store buffer in $contents ob_end_clean(); // delete output buffer and stop buffering // echo $contents; } } //=================================================== //----------end menu gorne //=================================================== } //-----------------------------------------------------------------------------------------------------logowanie login start if (getpost('action')=="login"){ if ($GO_CONFIG->external_tpl){ ob_start(); } //echo $_POST[fautorizecode_pic]."--".$_SESSION[autorizecode];exit; //$_POST[execsudo] //----------acces login if ($GO_CONFIG->accesip AND !checkaccesip("login")){ echo error(_ACCESDENID); exit; } //---------acces login end //print_r($_SESSION);exit; if ( strtolower($_POST['fautorizecode_pic'])<>strtolower($_SESSION['autorizecode']) AND ($_POST['fpasswd'] OR $_POST['fuser'])) { // if ((strtolower($_POST[fautorizecode_pic])<>strtolower($_SESSION[autorizecode]) AND ($_POST[fpasswd] OR $_POST[fuser])) // AND // ($_POST[execsudo]<>"1" AND ($_POST[fpasswd] OR $_POST[fuser]))){ if (!getpost('forwhologin')==1 AND !getpost('poplogin')==1) { if (getpost('retp')) $addurl="&retp=".getpost('retp'); else $addurl=""; if (getpost('tdz')) redirect("mod.php?forwhologin=1&dz=".getpost('tdz').$addurl); else redirect("mod.php?forwhologin=1&dz=".getpost('dz').$addurl); }else echo error(_ERRORAUTHCODE); }else{ //echo "ddd"; $plainpass=$_POST['fpasswd']; //$id_unique = md5(uniqid(rand())); $hash = md5($plainpass); $hashpass = crypt($plainpass, substr($plainpass, 0, 2)); $curenttime=time(); $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."users WHERE (loginfail<'".$curenttime."') AND (user='".addslashes($_POST['fuser'])."' OR email='".addslashes($_POST['fuser'])."') AND (passwd='".$hash."' OR passwd='".$hashpass."' OR passwd='".$plainpass."') AND active='1' limit 1"; //echo $sql;exit; $result = $db->sql_query($sql); $row=$db->sql_fetchrow($result); if ($row[id]){ //-------------------------------------------------------------------------toolbar start // if (isset ($HTTP_COOKIE_VARS['DIGSID']) && $HTTP_COOKIE_VARS['DIGSID'] != "") { // session_id ($HTTP_COOKIE_VARS['DIGSID']); // session_id ($GO_CONFIG->get_sesid()); // session_start(); // $_REQUEST["PHPSESSID"]=session_id(); // } //-------------------------------------------------------------------------toolbar end $_SESSION['id_user']=$row['id']; $_SESSION['eage']=$row['eage']; $_SESSION['sex']=$row['sex']; $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."users_group WHERE id_user='".$row['id']."' AND id_group<'100' ORDER BY id_group DESC limit 1"; $gresult = $db->sql_query($sql); $grow=$db->sql_fetchrow($gresult); // $_SESSION['gid_user']=$row[id_group]; // $_SESSION['ugroup']=$row[id_group]; $_SESSION['gid_user']=$grow['id_group']; $_SESSION['ugroup']=$grow['id_group']; //echo $sql."====".$grow[id_group]; //exit; $_SESSION['user']=$row['user']; $_SESSION['email']=$row['email']; $_SESSION['imie']=$row['imie']; $_SESSION['nazwisko']=$row['nazwisko']; $_SESSION['user_language']=$row['user_language']; $_SESSION['user_avantar']=$row['user_avantar']; $_SESSION['user_play']=$row['is_play']; $_SESSION['is_login']=session_id(); $GO_CONFIG->isuser=1; //last login $today=date2timestamp(gdate('sql',1)); $sql="UPDATE ".$GO_CONFIG->dbprefix."users SET numlogin=numlogin+1, last_logintimestamp='".addslashes($today)."', last_login=NOW(), last_tlogin=NOW(), ip_login='".$_SERVER["REMOTE_ADDR"]."' WHERE user='".addslashes($fuser)."' OR email='".addslashes($fuser)."' AND active='1' limit 1"; $db->sql_query($sql); if (getpost('tdz')) $tdz="?dz=".getpost('tdz'); else $tdz=""; //-------news for admin start //print_r($GO_CONFIG); //language //dz_language //echo "afsdFmmmmmmmm"; if (is_user() AND $grow['id_group']==3 OR $grow['id_group']==4){//admin i superadmin if ($GO_CONFIG->dz_language) $lang=$GO_CONFIG->dz_language; else if ($GO_CONFIG->language) $lang=$GO_CONFIG->language; else $lang="en"; $filefrom=$GO_CONFIG->updateacmsurl."?op=spr_news&dz=".getpost('dz')."&ver=".$GO_CONFIG->version."&l=".$lang."&ss=".$GO_CONFIG->get_sesid(); //echo $filefrom; if (download_fromweb($filefrom,"tmp_gwpe/message_system.htm")){ if (is_file("tmp_gwpe/message_system.htm")){ $readed_message=getFile("tmp_gwpe/message_system.htm"); unlink("tmp_gwpe/message_system.htm"); }else $readed_message=""; }else $readed_message=""; if ($readed_message){ $GO_CONFIG->{"dz_sek1_1"}=0; // $GO_CONFIG->{"dz_sek1_2"}=0; $GO_CONFIG->{"dz_sek1_3"}=0; // $_SESSION['tmp_tdz']=getpost(tdz); // $GWPE->SEKCJA(1,$dz,$mod_param,"form/login.php",'',1); include("stopki/index_header.php"); //----------------------------------------------- $top_news_system =""; $top_news_system ="
"; $top_news_system .=""; $top_news_system .=_NEWSMESSAGE; $top_news_system .="    "; $top_news_system .=img("ico/forward.png",_GOTOPAGE,"16px","16px"); $top_news_system .=""; $top_news_system .="
"._YOURSYSTEMVERSION.": ".$GO_CONFIG->version.""; // $top_news_system .="
"; $top_news_system .="    "; $top_news_system .="("._FORUPDATECLIKLIVEUPDATE.")"; $top_news_system .="
"; $top_news_system .="



"; //----------------------------------------------- $news_system =""; $news_system .="
"; // $news_system .="

"; $news_system .= $readed_message; $news_system .="
"; $news_system .="
"; $news_system .=""; echo ok($news_system ,$top_news_system); include("stopki/index_bottom.php"); exit; } }//if admin lub superadmin //-------news for admin end //-------------------------------------------------------------------------toolbar session_register('Advanced_uid'); session_register('Advanced_id'); session_register('Advanced_email'); session_register('Advanced_name'); session_register('Advanced_company'); session_register('DIGSID'); session_register('DIGKAY'); session_register('autorizecode'); $autorizecode=$_SESSION['autorizecode']; $DIGSID = session_id(); $rx=time(); $kayx=md5(rand($row['id'].$rx.$_POST['fuser'],32000)); $DIGKAY=$kayx; $Advanced_uid = $row['id']; $Advanced_id = $rx; $Advanced_name = $row['user']; $Advanced_email = $row['email']; $Advanced_company = "5"; // setcookie ("DIGSID", $DIGSID, time () + 315360000); // setcookie ("DIGKAY", $DIGKAY, time () + 315360000); // setcookie ("sess_save", "forever1", time () + 315360000); //echo "=======";exit; ?> =3 AND $fuser){ $timeblock=time()+(60*60*5); $sql="UPDATE ".$GO_CONFIG->dbprefix."users SET loginfail='".$timeblock."' WHERE user='".addslashes($fuser)."' OR email='".addslashes($fuser)."' AND active='1' limit 1"; $db->sql_query($sql); } if (!getpost('forwhologin')==1 AND !getpost('poplogin')==1) { if (getpost('retp')) $addurl="&retp=".getpost('retp'); else $addurl=""; if (getpost('tdz')) redirect("mod.php?forwhologin=1&dz=".getpost('tdz').$addurl); else redirect("mod.php?forwhologin=1&dz=".getpost('dz').$addurl); }else echo error(_ERRORLOGIN); }else if (!getpost('forwhologin')==1 AND !getpost('poplogin')==1) { if (getpost('retp')) $addurl="&retp=".getpost('retp'); else $addurl=""; if (getpost('tdz')) redirect("mod.php?forwhologin=1&dz=".getpost('tdz').$addurl); else redirect("mod.php?forwhologin=1&dz=".getpost('dz').$addurl); } } if ($_SESSION['loginfail_".$fuser."']<3){ if (getpost('off_left')=="off") $GO_CONFIG->{"dz_sek1_1"}=0; if (getpost('off_center')=="off") $GO_CONFIG->{"dz_sek1_2"}=0; if (getpost('off_right')=="off") $GO_CONFIG->{"dz_sek1_3"}=0; // $_SESSION['tmp_tdz']=getpost('tdz'); $GWPE->SEKCJA(1,$dz,$mod_param,"form/login.php",'',1); }else{ echo error(_ERRORLOGINMAX); } //-----------------------------------------------------------------------------------------------------end login if ($GO_CONFIG->external_tpl){ $external_tpl_caction = ob_get_contents(); // store buffer in $contents ob_end_clean(); // delete output buffer and stop buffering } //-----------------------------------------------------------------------------------------------------forget start } else if (getpost(action)=="forget"){ if ($GO_CONFIG->external_tpl){ ob_start(); } if ($_POST['op']=="saveforgetsend"){ if ($_POST['fpassword']==$_POST['fpassword2'] AND strtolower($_POST['fautorizecode_pic'])==strtolower($_SESSION['autorizecode']) AND $_POST['idx']){ $id_unique = md5(uniqid(rand())); $hash = crypt($_POST['fpassword'], substr($_POST['fpassword'], 0, 2)); $sql="UPDATE ".$GO_CONFIG->dbprefix."users SET passwd='$hash', id_unique='$id_unique' WHERE id_unique='".addslashes($_POST['idx'])."' AND id='".addslashes($_POST['idy'])."' AND email='".addslashes($_POST['email'])."' AND active='1' limit 1"; $db->sql_query($sql); $comm_url=makeurl("action=login&dz=$dz&mod=".getpost(mod)."&user=".$_POST['email']."","mod.php"); redirect($comm_url); }else{ echo error(_FIILCORECTFIELD); $sql = "SELECT * FROM ".$GO_CONFIG->dbprefix."users where id_unique='".addslashes(getpost(idx))."' AND id='".addslashes(getpost(idy))."' AND email='".addslashes(getpost(email))."' AND active ='1' limit 1"; $result = $db->sql_query($sql); if ($db->sql_numrows($result)>0){ $arow=$db->sql_fetchrow($result); define("_can_CHANGE","1"); define("_can_CHANGE_idx",$arow['id_unique']); define("_can_CHANGE_email",$arow['email']); define("_can_CHANGE_uid",$arow['id']); }else{ redirect("index.php"); exit; } } }else if (getpost(op)=="forgetsend"){ $sql = "SELECT * FROM ".$GO_CONFIG->dbprefix."users where id_unique='".addslashes(getpost(idx))."' AND id='".addslashes(getpost(idy))."' AND email='".addslashes(getpost(email))."' AND active ='1' limit 1"; $result = $db->sql_query($sql); if ($db->sql_numrows($result)>0){ $arow=$db->sql_fetchrow($result); define("_can_CHANGE","1"); define("_can_CHANGE_idx",$arow['id_unique']); define("_can_CHANGE_email",$arow['email']); define("_can_CHANGE_uid",$arow['id']); }else{ redirect("index.php"); exit; } }else if ($_POST['op']=="forget"){ if (!$_POST['fuser'] OR strtolower($_POST['fautorizecode_pic'])<>strtolower($_SESSION['autorizecode'])){ echo error(_FIILCORECTFIELD); }else{ $sql = "SELECT * FROM ".$GO_CONFIG->dbprefix."users where (user like '".addslashes($_POST['fuser'])."') OR (email='".addslashes($_POST['fuser'])."') AND active ='1' limit 1"; //echo $sql; $result = $db->sql_query($sql); if ($db->sql_numrows($result)>0){ $arow=$db->sql_fetchrow($result); $id_unique = md5(uniqid(rand())); if ($arow['email']==$_POST['fuser']) $sql="UPDATE ".$GO_CONFIG->dbprefix."users SET id_unique='".$id_unique."' WHERE email='".$arow['email']."' limit 1"; else $sql="UPDATE ".$GO_CONFIG->dbprefix."users SET id_unique='".$id_unique."' WHERE user='".$arow['user']."' limit 1"; $db->sql_query($sql); $body_url=makeurl("op=forgetsend&action=forget&email=".$arow['email']."&idx=$id_unique&idy=$arow[id]","mod.php"); $body = _EMAILFORGET1; $body .= " " ."$body_url" ." " ."

" ."
"; $to = $arow['email']; $subject = $GO_CONFIG->mailtitle; // $makecodeok=sendmailer($to,$subject,$body,1,$GO_CONFIG->mailcodepage); $sender_ather=$_SERVER['SERVER_NAME']." <".$GO_CONFIG->mailemail.">"; $makecodeok=sendmailer($to,$subject,$body,1,$GO_CONFIG->mailcodepage,'',$sender_ather); if ($makecodeok){ $comm="

"._FORGETOK; $comm .="
"; $comm_url=makeurl("dz=$dz&mod=$mod","mod.php"); $comm .=" >>"._KLIKBACK."<< "; $comm .="
"; $comm_url=makeurl(); $comm .=" >>"._KLIKMAINPAGE."<< "; echo frame_small($comm,"","#55ff00","#DDFFDD","100%"); }else{ echo error(); } }else{ echo error(_FIILCORECTFIELD); } // echo ok("send..."); }//if authcode ok } if ((!$makecodeok AND $_POST['op']=="forget") OR $_POST['op']<>"forget") { if (getpost('off_left')=="off") $GO_CONFIG->{"dz_sek1_1"}=0; if (getpost('off_center')=="off") $GO_CONFIG->{"dz_sek1_2"}=0; if (getpost('off_right')=="off") $GO_CONFIG->{"dz_sek1_3"}=0; $GWPE->SEKCJA(1,$dz,$mod_param,"form/forget.php",'',1); } if ($GO_CONFIG->external_tpl){ $external_tpl_caction = ob_get_contents(); // store buffer in $contents ob_end_clean(); // delete output buffer and stop buffering } //-----------------------------------------------------------------------------------------------------forget end //-----------------------------------------------------------------------------------------------------start rejestracja } else if ($_GET['action']=="activate"){ if ($GO_CONFIG->external_tpl){ ob_start(); } if (!$_GET['uid']){ echo error(_ACTIVATEERROR); }else{ $sql = "SELECT * FROM ".$GO_CONFIG->dbprefix."users where id_unique = '".addslashes($_GET['uid'])."' AND active='-1' limit 1"; $result = $db->sql_query($sql); if ($db->sql_numrows($result)>0){ $arow=$db->sql_fetchrow($result); $id_unique = md5(uniqid(rand())); $fromuserip=get_clientip(); //---user $sql="UPDATE ".$GO_CONFIG->dbprefix."users SET active='1', id_unique='$id_unique', CONFIRM_IP='".addslashes($fromuserip)."' , CONFORM_DATA=NOW() WHERE id='".$arow['id']."' limit 1"; $db->sql_query($sql); //----group add $sql="INSERT INTO ".$GO_CONFIG->dbprefix."users_group (id_user,id_group) VALUES ('".$arow['id']."','1')"; $db->sql_query($sql); $comm =_ACTIVATEOK; $comm .="
"; $comm_url=makeurl("action=login&dz=$dz&mod=$mod&user=$arow[user]","mod.php"); $comm .=" >>"._KLIKLOGIN."<< "; echo frame_small($comm,"","#55ff00","#DDFFDD","100%"); }else{ echo error(_ACTIVATEERROR); } } if ($GO_CONFIG->external_tpl){ $external_tpl_caction = ob_get_contents(); // store buffer in $contents ob_end_clean(); // delete output buffer and stop buffering } } else if (getpost(action)=="register"){ if ($GO_CONFIG->external_tpl){ ob_start(); } if ($_POST['op']=="register"){ // if ($_POST['fuser'] && $_POST['pass'] && $_POST['pass2'] && $_POST['email'] && $_POST['woje'] && $_POST['eaged'] && $_POST['eagem'] && $_POST['eagey']){ if ($_POST['fuser'] && $_POST['pass'] && $_POST['pass2'] && $_POST['email'] && $_POST['woje']){ $_POST['fuser']=clear_username($_POST['fuser']); $fuser=$_POST['fuser']; $sql = "SELECT * FROM ".$GO_CONFIG->dbprefix."users where user like '".addslashes($_POST['fuser'])."' limit 1"; $result = $db->sql_query($sql); $authuser = $db->sql_numrows($result); $sql = "SELECT * FROM ".$GO_CONFIG->dbprefix."users where email='".addslashes($_POST['email'])."' limit 1"; $result = $db->sql_query($sql); $authemail = $db->sql_numrows($result); $comm=""; if ($authuser OR $authemail OR ($_POST['pass']<>$_POST['pass2']) OR (strtolower($_POST['fautorizecode_pic'])<>strtolower($_SESSION['autorizecode']) OR !$_POST['fautorizecode_pic']) ){//if error start if ($authuser){ $comm .= "
"; $comm .= ""._USER.": $fuser "._ALREADYEXIST."
"; //----podpowiadam wolnego $mqaxppodpowiedzi=3; for ($i = 0; $i < 1000; $i++){ $sql = "SELECT * FROM users where user like '$fuser$i' limit 1"; $result = $db->sql_query($sql); $authuser = $db->sql_numrows($result); if (!$authuser){ $sql = "SELECT * FROM users_waiting where user like '$fuser$i' limit 1"; $result = $db->sql_query($sql); $authuser = $db->sql_numrows($result); if (!$authuser){ $comm .="
"._FREEUSERNAME.":$fuser$i"; $mqaxppodpowiedzi--; } } if ($mqaxppodpowiedzi<1) break; }//for //----------- $us=0; }//if authuser if ($authemail){ $comm .="
"; $comm .="E-mail: ".$_POST['email']." "._ALREADYEXISTINSYSTEM." "; if ($GO_CONFIG->can_forget){ $comm .=_TRAYPASREM." "; $comm .=""; $comm .=_FORGETPASS; $comm .=""; } $comm .="!"; // $comm .=_MAILEXIST; $em=0; } if ($_POST['pass']<>$_POST['pass2']){ $comm .="
"; $comm .=_ERRORPASSWD; $pas=0; } if (strtolower($_POST['fautorizecode_pic'])<>strtolower($_SESSION['autorizecode']) OR !$_POST['fautorizecode_pic']){ $comm .="
"; $comm .=_ERRORAUTHCODE; } // echo frame($comm,"","block","#eeeeee","770px",1,2); echo frame_small($comm,"","#ff5555","#FFDDDD","100%"); }else{//enf if error end $id_unique = md5(uniqid(rand())); $fromuserip=get_clientip(); $hash = crypt($_POST['pass'], substr($_POST['pass'], 0, 2)); //----------users if ($_POST['eaged'] && $_POST['eagem'] && $_POST['eagey']){ $eage=date2timestamp($_POST['eaged']."-".$_POST['eagem']."-".$_POST['eagey']); } //MAIL_SEND , MAIL_SEND_DATA , MAIL_ERROR , CONFIRM_IP CONFORM_DATA CONFIRM_TOKEN $sql="INSERT INTO ".$GO_CONFIG->dbprefix."users ( id, user, passwd, email, imie, nazwisko , user_language, id_group, user_avantar, loginfail, active , last_login, id_unique, eage, MAIL_SEND , MAIL_SEND_DATA , CONFIRM_IP ) VALUES ( '','".addslashes($_POST['fuser'])."','".addslashes($hash)."','".addslashes($_POST['email'])."', '','','', '1', '','0', '-1','DATE()','".$id_unique."', '".addslashes($eage)."', '1',NOW(),'".addslashes($fromuserip)."' )"; //echo $sql; $result = $db->sql_query($sql); $id_new_user=$db->sql_nextid(); if ($id_new_user>0 AND !$db->sql_affectedrows()){ $id_new_user=0; } if ($id_new_user>0){ //---------grupa // $sql="INSERT INTO ".$GO_CONFIG->dbprefix."users_group (id_user,id_group) VALUES ('$id_new_user','1')"; // $result = $db->sql_query($sql); //--------send email $to = $_POST['email']; if ($to){ $body_url=makeurl("action=activate&uid=$id_unique","mod.php"); $body = _EMAILREGISTER1.": ".$_SERVER['SERVER_NAME']."."; $body .= "

"; $body .= _EMAILREGISTER2."
\n"; $body .=""._ACTIVATEACCOUNT." - "._USER.": ".$_POST['fuser']." \n
"; $body .="
"; $body .= _ORTYPEANDPASTE." \n
$body_url \n
\n
"; $body .="

"; $body .=_THENKSFORREGISTER; $subject = $GO_CONFIG->mailtitle; //print_r($_SESSION); //echo $GO_CONFIG->mailemail; // $makecodeok=sendmailer($to,$subject,$body,1,$GO_CONFIG->mailcodepage); $sender_ather=$_SERVER['SERVER_NAME']." <".$GO_CONFIG->mailemail.">"; $makecodeok=sendmailer($to,$subject,$body,1,$GO_CONFIG->mailcodepage,'',$sender_ather); if ($makecodeok){ $comm="

"._REGISTEROK; $comm .="
"; $comm_url=makeurl("dz=$dz&mod=$mod","mod.php"); $comm .=" >>"._KLIKBACK."<< "; $comm .="
"; $comm_url=makeurl(); $comm .=" >>"._KLIKMAINPAGE."<< "; echo ok($comm); } }else echo error(_NOSENDMAIL); }else{ echo error(_NOTADDEDUSERTRYAGAN); } }//end save waiting user }else{ echo error(_NONEEDFORM); } }//if post op==register if ((!$makecodeok AND $_POST['op']=="register") OR $_POST['op']<>"register") { if (getpost('off_left')=="off") $GO_CONFIG->{"dz_sek1_1"}=0; if (getpost('off_center')=="off") $GO_CONFIG->{"dz_sek1_2"}=0; if (getpost('off_right')=="off") $GO_CONFIG->{"dz_sek1_3"}=0; $GWPE->SEKCJA(1,$dz,$mod_param,"form/register.php",'',1); } if ($GO_CONFIG->external_tpl){ $external_tpl_caction = ob_get_contents(); // store buffer in $contents ob_end_clean(); // delete output buffer and stop buffering } //-----------------------------------------------------------------------------------------------------end rejestracja //================================================================================================================== //-----------------------------------EDYTOR start //================================================================================================================== }else if (getpost("action")=="edit" AND ((getpost("pid")==0 AND !$_POST['savepid']) OR (getpost("pid")<>"" OR $_POST['savepid']<>"")) ){ if ($GO_CONFIG->external_tpl){ ob_start(); } //-------------------save page start if ((!$_POST[f_id_dzial] OR is_admindzial($_POST[f_id_dzial]))){ if ($_POST['wh']=="top") $specialpg="t"; else if ($_POST['wh']=="mtop") $specialpg="m"; else if ($_POST['wh']=="bottom") $specialpg="b"; else if ($_POST['f_special']=="banner1") $specialpg="banner1"; else if ($_POST['f_special']=="banner2") $specialpg="banner2"; else if ($_POST['f_special']=="banner3") $specialpg="banner3"; else if ($_POST['f_special']=="banner4") $specialpg="banner4"; else if ($_POST['f_special']=="banner5") $specialpg="banner5"; else if ($_POST['f_special']=="banner6") $specialpg="banner6"; else $specialpg=0; //print_r($_POST); //echo $specialpg;exit; $addimg=""; //---del image if ($_POST['delbg_image']==1) $addimg .= ", bg_image='' "; else if ($_POST['f_bg_image']) $addimg .= ", bg_image='".addslashes($_POST['f_bg_image'])."' "; if ($_POST['delbg_image_tit']==1) $addimg .= ", bg_image_tit='' "; else if ($_POST['f_bg_image_tit']) $addimg .= ", bg_image_tit='".addslashes($_POST['f_bg_image_tit'])."' "; //---end del image //---del image title front and past if ($_POST['deltit_img_front']==1) $addimg .= ", img_front='' "; else if ($_POST['f_img_front']) $addimg .= ", img_front='".addslashes($_POST['f_img_front'])."' "; if ($_POST['deltit_img_past']==1) $addimg .= ", img_past='' "; else if ($_POST['f_img_past']) $addimg .= ", img_past='".addslashes($_POST['f_img_past'])."' "; //---end del image title front and past if (!$_POST['f_off_left']) $onoffleft=1; else $onoffleft=0; if (!$_POST['f_off_center']) $onoffcenter=1; else $onoffcenter=0; if (!$_POST['f_off_right']) $onoffright=1; else $onoffright=0; if ($_POST['f_target_column']==1) $onoffleft=0; else if ($_POST['f_target_column']==2) $onoffcenter=0; else if ($_POST['f_target_column']==3) $onoffright=0; // list($cector,$column)=split(";",$_POST[f_id_sector]); if ($_POST['f_on_name']==1) $onoffitlepage=1; else $onoffitlepage=0; if ($_POST['f_is_printed']==1) $isprontable=1; else $isprontable=0; if ($_POST['f_is_addto']==1) $is_addto=1; else $is_addto=0; if ($_POST['f_is_printedpdf']==1) $isprontablepdf=1; else $isprontablepdf=0; if ($_POST['f_is_printedemail']==1) $isprontableemail=1; else $isprontableemail=0; if (!$_POST['f_mod_name']) $_POST['f_mod_active']=0; // $setlanguage=addslashes($_POST[setlanguage]); if ($_POST['f_isphp']==1) $fisphp=1; else $fisphp=0; //parametry modulu - nadpisuje if ($_POST['f_mod_name']){ $acceptparam=array(0); $newmodparam=""; include("modules/".addslashes($_POST['f_mod_name'])."/admin/paramsave.php"); //print_r($_POST); if (count($acceptparam)>0){ for($i=0;$i"" AND $_POST['wh']=="pg"){ if (getpost(action)=="edit" AND $_POST['savepid']<>"" ){ if ($_POST['savepid']>0 AND !$_POST['f_saveas']){ //zakladam nowe sytrony przy zapisie if ($_POST['f_content']){ $_POST['f_content']=mnp_forep($_POST['f_content'],$_POST['savepid'],$_POST['dz']); } //----jesli updare i wylaczam TPLa to zapisuje -1 if (!$_POST['f_mod_tpl']) $id_tpl="-1"; else $id_tpl=$_POST['f_mod_tpl']; //echo "sdfsdF";exit; $sql="UPDATE ".$GO_CONFIG->dbprefix."pages SET id_language='".addslashes($_POST['f_id_language'])."', id_dzial='".addslashes($_POST['f_id_dzial'])."', id_sekcja='".addslashes($_POST['f_id_sekcja'])."', id_column='".addslashes($_POST['f_id_column'])."', target_sector='".addslashes($_POST['f_target_sector'])."', target_column='".addslashes($_POST['f_target_column'])."', off_left='$onoffleft', off_center='$onoffcenter', off_right='$onoffright', type_page='".addslashes($_POST['f_type_page'])."', to_date='".addslashes($_POST['f_to_date'])."', todo_page='".addslashes($_POST['f_todo_page'])."', for_who='".addslashes($_POST['f_for_who'])."', mod_name='".addslashes($_POST['f_mod_name'])."', mod_active='".addslashes($_POST['f_mod_active'])."', mod_param='".addslashes($_POST['f_mod_param'])."', active='".addslashes($_POST['f_active'])."', id_owner='".addslashes(conf(id_user))."', gid_owner='".addslashes($_POST['f_gid_owner'])."', name='".addslashes($_POST['f_name'])."', id_tpl='".addslashes($id_tpl)."', on_name='".$onoffitlepage."', is_printed='".$isprontable."', is_addto='".$is_addto."', is_printedpdf='".$isprontablepdf."', is_printedemail='".$isprontableemail."', content='". corect_to_save($_POST['f_content'],$fisphp)."', bg_color='".addslashes($_POST['f_bg_color'])."', bg_repeatalign='".addslashes($_POST['f_bg_repeatalign'])."', bg_repeat='".addslashes($_POST['f_bg_repeat'])."', bg_watermark='".addslashes($_POST['f_bg_watermark'])."', txt_color_tit='".addslashes($_POST['f_txt_color_tit'])."', bg_color_tit='".addslashes($_POST['f_bg_color_tit'])."', bg_repeatalign_tit='".addslashes($_POST['f_bg_repeatalign_tit'])."', bg_repeat_tit='".addslashes($_POST['f_bg_repeat_tit'])."', bg_watermark_tit='".addslashes($_POST['f_bg_watermark_tit'])."', txt_bold_tit='".addslashes($_POST['f_txt_bold_tit'])."', txt_italic_tit='".addslashes($_POST['f_txt_italic_tit'])."', txt_under_tit='".addslashes($_POST['f_txt_under_tit'])."', nameheight='".addslashes($_POST['f_nameheight'])."', pagemargin='".addslashes($_POST['f_pagemargin'])."', namehali='".addslashes($_POST['f_namehali'])."', nameverli='".addslashes($_POST['f_nameverli'])."', is_specialpg='".$specialpg."', lastmodyfi = NOW(), isphp='".$fisphp."', align_content='".addslashes($_POST['f_align_content'])."', tags='".addslashes($_POST['tags_page'])."' $addimg WHERE id='".addslashes($_POST['savepid'])."' limit 1"; //echo $sql;exit; $db->sql_query($sql); //-----------------page tree start if ($specialpg=="0"){ if (!$_POST['f_to_page']) $_POST['f_to_page']=0; $sql="UPDATE ".$GO_CONFIG->dbprefix."pages_tree SET tto_page='".addslashes($_POST['f_to_page'])."' WHERE tid_page='".addslashes($_POST['savepid'])."' limit 1"; $db->sql_query($sql); if (!$db->sql_affectedrows()){ $sql="INSERT INTO ".$GO_CONFIG->dbprefix."pages_tree ( tid_page,tto_page,tid_dz )VALUES( '".addslashes($_POST['savepid'])."','".addslashes($_POST['f_to_page'])."','".addslashes($_POST['f_id_dzial'])."' )"; $db->sql_query($sql); } } //-----------------page tree end //------------top external tpl exchange start //Array ( [name] => Hydrangeas.jpg [type] => image/jpeg [tmp_name] => /tmp/phpwqfUwd [error] => 0 [size] => 595284 ) //print_r($_FILES['headerex']);exit; // move_uploaded_file if ($GO_CONFIG->external_tpl AND $_FILES['headerex']['size']>0 AND $_FILES['headerex']['error']==0){ list($ttype,$tname)=split(",",$GO_CONFIG->external_tpl); /* if ($ttype=="DRUPAL") $tpath="theme_EXT/T_Drupal/"; else if ($ttype=="JOOMLA") $tpath="theme_EXT/T_Joomla/"; else if ($ttype=="MAMBO") $tpath="theme_EXT/T_Mambo/"; else if ($ttype=="WPRESS") $tpath="theme_EXT/T_Wpress/"; else if ($ttype=="HTML") $tpath="theme_EXT/T_Html/"; else $tpath=""; */ $tpath=external_template_path($ttype); if ($ttype AND $tname AND $tpath AND is_dir($tpath.$tname)){ if (is_file($tpath.$tname."/images/Header.jpg")) { copy($_FILES['headerex']['tmp_name'],$tpath.$tname."/images/Header.jpg"); }else if (is_file($tpath.$tname."/Header.jpg")){ copy($_FILES['headerex']['tmp_name'],$tpath.$tname."/Header.jpg"); }else if (is_file($tpath.$tname."/images/header.jpg")) { copy($_FILES['headerex']['tmp_name'],$tpath.$tname."/images/header.jpg"); }else if (is_file($tpath.$tname."/header.jpg")){ copy($_FILES['headerex']['tmp_name'],$tpath.$tname."/header.jpg"); } } } //------------top external tpl exchange end if ($_POST['ret']) redirect($_POST['ret']); else if ($_POST['retp']) redirect(str_decode($_POST['retp'])); else redirect("mod.php?dz=".$_POST['dz']."&pg=".$_POST['pg']."&ss=".$_POST['ss']); exit; }else if ($_POST['savepid']==0 OR ($_POST['savepid']>0 AND $_POST['f_saveas']==1)){ //print_r($_POST); //echo "==".$_POST[f_id_sekcja];exit; if ((!$_POST['f_id_dzial'] OR ($_POST['f_id_dzial'] AND $_POST['f_id_sekcja'] AND $_POST['f_id_column'])) OR ($_POST['f_id_dzial'] AND $_POST['f_special']) OR ($_POST['wh']=="top") OR ($_POST['wh']=="mtop") OR ($_POST['wh']=="bottom") ){ $sql="INSERT INTO ".$GO_CONFIG->dbprefix."pages ( id_language, id_dzial, id_sekcja, id_column, target_sector, target_column, off_left, off_center, off_right, type_page, to_date, todo_page, for_who, mod_name, mod_active, mod_param, active, id_owner, gid_owner, name, id_tpl, img_front, img_past, on_name, is_printed, is_addto, is_printedpdf, is_printedemail, content, bg_color, bg_repeatalign, bg_repeat, bg_watermark, txt_color_tit, bg_color_tit, bg_repeatalign_tit, bg_repeat_tit, bg_watermark_tit, txt_bold_tit, txt_italic_tit, txt_under_tit, bg_image, is_specialpg, isphp, nameheight, pagemargin, namehali, nameverli, kolejnosc, lastmodyfi, align_content, tags )VALUES( '".addslashes($_POST['f_id_language'])."', '".addslashes($_POST['f_id_dzial'])."', '".addslashes($_POST['f_id_sekcja'])."', '".addslashes($_POST['f_id_column'])."', '".addslashes($_POST['f_target_sector'])."', '".addslashes($_POST['f_target_column'])."', '$onoffleft', '$onoffcenter', '$onoffright', '".addslashes($_POST['f_type_page'])."', '".addslashes($_POST['f_to_date'])."', '".addslashes($_POST['f_todo_page'])."', '".addslashes($_POST['f_for_who'])."', '".addslashes($_POST['f_mod_name'])."', '".addslashes($_POST['f_mod_active'])."', '".addslashes($_POST['f_mod_param'])."', '".addslashes($_POST['f_active'])."', '".addslashes(conf(id_user))."', '".addslashes($_POST['f_gid_owner'])."', '".addslashes($_POST['f_name'])."', '".addslashes($_POST['f_mod_tpl'])."', '".addslashes($_POST['f_img_front'])."', '".addslashes($_POST['f_img_past'])."', '$onoffitlepage', '$isprontable', '$is_addto', '$isprontablepdf', '$isprontableemail', '". corect_to_save($_POST['f_content'])."', '".addslashes($_POST['f_bg_color'])."', '".addslashes($_POST['f_bg_repeatalign'])."', '".addslashes($_POST['f_bg_repeat'])."', '".addslashes($_POST['f_bg_watermark'])."', '".addslashes($_POST['f_txt_color_tit'])."', '".addslashes($_POST['f_bg_color_tit'])."', '".addslashes($_POST['f_bg_repeatalign_tit'])."', '".addslashes($_POST['f_bg_repeat_tit'])."', '".addslashes($_POST['f_bg_watermark_tit'])."', '".addslashes($_POST['f_txt_bold_tit'])."', '".addslashes($_POST['f_txt_italic_tit'])."', '".addslashes($_POST['f_txt_under_tit'])."', '".addslashes($_POST['f_bg_image'])."', '".$specialpg."', '".$fisphp."', '".addslashes($_POST['f_nameheight'])."', '".addslashes($_POST['f_pagemargin'])."', '".addslashes($_POST['f_namehali'])."', '".addslashes($_POST['f_nameverli'])."', '0', NOW( ), '".addslashes($_POST['f_align_content'])."', '".addslashes($_POST['tags_page'])."' )"; $db->sql_query($sql); //echo $sql;exit; //---------------------------update in dizal $newid = $db->sql_nextid(); if ($newid>0 AND $_POST['dz']>0){ //zakladam nowe sytrony przy zapisie if ($_POST['f_content']){ $_POST['f_content']=mnp_forep($_POST['f_content'],$newid,$_POST['dz']); $sql="UPDATE ".$GO_CONFIG->dbprefix."pages SET content='".corect_to_save($_POST['f_content'])."' WHERE id='".addslashes($newid)."' limit 1"; $db->sql_query($sql); } //-----------------page tree start /* if ($_POST['savepid']>0 AND $_POST['f_saveas']==1){ $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."pages_tree WHERE tid_page='".addslashes($_POST['savepid'])."' LIMIT 1"; $result=$db->sql_query($sql); $row=$db->sql_fetchrow($result); $sql="INSERT INTO ".$GO_CONFIG->dbprefix."pages_tree ( tid_page,tto_page,tid_dz )VALUES( '".addslashes()."','".addslashes($_POST['f_to_page'])."','".addslashes($_POST['f_id_dzial'])."' )"; $db->sql_query($sql); }else{ */ if ($specialpg=="0"){ if (!$_POST['f_to_page']) $_POST['f_to_page']=0; $sql="INSERT INTO ".$GO_CONFIG->dbprefix."pages_tree ( tid_page,tto_page,tid_dz )VALUES( '".addslashes($newid)."','".addslashes($_POST['f_to_page'])."','".addslashes($_POST['f_id_dzial'])."' )"; $db->sql_query($sql); } // } //-----------------page tree end //----sortuje strony strta // $tmp_kol=$_GET["kid"]+1; $sql = "SELECT id,kolejnosc FROM ".$GO_CONFIG->dbprefix."pages WHERE id_dzial='".addslashes($_POST['f_id_dzial'])."' AND id_column='".addslashes($_POST['f_id_column'])."' AND id_sekcja='".addslashes($_POST['f_id_sekcja'])."' ORDER BY kolejnosc"; $result = $db->sql_query($sql); $q=0; while($row=$db->sql_fetchrow($result)){ $sql="UPDATE ".$GO_CONFIG->dbprefix."pages SET kolejnosc='".$q."' WHERE id='".$row['id']."' limit 1 "; $db->sql_query($sql); $q++; } //----sortuje strony end if ($_POST['wh']=="top"){ $sql="UPDATE ".$GO_CONFIG->dbprefix."dzialy SET dz_top_idpage='".$newid."' WHERE id_dzial='".addslashes($_POST['dz'])."' limit 1"; $db->sql_query($sql); }else if ($_POST['wh']=="mtop"){ $sql="UPDATE ".$GO_CONFIG->dbprefix."dzialy SET dz_mtop_idpage='".$newid."' WHERE id_dzial='".addslashes($_POST['dz'])."' limit 1"; $db->sql_query($sql); }else if ($_POST['wh']=="bottom"){ $sql="UPDATE ".$GO_CONFIG->dbprefix."dzialy SET dz_bottom_idpage ='".$newid."' WHERE id_dzial='".addslashes($_POST['dz'])."' limit 1"; $db->sql_query($sql); } //else if ($_POST[f_id_dzial]) echo error(_ERROR."006"); echo alert(_ADDOKNEWPAGE."\\n"._NEWPAGEID.": \\n>>>ID: ".$newid."\\n>>>LINK: !pg!".$newid); //echo okpop("afadsf"); if ($_POST['ret']) $url=$_POST['ret']; else if ($_POST['retp']) $url=str_decode($_POST['retp']); else $url="mod.php?dz=".$_POST['dz']."&pg=".$_POST['pg']."&ss=".$_POST['ss']; if ($url){ // echo ok("
"._NEWPAGEIDIS.":

ID=".$newid."


",""._NEWPAGEID.""); echo ok("

ID=".$newid."


"._CLICKTOCONTINUE." ".img("ico/forward.png",_CLICKTOCONTINUE,16,16)."

",""._NEWPAGEID.""); exit; } //echo $sql;exit; }else{ echo error(_ERROR."005"); } //exit; //--------------------------end upadte dial //EDYCJA redirect("mod.php?dz=".$_POST['dz']."&pg=".$_POST['pg']."&action=edit&pid=".$newid."&ss=".$_POST['ss']); // echo alert(_ADDOKNEWPAGE."\\n"._NEWPAGEID.": \\n>>>ID: ".$newid."\\n>>>!pg!".$newid); if ($_POST['ret']) redirect($_POST['ret']); else if ($_POST['retp']) redirect(str_decode($_POST['retp'])); else redirect("mod.php?dz=".$_POST['dz']."&pg=".$_POST['pg']."&ss=".$_POST['ss']); }else{ echo error(_ERROR."001"); } exit; }//if (getpost(action)=="edit" AND $_POST[savepid]<>"" ){ }//is is_adminszial //-------------------save page end //((getpost("pid")==0 AND !$_POST[savepid]) OR (getpost("pid")<>"" OR $_POST[savepid]<>"") ) // }else if (getpost(action)=="edit" AND $_POST[savepid]<>"" AND ($_POST['wh']=="top" OR $_POST['wh']=="bottom")){ } //else if (getpost(action)=="edit" AND ((getpost("pid")==0 AND !$_POST[savepid]) OR (getpost("pid")<>"" OR $_POST[savepid]<>"")) AND ($_POST['wh']=="top" OR $_POST['wh']=="bottom")){ //-------------------save top & bottom start // } //-------------------save top & bottom end if (!$_POST['savepid']){ if (getpost("wh")=="pg" AND getpost("pid")>0){ $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."pages pg LEFT JOIN ".$GO_CONFIG->dbprefix."pages_tree pgt ON pgt.tid_page=pg.id WHERE pg.id='".addslashes(getpost("pid"))."' limit 1"; $result = $db->sql_query($sql); $rowpage=$db->sql_fetchrow($result); }else if (getpost("wh")=="mtop" AND $GO_CONFIG->dz_mtop_idpage>0){ $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."pages WHERE id='".$GO_CONFIG->dz_mtop_idpage."' limit 1"; $result = $db->sql_query($sql); $rowpage=$db->sql_fetchrow($result); }else if (getpost("wh")=="top" AND $GO_CONFIG->dz_top_idpage>0){ $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."pages WHERE id='".$GO_CONFIG->dz_top_idpage."' limit 1"; $result = $db->sql_query($sql); $rowpage=$db->sql_fetchrow($result); }else if (getpost("wh")=="bottom" AND $GO_CONFIG->dz_bottom_idpage>0){ $sql="SELECT * FROM ".$GO_CONFIG->dbprefix."pages WHERE id='".$GO_CONFIG->dz_bottom_idpage."' limit 1"; $result = $db->sql_query($sql); $rowpage=$db->sql_fetchrow($result); } // if (is_admindzial($rowpage[id_dzial],1)){ if (($rowpage['id_dzial']>0 AND is_admindzial($rowpage['id_dzial'],1)) OR (!$rowpage['id_dzial'] AND is_admindzial($dz,1)) ){ // echo "
"; // echo "
"; if (getpost('action')=="edit"){ // echo "
"; echo ""; }else{ echo ""; } // echo "
"; echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "get_sesid()."\">"; echo ""; // echo ""; echo ""; // echo "id_page."\">"; echo ""; echo ""; //print_r($GO_CONFIG); echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"; echo " "; if ($rowpage['id']) echo "ID:".$rowpage['id']; else echo "ID: ["._NEWPAGE."]"; if (getpost("wh")=="pg"){ echo ",  "; echo ""._TITLE.": "; //---- echo "  "; if ($rowpage['on_name']=="0"){ echo ""; }else{ echo ""; } echo " "; echo ""._SHOWTITLEPAGE.","; //----add to echo " "; // if ($rowpage['is_addto']=="1" OR $rowpage['is_addto']!=0 ){ if ($rowpage['is_addto']=="1" ){ echo ""; }else{ echo ""; } echo " "; echo ""._SHOWADDTO.","; //----print echo " "; if ($rowpage['is_printed']=="1"){ echo ""; }else{ echo ""; } echo " "; echo ""._ISPRINTEDPAGE.","; //----pdf echo " "; if ($rowpage['is_printedpdf']=="1"){ echo ""; }else{ echo ""; } echo " "; echo ""._ISPDFPAGE.","; //----email echo " "; if ($rowpage['is_printedemail']=="1"){ echo ""; }else{ echo ""; } echo " "; echo ""._ISEMAILPAGE.""; /* echo " | "; echo ""._ALIGN.":"; if (!$rowpage['align_content'] OR $rowpage['align_content']=="l") $radio=" checked "; else $radio=""; echo ""; echo img("ico/tb_left.gif",_LEFT,16,16); if ($rowpage['align_content']=="c") $radio=" checked "; else $radio=""; echo ""; echo img("ico/tb_center.gif",_CENTER,16,16); if ($rowpage['align_content']=="r") $radio=" checked "; else $radio=""; echo ""; echo img("ico/tb_right.gif",_RIGHT,16,16); */ //---- }else if (getpost("wh")=="top"){ echo ",  "; echo "DZ:$dz / TOP"; echo " |  "; echo ""._ALIGN.":"; if (!$rowpage['align_content'] OR $rowpage['align_content']=="l") $radio=" checked "; else $radio=""; echo ""; echo img("ico/tb_left.gif",_LEFT,16,16); if ($rowpage['align_content']=="c") $radio=" checked "; else $radio=""; echo ""; echo img("ico/tb_center.gif",_CENTER,16,16); if ($rowpage['align_content']=="r") $radio=" checked "; else $radio=""; echo ""; echo img("ico/tb_right.gif",_RIGHT,16,16); //------------top external tpl exchange start if ($GO_CONFIG->external_tpl){ list($ttype,$tname)=split(",",$GO_CONFIG->external_tpl); /* if ($ttype=="DRUPAL") $tpath="theme_EXT/T_Drupal/"; else if ($ttype=="JOOMLA") $tpath="theme_EXT/T_Joomla/"; else if ($ttype=="MAMBO") $tpath="theme_EXT/T_Mambo/"; else if ($ttype=="WPRESS") $tpath="theme_EXT/T_Wpress/"; else if ($ttype=="HTML") $tpath="theme_EXT/T_Html/"; else $tpath=""; */ $tpath=external_template_path($ttype); //echo $tpath.$tname."/images/Header.jpg"; if ($ttype AND $tname AND $tpath AND is_dir($tpath.$tname) AND (is_file($tpath.$tname."/images/Header.jpg") OR is_file($tpath.$tname."/Header.jpg"))){ echo " |  "; echo ""._CHANGEHEADER.":"; // echo $GO_CONFIG->external_tpl; echo ""; }else if ($ttype AND $tname AND $tpath AND is_dir($tpath.$tname) AND (is_file($tpath.$tname."/images/header.jpg") OR is_file($tpath.$tname."/header.jpg"))){ echo " |  "; echo ""._CHANGEHEADER.":"; // echo $GO_CONFIG->external_tpl; echo ""; } } //------------top external tpl exchange end }else if (getpost("wh")=="mtop"){ echo ",  "; echo "DZ:$dz / MENU TOP"; /* echo ",  "; echo ""._ALIGN.":"; if (!$rowpage['align_content'] OR $rowpage['align_content']=="l") $radio=" checked "; else $radio=""; echo ""; echo img("ico/tb_left.gif",_LEFT,16,16); if ($rowpage['align_content']=="c") $radio=" checked "; else $radio=""; echo ""; echo img("ico/tb_center.gif",_CENTER,16,16); if ($rowpage['align_content']=="r") $radio=" checked "; else $radio=""; echo ""; echo img("ico/tb_right.gif",_RIGHT,16,16); */ }else if (getpost("wh")=="bottom"){ echo ",  "; echo "DZ:$dz / BOTTOM"; echo ",  "; echo ""._ALIGN.":"; if (!$rowpage['align_content'] OR $rowpage['align_content']=="l") $radio=" checked "; else $radio=""; echo ""; echo img("ico/tb_left.gif",_LEFT,16,16); if ($rowpage['align_content']=="c") $radio=" checked "; else $radio=""; echo ""; echo img("ico/tb_center.gif",_CENTER,16,16); if ($rowpage['align_content']=="r") $radio=" checked "; else $radio=""; echo ""; echo img("ico/tb_right.gif",_RIGHT,16,16); } //php inline start if ($GO_CONFIG->gwpetype==1){ echo " "; if (!$rowpage['isphp']){ echo ""; }else{ echo ""; } echo " "; echo ""._PHPINLINES.""; }else{ echo ""; } //php inline end // if ($_POST['wh']=="top") $specialpg="t"; // else if ($_POST['wh']=="mtop") $specialpg="m"; // else if ($_POST['wh']=="bottom") $specialpg="b"; // else $specialpg=0; if ($GO_CONFIG->validator==1){ //----------------------------------------validator make start if (substr(phpversion(),0,1)>4){ include_once ('classes/gwpe.validator.inc'); $v = new validator(stripslashes($rowpage['content'])); $validator=""; echo " | "; try { $v->load(); $validator = ""; $validator .= "
"._VALIDATORTXT."..."._VALIOK.":
"; $validator .= $v->show_tree(); echo ""; echo ""; echo _VALIDATOR; echo img("ico/ok.gif",_VALIOKTXT,16,16); echo _VALIOK; echo ""; echo ""; } catch (valid_except $e) { $validator = ""; $validator .= "
"._VALIDATORTXT."..."._VALIERROR.":
"; $s = new valid_show(stripslashes($rowpage['content']),$e); // $s = new valid_show(stripslashes($rowpage['content']),$e,true);//bez wlacz wylacz $validator .= $s->show(); // echo $s->show(200); echo ""; echo ""; echo _VALIDATOR; echo img("ico/wyroznienie1.gif",_VALIERRORTXT,16,16); echo _VALIERROR; echo ""; echo ""; } }//if php >4 //----------------------------------------validator make end } //echo "
"; //echo ""._TAGS.":"; echo "
"; //// echo editor('f_content',corect_to_edit($rowpage['content']),$width="100%",$height="550px");echo $GO_CONFIG->editor;exit; if ($GO_CONFIG->editor==1 AND is_dir("edit")){ /* $sw = new SPAW_Wysiwyg('f_content',stripslashes($rowpage['content']), 'pl', 'full', 'classic', '100%', '550px' ); echo $sw->show(); */ echo editor('f_content',corect_to_edit($rowpage['content']),$width="100%",$height="550px"); }else if (is_dir("ckeditor")){ // echo editor('f_content',corect_to_edit($rowpage['content']),$width="100%",$height="550px",$expand=true,$toolbar="Aron",$noprint=1) //OKOK // echo editor('f_content',corect_to_edit($rowpage['content']),$width="100%",$height="550px"); //include(); include_once "ckeditor/ckeditor.php"; // Create a class instance. $CKEditor = new CKEditor(); // Path to the CKEditor directory. $CKEditor->basePath = '/ckeditor/'; //corePlugins : '', //$aconfig['uiColor'] = '#ff0000'; //$aconfig['toolbar'] = 'Basic'; $aconfig['width'] = '100%'; $aconfig['height'] = '550'; //$aconfig['toolbar'] = 'Basic'; $aconfig['baseFloatZIndex'] = '10000'; $aconfig['tabIndex'] = '0'; $aconfig['ProtectedSource'] = '/(<\?[\s\S]*?\?>)|()|()|({.*?})|(<\script[\s\S]*?<\/script>)|(<\object[\s\S]*?<\/object>)/gi';//PHP $aconfig['ProcessHTMLEntities'] = false ; //true /* //$aconfig['protectedSource'] = '/(<\?[\s\S]*?\?>)|()|()|({.*?})/gi';//PHP $aconfig['protectedSource'] = '/<\?[\s\S]*?\?>/g';//PHP //$aconfig['protectedSource'] = '/<\?[\s\S]*?\?>/g';//ASP //$aconfig['protectedSource'] = '(]+>[\s|\S]*?<\/asp:[^\>]+>)|(]+\/>)/gi';//asp.net //extraPlugins : '', //removePlugins : '', //bodyClass : '',//contents //bodyId : '',//contents_id //docType : '', contentsCss : CKEDITOR.basePath + 'contents.css', contentsLangDirection : 'ui', contentsLanguage : '', language : '', defaultLanguage : 'en', baseHref : '', customConfig : 'config.js', */ $aconfig['fullPage']= false; $aconfig['startupOutlineBlocks']= true; $aconfig['forceEnterMode']= false; $aconfig['startupShowBorders']= false; $aconfig['startupFocus']= true; //$aconfig['shiftEnterMode']= CKEDITOR.ENTER_P; //CKEDITOR.ENTER_P, CKEDITOR.ENTER_BR, CKEDITOR.ENTER_DIV $aconfig['autoUpdateElement']= true; // Do not print the code directly to the browser, return it instead.^ //$CKEditor->returnOutput = true;//jesli do zmiennej ma byc zwrocony edytor //$CKEditor->textareaAttributes = array("cols" => 80, "rows" => 10); // Configuration that will only be used by the second editor.^ //$config['toolbar'] = array(^ // array( 'Source', '-', 'Bold', 'Italic', 'Underline', 'Strike' ),^ // array( 'Image', 'Link', 'Unlink', 'Anchor' )^ //); //$aconfig['skin'] = 'v2'; //$aconfig['skin'] = 'office2003'; $aconfig['skin'] = 'kama'; /* $CKEditor->config['filebrowserBrowseUrl'] = '/ckfinder/ckfinder.html'; $CKEditor->config['filebrowserImageBrowseUrl'] = '/ckfinder/ckfinder.html?type=Images'; $CKEditor->config['filebrowserFlashBrowseUrl'] = '/ckfinder/ckfinder.html?type=Flash'; $CKEditor->config['filebrowserUploadUrl'] = '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files'; $CKEditor->config['filebrowserImageUploadUrl'] = '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images'; $CKEditor->config['filebrowserFlashUploadUrl'] = '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash'; */ //===============ok 1 filemanager $aconfig['filebrowserBrowseUrl']= '/ckeditor/filemanager/index.html'; $aconfig['filebrowserImageBrowseUrl']= '/ckeditor/filemanager/index.html'; //===============ok 2 file menager /* $aconfig['filebrowserBrowseUrl'] = '/ckeditor/ckfinder/ckfinder.html'; $aconfig['filebrowserImageBrowseUrl'] = '/ckeditor/ckfinder/ckfinder.html?type=Images'; $aconfig['filebrowserFlashBrowseUrl'] = '/ckeditor/ckfinder/ckfinder.html?type=Flash'; $aconfig['filebrowserUploadUrl'] = '/ckeditor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files'; $aconfig['filebrowserImageUploadUrl'] = '/ckeditor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images'; $aconfig['filebrowserFlashUploadUrl'] = '/ckeditor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash'; */ $aconfig['filebrowserWindowWidth']= "70%"; //$aconfig['filebrowserWindowHeight']= 500; $aconfig['filebrowserWindowHeight']= "70%"; // Create a textarea element and attach CKEditor to it. $CKEditor->editor("f_content", corect_to_edit($rowpage['content']),$aconfig); /* if ($GO_CONFIG->editor==1){ // $sBasePath = $_SERVER['PHP_SELF'] ; // $sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ; // $sBasePath = "edit2/"; $oFCKeditor = new FCKeditor('f_content') ; // $oFCKeditor->BasePath = $sBasePath ; $oFCKeditor->Width = "100%" ; $oFCKeditor->Height = "550px" ; $oFCKeditor->ToolbarSet = "Aron" ; // $oFCKeditor->Value = stripslashes($rowpage['content']) ; $oFCKeditor->Value = corect_to_edit($rowpage['content']) ; $oFCKeditor->Create() ; }else{ // echo ""; echo makeusereditor("f_content",corect_to_edit($rowpage['content']),"100%",300); } */ }else{ // echo ""; echo makeusereditor("f_content",corect_to_edit($rowpage['content']),"100%",300); }//else wybor edutora echo ""; // echo "