KISKUTAS község honlapja
honlaptérkép  ]   [  kapcsolat  ]


 


 

Szabad mondatok:

data as $key => $item){ if ($item['id']==$index){ $ret=$key; break; } } return $ret; } function validemail($addr){ return eregi("^[a-z0-9]+([_.-][a-z0-9]+)*@([a-z0-9]+([.-][a-z0-9]+)*)+\\.[a-z]{2,4}$", $addr); } function jsRedirect($url){ echo ""; } function clearoldadmins() { global $log, $now, $adminexpire; include($log); if (count($admins)>0){ $i=0; $fp=fopen($log, "w"); fputs($fp, ""); fclose($fp); } } function saveposts($stuff){ global $dat; $fp=fopen($dat, "w"); foreach ($stuff as $item){ $line=$item['id']."|".$item['time']."|".$item['mode']."|".$item['title']."|".$item['story']."|".$item['teaser']."\n"; fputs($fp, $line); } fclose($fp); } function isloggedin() { global $log, $now, $adminexpire; include($log); $logged=false; if (count($admins)>0){ foreach ($admins as $line){ if ($line['hash']==md5($_GET['hash'])) $logged=true; } } return $logged; } function showmenu() { global $txtsign, $txtview, $txtadmin, $me, $getvars; echo ""; } function emailencoder ($str){ for ($i=0; $i< strlen($str); $i++){ $n=rand(0,10); if ($n>5) $foo.="&#".ord($str[$i]).";"; else $foo.="&#x".sprintf("%X", ord($str[$i])).";"; } return $foo; } function getTemplate($tpl, $html){ $match="/<\!\-\-$tpl\-\->(.*?)<\!\-\-$tpl\-\->/s"; preg_match($match, $html, $tmp); return $tmp[1]; } if (!function_exists('str_ireplace')) { function str_ireplace ($search, $replace, $subject, $count = null) { if (is_string($search) && is_array($replace)) { trigger_error('Array to string conversion', E_USER_NOTICE); $replace = (string) $replace; } if (!is_array($search)) { $search = array ($search); } if (!is_array($replace)) { $replace_string = $replace; $replace = array (); for ($i = 0, $c = count($search); $i < $c; $i++) { $replace[$i] = $replace_string; } } $length_replace = count($replace); $length_search = count($search); if ($length_replace < $length_search) { for ($i = $length_replace; $i < $length_search; $i++) { $replace[$i] = ''; } } $was_array = false; if (!is_array($subject)) { $was_array = true; $subject = array ($subject); } $count = 0; foreach ($subject as $subject_key => $subject_value) { foreach ($search as $search_key => $search_value) { $segments = explode(strtolower($search_value), strtolower($subject_value)); $count += count($segments) - 1; $pos = 0; foreach ($segments as $segment_key => $segment_value) { $segments[$segment_key] = substr($subject_value, $pos, strlen($segment_value)); $pos += strlen($segment_value) + strlen($search_value); } $subject_value = implode($replace[$search_key], $segments); } $result[$subject_key] = $subject_value; } if ($was_array === true) { return $result[0]; } return $result; } } function paging( $pages, $pagevar="page", $ppv=10, $first ="««« ", $firsts ="««« ", $prev ="««  ", $prevs ="««  ", $num ="{page}", $nums ="{page}", $sep =" | ", $more ="[...]", $next ="  »»", $nexts ="  »»", $last =" »»»", $lasts =" »»»"){ // get URI parameters $getvars=$_SERVER['PHP_SELF']."?"; foreach ($_GET as $key => $val){ if ($key!=$pagevar){ if (isset($val) && $val!=""){ $getvars.="$key=$val&"; }else{ $getvars.="$key&"; } } } $page=(is_numeric($_GET[$pagevar])) ? $_GET[$pagevar] : 1; $page=($page>$pages) ? $pages : $page; $prevpage=($page>1) ? $page-1 : 1; $nextpage=($page < $pages) ? $page+1 : $pages; $paging=""; if ($pages>1){ // first $paging.=($page>1) ? str_replace("{url}", "$getvars$pagevar=1", $first) : $firsts; // prev $paging.=($page>1) ? str_replace("{url}", "$getvars$pagevar=$prevpage", $prev) : $prevs; // pages $ppvrange=ceil($page/$ppv); $start=($ppvrange-1)*$ppv; $end=($ppvrange-1)*$ppv+$ppv; $end=($end>$pages) ? $pages : $end; $paging.=($start>1) ? str_replace("{url}", "$getvars$pagevar=".($start-1), $more).$sep : ""; for ($i=1; $i<=$pages; $i++){ if ($i>$start && $i<= $end){ $paging.=($page==$i) ? str_replace("{page}", $i, $nums).(($i<$end) ? $sep : "") : str_replace(array("{url}", "{page}"), array("$getvars$pagevar=$i", $i), $num).(($i<$end) ? $sep : ""); } } $paging.=($end<$pages) ? $sep.str_replace("{url}", "$getvars$pagevar=".($end+1), $more) : "" ; // next $paging.=($page<$pages) ? str_replace("{url}", "$getvars$pagevar=$nextpage", $next) : $nexts; // last $paging.=($page<$pages) ? str_replace("{url}", "$getvars$pagevar=$pages", $last) : $lasts; } return $paging; } ?> sortkeys = array(array('time','DESC')); if (count($foo)==0){ $empty=true; $nextindex=1; }else{ $i=0; foreach ($foo as $line){ $line=explode("|", rtrim($line)); if ($line[2]=="static" || ($line[2]=="dynamic" && $line[1]<$now) || isloggedin() ){ $stuff->data[$i] = array("id" => $line[0], "time" => $line[1], "mode" => $line[2], "title" => $line[3], "story" => $line[4], "teaser" => $line[5]); $i++; } } if ($i>0){ $stuff->sortkeys = array(array('id','DESC')); $stuff->msort(); $foo=current($stuff->data); $nextindex=$foo['id']+1; $stuff->sortkeys = array(array('time','DESC')); $stuff->msort(); $numposts=count($stuff->data); }else{ $numposts=0; $empty=true; } } // RSS stuff if ($rssEnable){ $info = pathinfo($_SERVER['PHP_SELF']); $info['dirname'] = ($info['dirname'] == "/") ? $info['dirname'] : $info['dirname']."/"; $url = $info['dirname'].$pathtoscript."rss.php?mndo=rss"; echo ""; } echo "\n\n\n\n"; echo "
"; clearoldadmins(); // admin stuff if ($do=="admin") { if ($action=="login"){ if ($name==$adminname && $pwd==$adminpwd){ include($log); $fp=fopen($log, "w"); fputs($fp, "0){ foreach ($admins as $line){ fputs($fp, "\$admins[$i]['time']=".$line[time]."; \$admins[$i]['hash']='".$line['hash']."';\n"); $i++; } } fputs($fp, "\$admins[$i]['time']=".$now."; \$admins[$i]['hash']='".md5($hash)."';\n?>"); fclose($fp); jsRedirect($me.$getvars); } } if ($action=="delete" && isloggedin()){ $todel=getkey($id, $stuff); unset($stuff->data[$todel]); $stuff->msort(); saveposts($stuff->data); $do="view"; }else{ ?>
Adminisztráció

Felhasználónév:  
Jelszó:
 
» $txtbadtitle"; //if ($story=="") $error.="
» $txtbadstory"; if ($teaser=="") $error.="
» $txtbadteaser"; if ($date=="") $error.="
» $txtbaddate"; if ($error===false){ $date = explode(".", $date); $daytime = explode(".", $_REQUEST['daytime']); $daytime[0] = (is_numeric($daytime[0]) && $daytime[0] >= 0 && $daytime[0] < 24) ? $daytime[0] : 23; $daytime[1] = (is_numeric($daytime[1]) && $daytime[1] >= 0 && $daytime[1] < 60) ? $daytime[1] : 59; $time = mktime($daytime[0], $daytime[1], 0, $date[1], $date[0], $date[2]); $story = ($_REQUEST['hasstory'] == 1) ? $_REQUEST['story'] : ""; if ($id=="new"){ $index=$numposts; $id=$nextindex; $saveit=true; }else if (is_numeric($id)){ $index=getkey($id, $stuff); $saveit=true; } if ($saveit){ $stuff->data[$index]['id']=$id; $stuff->data[$index]['time']=$time; $stuff->data[$index]['mode']=$_REQUEST['mode']; $stuff->data[$index]['title']=str_replace(array("|"), array(" "), $title); if ($wysiwyg===true){ $stuff->data[$index]['teaser']=stripslashes(str_replace(array("\r", "\n", "|"), array(" ", " ", " "), $teaser)); $stuff->data[$index]['story']=stripslashes(str_replace(array("\r", "\n", "|"), array(" ", " ", " "), $story)); }else{ $stuff->data[$index]['teaser']=str_replace(array("\r", "\n", "|"), array(" ", "
", " "), $teaser); $stuff->data[$index]['story']=str_replace(array("\r", "\n", "|"), array(" ", "
", " "), $story); } saveposts($stuff->data); $stuff->msort(); $empty=false; } $do="view"; }else echo "
$txterrors$error

$txtclickback
"; }else{ if ($action=="edit"){ $post=$stuff->data[getkey($id, $stuff)]; $title= htmlentities(stripslashes($post['title']), ENT_QUOTES); if ($wysiwyg===true){ $teaser = ($post['teaser']); $story = ($post['story']); }else{ $teaser=stripslashes(str_replace("
", "\n", htmlentities($post['teaser'], ENT_QUOTES))); $story=stripslashes(str_replace("
", "\n", htmlentities($post['story'], ENT_QUOTES))); } $time=$post['time']; $mode = $post['mode']; $hasstory = (trim($story) != "") ? true : false; }else{ $title=""; $story=""; $time="notset"; $id="new"; $mode = "dynamic"; $hasstory = true; } ?>
Dátum  " style="width:100px;" maxlength="10"> [dd.mm.yyyy]    " style="width:80px;" maxlength="5"> [hh.mm]
Mód 
/>     />  
Cím 
Előzetes 
BasePath = $pathtoscript.'FCKeditor/'; $oFCKeditor->Value = $teaser; $oFCKeditor->Width = "100%"; $oFCKeditor->Height = 300; $oFCKeditor->Create() ; } else { ?>
  style="vertical-align:-3px;" onChange="toggleStory(this, 'rowStory');"/>
Teljes tartalom 
BasePath = $pathtoscript.'FCKeditor/'; $oFCKeditor->Value = $story; $oFCKeditor->Width = "100%";; $oFCKeditor->Height = 450; $oFCKeditor->Create() ; } else { ?>
  ">
data[getkey($_GET['mnid'], $stuff)]; $item['title'] = stripslashes($item['title']); $item['teaser'] = stripslashes($item['teaser']); $item['story'] = stripslashes($item['story']); if ($wrap!==false) $item['story']=wordwrap($item['story'], $wrap, " ", 1); $match=array("{title}", "{time}", "{teaser}", "{story}", "{edit}", "{delete}", "{urltoallnews}"); if (isloggedin()){ $replace=array( $item['title'], strftime($dateformat, $item['time']), $item['teaser'], $item['story'], "$txtedit", "$txtdelete", "$me$getvars&page=".$_GET['page']); }else $replace=array($item['title'], strftime($dateformat, $item['time']), $item['teaser'], $item['story'], "", "", "$me$getvars&page=".$_GET['page']); $tmp = str_replace($match, $replace, $tpl_story); ob_start(); eval("?>".$tmp."data as $item){ if ($item['id']!=0 && $i>=$from && $i< ($from+$ppp) ){ $item['title'] = stripslashes($item['title']); $item['teaser'] = stripslashes($item['teaser']); $item['story'] = stripslashes($item['story']); $hasstory = (trim($item['story']) != "") ? true : false; if ($wrap!==false) $item['story']=wordwrap($item['story'], $wrap, " ", 1); $match=array("{title}", "{time}", "{teaser}", "{story}", "{edit}", "{delete}", "{urltofullstory}"); if (isloggedin()){ $replace=array( $item['title'], strftime($dateformat, $item['time']), $item['teaser'], $item['story'], "$txtedit", "$txtdelete", ($hasstory === true) ? "$me$getvars&mnid=".$item['id']."&page=".$_GET['page'] : "" ); }else{ $replace = array($item['title'], strftime($dateformat, $item['time']), $item['teaser'], $item['story'], "", "", ($hasstory === true) ? "$me$getvars&mnid=".$item['id']."&page=".$_GET['page'] : "" ); } $tmp = str_replace($match, $replace, $tpl_teaser); ob_start(); eval("?>".$tmp."0) ? floor($numposts/$ppp)+1 : ($numposts/$ppp); echo "

"; echo paging($numpages); echo "

"; } } } // closing table tags // Please don't remove the 'powered by...' link echo "
"; if (!isloggedin()) echo "$txtadmin "; else echo "$txtlogout "; echo "
"; echo "\n\n\n\n"; ?>
Térfigyelő
A Kálócfapusztai Szűz Mária Neve Kápolna
tovább »
Kálócfapuszta kápolna
GALÉRIÁINK tovább »»
LAPOZGATÓ tovább »»
Együttműködő partnerek:
Helikon rádió
Zalai Hírlap
V. kerület
Nagykutas
eMagyarország
Festetics Kastélyszálló Szeleste
© 2008-2014. kiskutas.hu! Minden jog fenntartva! Webmester: Geszta