Hallo
Ich habe schon Eurer Forum durch gestöbert und find leider keinen link zum d-load der funzt.Vlt hat noch jemand einen für mich.
verwendete ilch Version: 1.1 O
betroffene Homepage: acr-clan.de
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
<?php # Copyright by: Manuel # Support: www.ilch.de #modded by FeTTsack defined ('main') or die ( 'no direct access' ); defined ('admin') or die ( 'only admin access' ); $design = new design ( 'Admins Area', 'Admins Area', 2 ); $design->header(); ## ### #### ##### A k t i o n e n if(!empty ($_GET['del'])){ $id = escape($_GET['del'], 'integer'); db_query("DELETE FROM `prefix_gbook` WHERE id = ".$id." LIMIT 1"); db_query("DELETE FROM prefix_koms WHERE uid = ".$id." AND cat = 'GBOOK'"); } if(!empty ($_GET['status'])){ $statusid = escape($_GET['status'], 'integer'); db_query('UPDATE `prefix_gbook` SET `bolstatus` = IF(`bolstatus`>0,0,1) WHERE `id` = "'.$statusid.'" LIMIT 1'); } if(isset($_POST['sub'])){ $name = escape($_POST['name'], 'string'); $mail = escape($_POST['mail'], 'string'); $page = escape($_POST['page'], 'string'); $text = escape($_POST['text'], 'string'); $status = escape($_POST['status'], 'integer'); if(empty($_POST['gid'])){ db_query("INSERT INTO prefix_gbook (name, mail, page, txt, time, bolstatus) VALUES ('".$name."','".$mail."','".$page."','".$text."', '".time()."','".$status."')"); }else{ $gid = escape($_POST['gid'], 'integer'); db_query("UPDATE prefix_gbook SET name = '".$name."', mail = '".$mail."', page = '".$page."', txt = '".$text."' , bolstatus = '".$stat."' WHERE id = ".$gid); } } $ar = array(1 => 'Freigegeben', 0 => 'Gesperrt'); $r = array('name'=>'','mail'=>'','page'=>'','text'=>'','id'=>'','bolstatus'=>arlistee(1,$ar)); if(isset($_GET['edit'])){ $id = escape($_GET['edit'], 'integer'); $r = db_fetch_assoc(db_query("SELECT id, name, mail, page, txt as text, bolstatus FROM prefix_gbook WHERE id = ".$id)); $r['bolstatus'] = arlistee($r['bolstatus'],$ar); } $tpl = new tpl('gbook', 1); $tpl->set_ar_out($r,0); $class = ''; $erg = db_query('SELECT name, mail, txt, id, bolstatus FROM `prefix_gbook` ORDER BY time DESC'); while($r = db_fetch_assoc($erg)){ $class = ($class == 'Cmite' ? 'Cnorm' : 'Cmite' ); $staus = '<a href="admin.php?gbook&status='.$r['id'].'">'; if($r['bolstatus'] == 1){ $staus .= '<img width="16px" height="16px" src="include/images/icons/admin/aktiv.png" title="'.$ar[$r['bolstatus']].'" alt="Status" border="0" /></a>'; }else{ $staus .= '<img width="16px" height="16px" src="include/images/icons/admin/inaktiv.png" title="'.$ar[$r['bolstatus']].'" alt="Status" border="0" /></a>'; } $text = substr(preg_replace("/\015\012|\015|\012/", " ", htmlentities(strip_tags(stripslashes($r['txt'])))),0,75); echo '<tr class="'.$class.'">'; echo '<td>'.$staus.' <a href="admin.php?gbook=0&edit='.$r['id'].'"><img src="include/images/icons/edit.gif" /></a> <a href="javascript:delcheck('.$r['id'].')"><img src="include/images/icons/del.gif"></a></td>'; echo '<td><b><a href="mailto:'.$r['mail'].'">'.$r['name'].'</a></b> <span class="smalfont">'; echo $text.'</span></td>'; echo '</tr>'; } $tpl->out(1); $design->footer(); ?>
<?php # Copyright by: Manuel # Support: www.ilch.de # modded by FeTTsack defined ('main') or die ( 'no direct access' ); $title = $allgAr['title'].' :: Gästebuch'; $hmenu = 'Gästebuch'; $design = new design ( $title , $hmenu ); $design->header(); # time sperre in sekunden $timeSperre = $allgAr['Gsperre']; /* gbook id , name , mail , page , ip , time , txt */ switch($menu->get(1)){ case 1: $tpl = new tpl ( 'gbook.htm' ); $ar = array( 'uname' => $_SESSION['authname'], 'SMILIES' => getsmilies(), 'ANTISPAM' => get_antispam ('gbook', 1), 'TXTL' => $allgAr['Gtxtl'] ); $tpl->set_ar_out($ar,3); if(!isset($_SESSION['klicktime_gbook'])){ $_SESSION['klicktime_gbook'] = 0; } break; case 2: $dppk_time = time(); if(($_SESSION['klicktime_gbook'] + $timeSperre) < $dppk_time AND isset($_POST['name']) AND isset($_POST['txt']) AND trim($_POST['name']) != "" AND trim($_POST['txt']) != "" AND chk_antispam('gbook') AND strlen($_POST['txt']) <= $allgAr['Gtxtl']){ $txt = escape($_POST['txt'], 'textarea'); $name = escape($_POST['name'], 'string'); $mail = escape($_POST['mail'], 'string'); $page = escape($_POST['page'], 'string'); db_query("INSERT INTO `prefix_gbook` (`name`,`mail`,`page`,`time`,`ip`,`txt`) VALUES ('".$name."', '".$mail."', '".$page."', '".time()."', '".getip()."', '".$txt."')"); $_SESSION['klicktime_gbook'] = $dppk_time; wd('index.php?gbook',$lang['insertsuccessful']); }else{ echo '- '.$lang['donotpostsofast']; echo '<br />- '.sprintf($lang['gbooktexttolong'], $allgAr['Gtxtl']); echo '<br />- '.$lang['plsfilloutallfields']; } break; case 'show': if($allgAr['gbook_koms_for_inserts'] == 1){ $id = escape($menu->get(2), 'integer'); if(chk_antispam('gbookkom') AND isset($_POST['name']) AND isset($_POST['text'])){ $name = escape($_POST['name'], 'string'); $text = escape($_POST['text'], 'string'); db_query("INSERT INTO `prefix_koms` (`name`,`text`,`uid`,`cat`) VALUES ('".$name."', '".$text."', ".$id.", 'GBOOK')"); } if($menu->getA(3) == 'd' AND is_numeric($menu->getE(3)) AND has_right(-7, 'gbook')){ $did = escape($menu->getE(3), 'integer'); db_query("DELETE FROM `prefix_koms` WHERE `uid` = ".$id." AND `cat` = 'GBOOK' AND `id` = ".$did); } $r = db_fetch_assoc(db_query("SELECT `time`, `name`, `mail`, `page`, `txt` as `text`, `id` FROM `prefix_gbook` WHERE `id` = ".$id)); $r['datum'] = date('d.m.Y', $r['time']); if($r['page'] != ''){ $r['page'] = get_homepage($r['page']); $r['page'] = ' <a href="'.$r['page'].'" target="_blank"><img src="include/images/icons/page.gif" border="0" alt="Homepage '.$lang['from'].' '.$r['name'].'"></a>'; } if($r['mail'] != ''){ $r['mail'] = ' <a href="mailto:'.escape_email_to_show($r['mail']).'"><img src="include/images/icons/mail.gif" border="0" alt="E-Mail '.$lang['from'].' '.$r['name'].'"></a>'; } $tpl = new tpl('gbook.htm'); $r['ANTISPAM'] = get_antispam('gbookkom', 0); $r['uname'] = $_SESSION['authname']; $r['text'] = bbcode($r['text']); $tpl->set_ar_out($r, 4); $i = 1; $erg = db_query("SELECT `id`, `name`, `text` FROM `prefix_koms` WHERE `uid` = ".$id." AND `cat` = 'GBOOK' ORDER BY `id` DESC"); $anz = db_num_rows($erg)+1; while($r1 = db_fetch_assoc($erg)){ $r1['zahl'] = $anz - $i; $r1['text'] = bbcode($r1['text']); if(has_right(-7, 'gbook')){ $r1['text'] .= '<a href="index.php?gbook-show-'.$id.'-d'.$r1['id'].'"><img src="include/images/icons/del.gif" alt="'.$lang['delete'].'" border="0" title="'.$lang['delete'].'" /></a>'; } $tpl->set_ar_out($r1, 5); $i++; } $tpl->out(6); } break; default: $limit = $allgAr['gbook_posts_per_site']; // Limit $page = ($menu->getA(1) == 'p' ? escape($menu->getE(1), 'integer') : 1); $MPL = db_make_sites ($page , "WHERE `bolstatus` = 1" , $limit , "?gbook" , 'gbook' ); $anfang = ($page - 1) * $limit; $tpl = new tpl('gbook.htm'); $ei1 = @db_query("SELECT COUNT(ID) FROM `prefix_gbook`"); $ein = @db_result($ei1,0); $locked =@db_result(@db_query("SELECT COUNT(ID) FROM `prefix_gbook` WHERE `bolstatus` = 0"),0); $ar = array('EINTRAGE' => $ein, 'EINLOCKED' => $locked); $tpl->set_ar_out($ar,0); $erg = db_query("SELECT * FROM `prefix_gbook` WHERE `bolstatus` = 1 ORDER BY `time` DESC LIMIT ".$anfang.",".$limit) or die (db_error()); while($row = db_fetch_object($erg)){ $page = ''; $mail = ''; if($row->page){ $row->page = get_homepage($row->page); $page = ' <a href="'.$row->page.'" target="_blank"><img src="include/images/icons/page.gif" border="0" alt="Homepage '.$lang['from'].' '.$row->name.'"></a>'; } if($row->mail){ $mail = ' <a href="mailto:'.escape_email_to_show($row->mail).'"><img src="include/images/icons/mail.gif" border="0" alt="E-Mail '.$lang['from'].' '.$row->name.'"></a>'; } $koms = ''; if($allgAr['gbook_koms_for_inserts'] == 1){ $koms = db_result(db_query("SELECT COUNT(*) FROM prefix_koms WHERE uid = ".$row->id." AND cat = 'GBOOK'"),0,0); $koms = '<a href="index.php?gbook-show-'.$row->id.'">'.$koms.' '.$lang['comments'].'</a>'; } $ar = array( 'NAME' => $row->name, 'DATE' => date("d.m.Y",$row->time), 'koms' => $koms, 'MAIL' => $mail, 'ID' => $row->id, 'PAGE' => $page, 'TEXT' => BBCode($row->txt) ); $tpl->set_ar_out($ar,1); } $tpl->set_out('SITELINK', $MPL, 2); break; } //-----------------------------------------------------------| $design->footer(); ?>
ALTER TABLE `ic1_gbook` ADD `bolstatus` tinyint(1) NOT NULL default '0';
if($r['bolstatus'] == 1){ $staus .= '<img width="16px" height="16px" src="include/images/icons/admin/aktiv.png" title="'.$ar[$r['bolstatus']].'" alt="Status" border="0" /></a>'; }else{ $staus .= '<img width="16px" height="16px" src="include/images/icons/admin/inaktiv.png" title="'.$ar[$r['bolstatus']].'" alt="Status" border="0" /></a>'; }
if($r['bolstatus'] == 1){ $staus .= '<img src="include/images/icons/jep.gif" title="'.$ar[$r['bolstatus']].'" alt="Status" border="0" /></a>'; }else{ $staus .= '<img src="include/images/icons/nop.gif" title="'.$ar[$r['bolstatus']].'" alt="Status" border="0" /></a>'; }
Geschlossen | ||
Zurück zu Allgemein |