ilch Forum » Ilch Clan 1.1 » Module und Modifikationen » Artikel Modul - kommis umschreiben

Geschlossen
  1. #1
    User Pic
    Siggi Hall Of Fame
    Registriert seit
    08.02.2007
    Beiträge
    6.558
    Beitragswertungen
    327 Beitragspunkte
    Moin,

    könnte mir wohl wer helfen beim umschreiben vom Artikel modul?

    Ich würde gerne das die Kommentar Funktion und die Kommentare selbst unter den Artikel kommen und nicht durch den Wechsel wenn man auf Kommentar klickt.

    Bei den sys hab ich noch nicht ganz durchgeblickt. schon sicher muss ich die tpl out irgendwie ändern? aber meine versuche scheiterten und ja :/

    Vllt mag mal wer der mehr Ahnung hat bissl schauen und mir weiterhelfen lächeln

    Ps. send pm bei erstellten oder edetierten Artikel geht auch nicht auch wenn es in der Admin config richtig eingestellt ist.

    articles.htm
    <table width="100%" border="0" cellspacing="1" cellpadding="4"><tr><td><b>&raquo;<u>Tutorials & Anleitungen</u></b></td><td align="right"><b><a href="index.php?articles-write">Tutorial - Anleitung eintragen.</a></b></td></tr></table>
    {EXPLODE}
    <br />
    <table width="95%" border="0" cellspacing="2" cellpadding="2" align="center" bgcolor="#f7e7d6" class="forumumrand">
      <tr>
        <td valign="top">
    <table width="100%" border="0" cellspacing="1" cellpadding="3">
      <tr>
    		<td width="80%" align="center"><b>{_lang_category}</b></td>
        	<td width="20%" align="center"><b>Artikel</b></td>
    	</tr>
      <tr bgcolor="#FFFFFF">
        <td colspan="2">
    <table width="100%" border="0" cellspacing="1" cellpadding="4" class="freeshardtable">
    	{EXPLODE}
      <tr bgcolor="#FFFFFF" onmouseover="this.className='Cmite';" onmouseout="this.className='Cnorm';" onclick="window.location.href = 'index.php?downloads-{id}'">
    	  <td width="80%" align="left"><a href="index.php?articles-{id}">{name}</a></td>
    	  <td width="20%" align="center">{anzArt}</td>
    	</tr>
    	{EXPLODE}
    </table>    
        </td>
      </tr>
    </table>
        </td>
      </tr>
    </table>
    {EXPLODE}
    <table width="100%" border="0" cellspacing="1" cellpadding="4">
      {EXPLODE}
       <tr>
         <td width="100%">
             {vorschau}
             <div style="padding:0.2em;text-indent:0.2em;font-weight:bold;" class="head"><a href="index.php?articles-show-A{art_id}">{art_title}</a> <div style="float:right;">{art_kate} {art_grp}</div></div>
             <span class="smalfont">&raquo;&nbsp;{_lang_from} <b>{username}</b> geschrieben am {datum}</span><br />
             <div style="margin-top:.2em;padding:0.2em;border-top:1px dashed #000;clear:both;">{art_preview}</div>
         </td>
        </tr>
       {EXPLODE}
    
       {EXPLODE}
    </table>
    {EXPLODE}
    <table width="100%" border="0" cellspacing="1" cellpadding="4"><tr><th colspan="2"><div align="left"><b>&raquo;<u>Tutorials & Anleitungen</u></b></div></th></tr></table>
    <table width="100%" border="0" cellspacing="5" cellpadding="3" bgcolor="#f7e7d6" class="forumumrand">
      <tr class="freeshardslist">
       <td align="center"><b>{art_title}</b></td>
      </tr>
      <tr bgcolor="#FFFFFF">
    		<td>
    <table width="100%" border="0" cellspacing="5" cellpadding="3">
      <tr bgcolor="#FFFFFF">
       <td width="12" align="center"><img src="include/images/icons/download/icon_author.gif" alt="" border="0"></td>
       <td width="275" align="left">{creater}</td>
       <td width="12" align="right"><img src="include/images/icons/download/icon_eye.gif" alt="" border="0"></td>
       <td colspan="2">{hits} Gesehen</td>
      </tr>
      <tr bgcolor="#FFFFFF">
       <td width="12" align="center"><img src="include/images/icons/download/icon_date.gif" alt="" border="0"></td>
       <td width="275" align="left">Eingetragen {datum}</td>
       <td width="12" align="center"><img src="include/images/icons/download/icon_grp.gif" alt="" border="0"></td>
       <td width="46">{art_kate}</td>
       <td>{art_kate2}</td>
      </tr>
      <tr bgcolor="#FFFFFF">
       <td width="12" align="center"><img src="include/images/icons/download/icon_komms.gif" alt="" border="0"></td>
       <td width="275" align="left"><a href='index.php?articles-show-A{art_id}#komm'>Kommentare</a></td>
       <td width="12" align="center"><img src="include/images/icons/download/icon_art.gif" alt="" border="0"></td>
       <td width="46">{art_grp}</td>
       <td>{art_grp2}</td>
      </tr>
    </table>
            </td>
    	</tr>
    </table>
    <br />
    <table width="100%" border="0" cellspacing="3" cellpadding="0" bgcolor="#f7e7d6" class="forumumrand">
      <tr class="freeshardslist">
    		<td align="center"><b>{_lang_desc}</b></td>
    	</tr>
        <tr>
    {EXPLODE}
    		<td>
    <table width="100%" border="0" cellspacing="2" cellpadding="3">
        <tr bgcolor="#FFFFFF">
    	  <td class="newstxt">{content}</td>
      	</tr>
    </table>
            </td>
    	</tr>
    </table>
    <br /><br />
      <a name=komm></a></a><b>Kommentare ({ANZAHL})</b>
    <br /><br />
    {_if_{SESSION_AUTHRIGHT}<='-1'}
    <form action="index.php?articles-show-C{art_id}" method="POST">
    <table width="95%" border="0" cellspacing="5" cellpadding="3" align="center" bgcolor="#f7e7d6" class="forumumrand">
      <tr bgcolor="#FFFFFF">
        <td><table width="100%" border="0" cellspacing="1" cellpadding="3">
      <tr>
        <td valign="top"><input type="text" name="name" value="{uname}" readonly /> &nbsp; {ANTISPAM}</td>
      </tr>
      <tr>
        <td align="left"><!-- BB Code START -->{__BBCodeButtons__}<!-- BB Code ENDE --></td>
      </tr>
      <tr>
        <td valign="top"><textarea style="width: 98%" cols="50" rows="4" name="text"></textarea></td>
      </tr>
      <tr>
        <td colspan="2" valign="top" align="right" style="padding-right:12px;"><input type="submit" value="Kommentieren"></td>
      </tr>
    </table></td>
      </tr>
    </table>
          </form>
    {_else_}
    <table width="95%" border="0" cellspacing="5" cellpadding="3" align="center" bgcolor="#f7e7d6" class="forumumrand">
      <tr bgcolor="#FFFFFF">
        <td valign="top">
    <table width="100%" border="0" cellspacing="1" cellpadding="3">
      <tr>
        <td align="center">Um einen Kommentar zu posten, bitte <a href="index.php?user-login"><b>einloggen</b></a> oder <a href="index.php?user-1"><b>registrieren</b></a> Sie einen neuen Account.</td>
      </tr>
    </table>
        </td>
      </tr>
    </table>{/_endif}
          <br />
    {EXPLODE}
    <div align="center">
    <table width="95%" border="0" cellspacing="5" cellpadding="3" class="forumumrand">
      <tr class="freeshardslist">
        <td width="84" rowspan="2" align="center" valign="top">{BILD}</td>
        <td align="left">{GOKOMM} <a href="index.php?user-details-{ID}"><b>{NAME}</b></a> - <font class="smalfont">{TIME}</font> {DELETE}</td>
      </tr>
      <tr bgcolor="#FFFFFF">
        <td align="left" valign="top">{TEXT}</td>
      </tr>
    </table>
    </div>
    <br />
    {EXPLODE}
    <br />
    <a href="javascript:history.back(1)"><b>&laquo;</b> zur&uuml;ck</a>


    articles.php
    <?php
    #   Copyright by: Manuel Staechele
    #   Edit by: Nero
    #   Support: www.ilch.de
    
    defined ('main') or die ( 'no direct access' );
    
    //PHP datei mit den funktionen laden
    require_once('include/includes/func/articles.php');
    
    switch(escape($menu->get(1),'string')){
    default:
             #-> Kategorien-Pfad erstellen
             $cid = ( $menu->get(1) ? escape($menu->get(1), 'integer') : 0 );
             $erg = db_query("SELECT cat,name,schreibr FROM `prefix_artsys_cats` WHERE id = ".$cid." AND recht >= ".$_SESSION['authright']." ORDER BY pos");
    
             if (db_num_rows($erg) > 0) {
                $row = db_fetch_assoc($erg);
                $array = get_cats_array($row['cat'],'');
                if (!empty($array) ) {
                   $titelzw = get_cats_title($array);
                   $namezw = get_cats_urls($array);
                } else {
                   $titelzw = '';
                   $namezw = '';
                }
                $cattitle = ':: '.$titelzw.$row['name'];
                $catname = '<b> &raquo; </b>'.$namezw.$row['name'];
             } else {
                if ($cid <> 0) {
                   $title = $allgAr['title'].'';
                   $hmenu = '<a href="?articles"><font color="#FFFFFF">Tutorials - Anleitungen</font></a>';
                   $design = new design ( $title , $hmenu );
                   $design->header();
                   echo 'Die Kategorie wurde nicht gefunden';
                   $design->footer(1);
                }
                $cattitle = '';
                $catname = '';
             }
    
             $schreibrecht = $row['schreibr'];
    
             #-> Ausgabe
             $title = $allgAr['title'].'';
             $hmenu = '<a href="?articles"><font color="#FFFFFF">Tutorials - Anleitungen</font></a>'.$catname;
             $design = new design ( $title , $hmenu );
             $design->header();
             $tpl = new tpl ('articles' );
             $tpl->out(0);
             $tpl->set('cid', $cid);
             $erg = db_query("SELECT id,name,`desc` FROM `prefix_artsys_cats` WHERE cat = ".$cid." AND recht >= ".$_SESSION['authright']." ORDER BY pos");
    
             if ( db_num_rows($erg) > 0 ) {
                $tpl->out(1); $class = 'Cnorm';
                while ($row = db_fetch_assoc($erg) ) {
                   $row['anzArt'] = count_art($row['id']);
                   $class = ($class == 'Cdark' ? 'Cnorm' : 'dark');
                   $row['class'] = $class;
                   $tpl->set_ar_out($row,2);
                }
                $tpl->out(3);
             }
    
             #->sortieren
             $felder = array('art_time','art_viewed','art_time');
             $row = artsys_sort_func($menu->get(2),escape($menu->get(3),'string'),$felder,'list_articles');
             $sort = $row['sort'];
             unset($row['sort']);
             #->sortieren ende
    
             //Seiten
             $limit = $ArtsysArray['anzArt_perSite'];  // Limit
             $page = ($menu->getA(2) == 'p' ? $menu->getE(2) : 1 );
             $MPL = db_make_sites($page, " WHERE art_cat = ".$cid." AND art_status = 1 ", $limit, '?articles-'.$cid, 'artsys_articles');
             $anfang = ($page - 1) * $limit;
             //Aussgabe
    
             $erg = db_query("SELECT art_id,art_title,art_preview,art_rating,art_image,art_difficult,art_grp,art_kate,art_uid,art_viewed,DATE_FORMAT(art_time,'%d.%m.%Y') as datum from `prefix_artsys_articles` WHERE art_cat = ".$cid." AND art_status = 1 ORDER BY art_time DESC LIMIT $anfang, $limit");
             $anz_art = db_num_rows($erg);
    
             (($anz_art > 0 OR $cid<>0) ? $tpl->set_ar_out($row,4):'');
    
             if ( $anz_art > 0 ) {
                $class = 'Cnorm';
                while($row = db_fetch_assoc($erg) ) {
                   $class = ( $class == 'Cnorm' ? 'Cnorm' : 'Cnorm' );
                   $row['class'] = $class;
                   $row['art_preview'] = bbcode($row['art_preview']);
                   $row['vorschau'] = '';
                   $row['float'] = '';
    
                   if ($row['art_image'] <> "" AND file_exists($row['art_image'])){
                       $row['vorschau'] = '<a href="index.php?articles-show-A'.$row['art_id'].'"><img src="'.$row['art_image'].'" alt="'.$row['art_title'].'" title="'.$row['art_title'].'" style="border: medium none ; float: left; padding-right: 5px;"></a>';
                   }
    
                   artsys_hexToRgb(array($ArtsysArray['diff_bgcolor'],$ArtsysArray['diff_color'],$ArtsysArray['diff_nonecolor']),'diff');
    
                   $row['art_difficult'] = ($row['art_difficult'] > 0?'Schwierigkeit : <img src="include/images/articles/art_diff_image.php?d='.$row['art_difficult'].'" alt="'.$ArtsysArray['diff'][$row['art_difficult']].'" title="'.$ArtsysArray['diff'][$row['art_difficult']].'" ><br />':'');
                   $row['art_rating'] = show_vote_stats($row['art_rating']);
                   $row['username'] = get_n($row['art_uid']);
    			   
    		if ($row['art_kate']==1) {
    			$kate = '<img src="include/images/articles/entwickler.gif" alt="" border="0">';
    		}elseif($row['art_kate']==2) {
    			$kate = '<img src="include/images/articles/spieler.gif" alt="" border="0">';
    		}elseif($row['art_kate']==3) {
    			$kate = '<img src="include/images/articles/entwickler.gif" alt="" border="0"> <img src="include/images/articles/spieler.gif" alt="" border="0">';
    		}else{
    			$kate = '';
    		}
    		
    		if ($row['art_grp']==1) {
    			$grp = '<img src="include/images/articles/gumps_art.gif" alt="" border="0">';
    		}elseif($row['art_grp']==2) {
    			$grp = '<img src="include/images/articles/anim.gif" alt="" border="0">';
    		}elseif($row['art_grp']==3) {
    			$grp = '<img src="include/images/articles/weltenbau.gif" alt="" border="0">';
    		}elseif($row['art_grp']==4) {
    			$grp = '<img src="include/images/articles/technik.gif" alt="" border="0">';
    		}else{
    			$grp = '';
    		}
    			   
    			   $row['art_kate'] = $kate;
    			   $row['art_grp'] = $grp;
    			   
    		if ( loggedin() ) {
    			$entry = '<div align="right"><b><a href="index.php?articles-write">Tutorial - Anleitung eintragen.</a></b></div>';
    		}else{
    			$entry = '';
    		}
    		
    		$row['art_entry'] = $entry;
    
                   $tpl->set_ar_out($row,5);
    
                }
    
             }else{
    
                echo ($cid<>0?'<tr><td colspan="3" class="Cnorm">Kein Tutorials - Anleitungen vorhanden</td></tr>':'');
    
             }
    
             (((($anz_art > 0 AND $ArtsysArray['allow_defKat'] <> 0)OR $cid<>0) AND $schreibrecht == 1 )?$tpl->set_out('new_art_cat',($cid<>0?"-C$cid":""),6):'');
    
             (($anz_art > 0 OR $cid<>0)?$tpl->out(7):"");
    
             echo $MPL;
    		 
    		 echo '<br /><br />
    <table width="100%" border="0" cellspacing="1" cellpadding="1">
      <tr>
        <td width="23">&nbsp;</td>
        <td width="23"><img src="include/images/articles/entwickler.gif" alt="" border="0"></td>
        <td>Entwickler</td>
        <td width="23"><img src="include/images/articles/spieler.gif" alt="" border="0"></td>
        <td>Spieler</td>
        <td width="23"><img src="include/images/articles/technik.gif" alt="" border="0" /></td>
        <td>Technik</td>
        <td width="23"><img src="include/images/articles/weltenbau.gif" alt="" border="0"></td>
        <td>Weltenbau</td>
        <td width="23"><img src="include/images/articles/anim.gif" alt="" border="0"></td>
        <td>Animation</td>
        <td width="23"><img src="include/images/articles/gumps_art.gif" alt="" border="0"></td>
        <td>Gumps/Art</td>
      </tr>
    </table>';
             $design->footer();
    
    break;
    
    case 'show':
            $fid =$menu->getE(2);
            $erg = db_query("SELECT art_cat,art_viewed,art_votes,art_rating,art_title,art_kate,art_grp,art_uid,art_content,art_id,DATE_FORMAT(art_time,'%d.%m.%Y') as datum
                             FROM `prefix_artsys_articles` artsys LEFT JOIN `prefix_artsys_cats` ON id = art_cat
                             WHERE art_id = ".$fid." AND art_status = 1 AND (".$_SESSION['authright']." <= recht OR (art_cat = 0 AND recht IS NULL))");
    
            if (@db_num_rows($erg) !== 1) {
               $title = $allgAr['title'].'';
               $hmenu = '<a href="?articles"><font color="#FFFFFF">Tutorials - Anleitungen</font></a>';
               $design = new design ( $title , $hmenu );
               $design->header();
               echo 'Das Tutorial - Anleitung wurde nicht gefunden';
               $design->footer(1);
    
            }
    
            $row = db_fetch_assoc($erg);
    
            #-> umfrage einen hoch zaehlen ...
            if ($menu->getA(3) === 'z' AND is_numeric($menu->getE(3)) AND !isset($_SESSION['artDoVote'][$row['art_id']]) AND loggedin() ) {
               $_SESSION['artDoVote'][$row['art_id']] = 'o';
               $row['art_rating'] = round( ( ($row['art_rating'] * $row['art_votes'] ) + $menu->getE(3) ) / ( $row['art_votes'] + 1 ), 3);
               $row['art_votes']++;
               db_query("UPDATE prefix_artsys_articles SET art_rating = ".$row['art_rating'].", art_votes = ".$row['art_votes']." WHERE art_id = ".$fid);
            }
    
            #-> visits einen hoch zaehlen ...
            if (!isset ($_SESSION['artDoKlick'][$row['art_id']]) ) {
               $_SESSION['artDoKlick'][$row['art_id']] = 'o';
               db_query("UPDATE prefix_artsys_articles SET art_viewed = art_viewed +1 WHERE art_id = ".$fid);
            }
    
            #-> Kategorien-Pfad erstellen
            $cid = $row['art_cat'];
            $erg1 = db_query("SELECT id,cat,name FROM `prefix_artsys_cats` WHERE id = ".$cid);
            if (db_num_rows($erg1)>0){
               $row1 = db_fetch_assoc($erg1);
               $array = get_cats_array($row1['cat'],'');
               if (!empty($array)){
                  $titelzw = get_cats_title($array);
                  $namezw = get_cats_urls($array);
               }else{
                  $titelzw = '';
                  $namezw = '';
               }
               $cattitle = ':: '.$titelzw.$row1['name'].' :: '.$row['art_title'];
               $catname = '<b> &raquo; </b>'.$namezw.'<a href="?articles-'.$row1['id'].'">'.$row1['name'].'</a>'; //<b> &raquo; </b>'.$row['name'].' '.$row['version'];
            } else {
               $cattitle = '';
               $catname = '';
            }
    
            if ($menu->getA(2) === 'A'){
               #-> Artikel-Page setzen
               $art_page = ($menu->getA(3) === 'P'?$menu->getE(3):1);
    
               #-> Anz kommentare holen
               $comAnz= db_result(db_query("SELECT COUNT(ID) FROM `prefix_koms` WHERE uid = ".$row['art_id']." AND cat = 'ARTICLES'"),0);
    
               #-> Ausgabe
               $page = make_art_pages($row['art_content'],$art_page,$fid);
               $title = $allgAr['title'].'';
               $hmenu = '<a href="?articles"><font color="#FFFFFF">Tutorials - Anleitungen</font></a>'.$catname;
               $design = new design ( $title , $hmenu );
               $design->header();
               $tpl = new tpl ('articles' );
               $row['creater'] = get_n($row['art_uid']);
    
    		if ($row['art_kate']==1) {
    			$kate = '<img src="include/images/articles/entwickler.gif" alt="" border="0">';
    		}elseif($row['art_kate']==2) {
    			$kate = '<img src="include/images/articles/spieler.gif" alt="" border="0">';
    		}elseif($row['art_kate']==3) {
    			$kate = '<img src="include/images/articles/entwickler.gif" alt="" border="0"> <img src="include/images/articles/spieler.gif" alt="" border="0">';
    		}else{
    			$kate = '';
    		}
    		
    		if ($row['art_grp']==1) {
    			$grp = '<img src="include/images/articles/gumps_art.gif" alt="" border="0">';
    		}elseif($row['art_grp']==2) {
    			$grp = '<img src="include/images/articles/anim.gif" alt="" border="0">';
    		}elseif($row['art_grp']==3) {
    			$grp = '<img src="include/images/articles/weltenbau.gif" alt="" border="0">';
    		}elseif($row['art_grp']==4) {
    			$grp = '<img src="include/images/articles/technik.gif" alt="" border="0">';
    		}else{
    			$grp = '';
    		}	
    		
    		if ($row['art_kate']==1) {
    			$kate2 = 'Entwickler';
    		}elseif($row['art_kate']==2) {
    			$kate2 = 'Spieler';
    		}elseif($row['art_kate']==3) {
    			$kate2 = 'Entwickler/Spieler';
    		}else{
    			$kate2 = '';
    		}
    		
    		if ($row['art_grp']==1) {
    			$grp2 = 'Gumps/Art';
    		}elseif($row['art_grp']==2) {
    			$grp2 = 'Animation';
    		}elseif($row['art_grp']==3) {
    			$grp2 = 'Weltenbau';
    		}elseif($row['art_grp']==4) {
    			$grp2 = 'Technik';
    		}else{
    			$grp2 = '';
    		}		  
    		  
    		   $row['art_kate'] = $kate;
    		   $row['art_kate2'] = $kate2;
    		   $row['art_grp'] = $grp;
    		   $row['art_grp2'] = $grp2;
    		   $row['hits'] = $row['art_viewed'];
               $row['comOderShow'] = ' &nbsp;<a href="index.php?articles-show-C'.$row['art_id'].'">'.$comAnz.' '.$lang['comments'].'</a>';
               $row['art_title'] .= (($row['art_uid'] == $_SESSION['authid'] OR has_right(-9, 'articles'))?
                                    ' &nbsp;&nbsp;<a href="?articles-write-E'.$row['art_id'].'"><img border="0" src="include/images/icons/edit.gif" title="editieren" alt="editieren"></a>':'');
               $row['art_rating'] = show_vote_stats($row['art_rating']);
               show_vote($row['art_id']);//Vote ausgeben
               $tpl->set_ar_out($row,8);
               $tpl->set_ar_out($page,9);
               $tpl->out(13);
    
            }elseif($menu->getA(2) === 'C'){
    
               # kommentar add
               if (!empty($_POST['name']) AND !empty($_POST['text']) AND ($ArtsysArray['user_comment_right'] === 2 OR loggedin())) {
                       $_POST['text'] = escape($_POST['text'],'textarea');
                       $_POST['name'] = escape($_POST['name'],'string');
                       db_query("INSERT INTO `prefix_koms` VALUES ('',".$fid.",'ARTICLES','".$_POST['name']."','".$_POST['text']."')");
               }
    
               # kommentar loeschen
               if ($menu->getA(3) == 'd' AND is_numeric($menu->getE(3)) AND is_admin()) {
                       $kommentar_id = escape($menu->getE(3),'integer');
                       db_query("DELETE FROM `prefix_koms` WHERE uid = ".$fid." AND cat = 'ARTICLES' AND id = ".$kommentar_id);
               }
    
               #-> Ausgabe
               $title = $allgAr['title'].'';
               $hmenu = '<a href="?articles"><font color="#FFFFFF">Tutorials - Anleitungen</font></a>'.$catname;
               $design = new design ( $title , $hmenu );
               $design->header();
               $tpl = new tpl ('articles' );
               $row['creater'] = get_n($row['art_uid']);
               $row['comOderShow'] = ' &nbsp;<a href="?articles-show-A'.$row['art_id'].'">Tutorials - Anleitungen lesen</a>';
               $row['art_title'] .= (($row['art_uid'] == $_SESSION['authid'] OR has_right(-9, 'articles'))?' &nbsp;&nbsp;<a href="?articles-write-E'.$row['art_id'].'"><img border="0" src="include/images/icons/edit.gif" title="editieren" alt="editieren"></a>':'');
               $row['art_rating'] = show_vote_stats($row['art_rating']);
               show_vote($row['art_id'],'C');//Vote ausgeben
               $tpl->set_ar_out($row,8);
    
               #-> Kommentar insertfields
               if ($ArtsysArray['user_comment_right'] == 2 OR loggedin()){
                  $row_ins = array('uname'=>get_n($_SESSION['authid']),'art_id'=>$row['art_id']);
                  $tpl->set_ar_out($row_ins,10);
               }elseif($ArtsysArray['user_comment_right'] != 0){
                  $tpl->set_out('writeout','du musst eingelogt sein um einen Kommentare zu schreiben',11);
               }
               #-> kommentar show
    
               #->sortieren
               $felder = array('id');
               $row2 = artsys_sort_func($menu->get(3),escape($menu->get(4),'string'),$felder,'com_articles');
    		   $sort = $row2['sort'];
               unset($row2['sort']);
               #->sortieren ende
    
               //Seiten
               $erg2 = db_query("SELECT text, name, id FROM `prefix_koms` WHERE uid = ".$row['art_id']." AND cat = 'ARTICLES' ORDER BY $sort");
               $ergAnz1 = db_num_rows($erg2);
               $limit = $ArtsysArray['anzCom_perSite'];  // Limit
               $page = ($menu->getA(3) == 'p' ? $menu->getE(3) : 1 );
               $MPL = db_make_sites($page, "", $limit, '?articles-show-C'.$row['art_id'],"",$ergAnz1);
               $anfang = ($page - 1) * $limit;
    
               //Aussgabe
               $erg2 = db_query("SELECT text, name, id FROM `prefix_koms` WHERE uid = ".$row['art_id']." AND cat = 'ARTICLES' ORDER BY $sort LIMIT $anfang,$limit");
               if ( $ergAnz1 == 0 ) {
                  $tpl->set_out('writeout',$lang['nocomments'],11);
                  $tpl->out(13);
               }elseif($ArtsysArray['user_comment_right'] == 0 AND !loggedin()){
                  $tpl->set_out('writeout','du musst eingelogt sein um die Kommentare zu sehen, bzw. einen zu schreiben',11);
                  $tpl->out(13);
               }else{
                       echo '<tr><td class="Cnorm"><a href="index.php?articles-show-C'.$row['art_id'].'-sort-'.$row2['s0'].'">'.ucfirst(substr($row2['s0'],1)).' sortieren</a>&nbsp; <img src="include/images/icons/pfeil'.$row2['p0'].'.gif" border="0"></td></tr>';
    
                       $rtung = $row2['s0'];
                       $zahl = ($rtung == '0auf'?($ergAnz1-$anfang):($anfang + 1));
                       while ($row2 = db_fetch_assoc($erg2)) {
                               $row2['text'] = bbcode(trim($row2['text']));
                               if (is_admin()) {
                                   $row2['text'] .= '<a href="index.php?articles-show-C'.$row['art_id'].'-d'.$row2['id'].'"><img src="include/images/icons/del.gif" alt="l&ouml;schen" border="0" title="l&ouml;schen" /></a>';
                               }
                               $tpl->set_ar_out(array('name' => $row2['name'], 'text' => $row2['text'], 'zahl' => $zahl ),12);
                               ($rtung == '0auf'?$zahl--:$zahl++);
                       }
                       $tpl->out(13);
                       echo $MPL;
               }
               # kommentar show ende
            }else{
               $title = $allgAr['title'].'';
               $hmenu = '<a href="?articles"><font color="#FFFFFF">Tutorials - Anleitungen</font></a>';
               $design = new design ( $title , $hmenu );
               $design->header();
               echo 'Unbekannter Befehl';
            }
            $design->footer();
    
    break;
    
    case 'write':
         if (has_right(-9, 'articles') AND $ArtsysArray['hasright_thenAdmin'] == 1){
           $host  = $_SERVER['HTTP_HOST'];
           $uri   = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
           if($menu->getA(2) === 'E')
             header("Location: http://$host$uri/admin.php?articles-editArt-E".$menu->getE(2));
           else
             header("Location: http://$host$uri/admin.php?articles-newArt-C".$menu->getE(2));
           exit;
         }
    
         $title = $allgAr['title'].'';
         $hmenu = '<a href="?articles"><font color="#FFFFFF">Tutorials - Anleitungen</font></a><b> &raquo; </b>erstellen/&uuml;berarbeiten';
         $design = new design ( $title , $hmenu );
         $design->header();
    
         if($_SESSION['authright'] <= $ArtsysArray['write_right']){
            if ($menu->getA(2) === 'E'){
               if (!$row = @db_fetch_assoc(db_query('SELECT art_pos, art_id, art_cat, art_kate, art_grp, art_title, art_content, art_preview, art_uid, art_image, art_difficult FROM `prefix_artsys_articles` WHERE art_id = '.$menu->getE(2)))){
                  wd('?articles','Artikel ist nicht vorhanden',3);
                    $design->footer(1);
               }
               $row['mod_title'] = '';
            }else{
               $row = array('art_title'=>'', 'art_cat'=>$menu->getE(2), 'art_content'=>'', 'art_preview'=>'','art_id'=>'','art_image'=>'a897s','mod_title'=>'Neuer Artikel schreiben','art_uid'=>'','art_difficult'=>'');
            }
    
            if (isset($_POST['submit'])){#-> Artikel speichern oder updaten
               if (isset($_POST['artID']) AND $_POST['artID'] == $menu->getE(2)){#-> Artikel ändern
                  $insArr = array('txt'=>'txt','titel'=>'str','art_preview'=>'str','cat'=>'','kate'=>'','grp'=>'','artID'=>'','difficult'=>'');
                  $insert = escape_arrays($_POST,$insArr);
                  cat_exist_and_has_right($insert['cat'],$ArtsysArray['allow_defKat'],'front',$row['art_uid'],$row['art_cat']);#-> auf Recht prüfen
                  if ($row['art_cat'] <> $insert['cat']){#-> Schauen ob neue Kategorie
                     $pos = db_result(db_query("SELECT COUNT(*) FROM `prefix_artsys_articles` WHERE art_cat = ".$insert['cat']),0);
                     db_query("UPDATE `prefix_artsys_articles` SET art_pos = art_pos - 1 WHERE art_pos > ".$row['art_pos']." AND art_cat = ".$row['art_cat']);
                  }else{
                     $pos = $row['art_pos'];
                  }
    
                  db_query('UPDATE `prefix_artsys_articles` SET
                           art_status = 0,
                           art_cat = '.$insert['cat'].',
                           art_pos = '.$pos.',
                           art_title = "'.$insert['titel'].'",
                           art_kate = "'.$insert['kate'].'",
                           art_grp = "'.$insert['grp'].'",
                           art_content  = "'.$insert['txt'].'",
                           art_preview  = "'.$insert['art_preview'].'",
                           art_difficult = '.$insert['difficult'].'
                           WHERE art_id = '.$insert['artID'].' LIMIT 1');
                  $imageMsg = $ArtsysArray['vballow'] == 1?config_art_image($insert['artID']):'';
    
                  #-> Angaben für PM und Weiterleitung
                  $wd = array('pfad'=>'?articles'.($insert['cat'] == 0?'':'-'.$insert['cat']),'msg'=>'Tutorials - Anleitungen erfolgreich ge&auml;ndert');
                  $msg = "Tutorials - Anleitungen ".$row['art_title']." wurde ge&auml;ndert in: \n Titel: ".$insert['titel']." \n Kategorie: ";
                  $msg_titel = 'Tutorials - Anleitungen wurde editiert';
               }else{#-> Neuer Artikel einfügen
                  $insArr = array('txt'=>'txt','titel'=>'str','art_preview'=>'str','cat'=>'','kate'=>'','grp'=>'','difficult'=>'');
                  $insert = escape_arrays($_POST,$insArr);
                  cat_exist_and_has_right($insert['cat'],$ArtsysArray['allow_defKat'],'front');#-> auf Recht prüfen
                  $pos = db_result(db_query("SELECT COUNT(*) FROM `prefix_artsys_articles` WHERE art_cat = ".$insert['cat']),0);
                  db_query('INSERT INTO `prefix_artsys_articles` (art_uid,art_cat,art_pos,art_time,art_kate,art_grp,art_title,art_content,art_preview,art_difficult) VALUES
                            ('.$_SESSION['authid'].','.$insert['cat'].','.$pos.',NOW(),"'.$insert['kate'].'","'.$insert['grp'].'","'.$insert['titel'].'","'.$insert['txt'].'","'.$insert['art_preview'].'",'.$insert['difficult'].')');
    
                  $imageMsg = $ArtsysArray['vballow'] == 1?config_art_image(db_last_id()):'';
    
                  #-> Angaben für PM und Weiterleitung
                  $wd = array('pfad'=>'?articles'.($insert['cat'] == 0?'':'-'.$insert['cat']),'msg'=>'Artikel erfolgreich eingef&uuml;gt');
                  $msg = "Es wurde ein Tutorial - Anleitung eingetragen: \n \n Titel: ".$insert['titel']." \n Kategorie: ";
                  $msg_titel = 'Neues Tutorial - Anleitung';
               }
    
               if (!has_right(-9, 'articles')){
                  $row_art = db_fetch_assoc(db_query("SELECT pm,name FROM `prefix_artsys_cats` WHERE id = ".$insert['cat']));
                  if ($row_art['pm']<>0 OR ($ArtsysArray['allow_defKat']<>0 AND $ArtsysArray['defKat_uid']<>0)){
                     sendpm($_SESSION['authid'],$row_art['pm'],$msg_titel,$msg .= $row_art['name']." \n \n und wartet darauf freigeschaltet zu werden! \n\n Das Artikelmodul ;)");
                  }
               }
    
               wd($wd['pfad'],$wd['msg'].' <br> <br> '.$imageMsg,3);
            }else{
               if (isset($_POST['preview'])){#-> alles für die Vorschau aufbereiten
                  $art = array('txt'=>trim(escape($_POST['txt'],'textarea')),'pref'=>trim(escape($_POST['art_preview'],'textarea')),'titel'=>trim($_POST['titel']),'display'=>'');
                  $art['preview'] = MAT_for_priview(bbcode(unescape($art['txt'])),unescape($art['pref']));
                  $row['art_cat'] = escape($_POST['cat'],'integer');
                  $row['art_kate'] = escape($_POST['kate'],'integer');
                  $row['art_grp'] = escape($_POST['grp'],'integer');
                  $row['art_difficult'] = escape($_POST['difficult'],'integer');
               }else{
                  $art = array('txt'=>$row['art_content'],'pref'=>$row['art_preview'],'titel'=>$row['art_title'],'display'=>'style="display:none;"','preview'=>'');
               }
    
               cat_exist_and_has_right($row['art_cat'],$ArtsysArray['allow_defKat'],'front',$row['art_uid']);
    
               $tpl = new tpl ('articles_write' );
               $out = array('modul_titel' =>$row['mod_title'],
                            'show_preview'=>$art['preview'],
                            'art_txt'     =>escape_for_fields(unescape($art['txt'])),
                            'preview'      => escape_for_fields(unescape($art['pref'])),
                            'art_titel'   =>$art['titel'],
                            'display'     =>$art['display'],
                            'smilies'     =>getsmilies(),
                            'kat'         =>($menu->getA(2) <> 'E'?($row['art_cat'] <> 0?'-'.$row['art_cat']:''):'-show-A'.$menu->getE(2)),
                            'cat_list'    =>($ArtsysArray['allow_defKat']<>0?'<option value="0">Bitte auswählen</option>':'').dblistee($row['art_cat'],"SELECT id,name FROM `prefix_artsys_cats` WHERE (recht >= ".$_SESSION['authright']." AND schreibr = 1) OR id = ".$row['art_cat']." ORDER BY name ASC"),
                            'kate_list'   =>($ArtsysArray['allow_defKat']<>0?'<option value="0">Bitte auswählen</option>':'').dblistee($row['art_kate'],"SELECT id,name FROM `prefix_artsys_kate` WHERE (recht >= ".$_SESSION['authright']." AND schreibr = 1) OR id = ".$row['art_cat']." ORDER BY name DESC"),
                            'grp_list'   =>($ArtsysArray['allow_defKat']<>0?'<option value="0">Bitte auswählen</option>':'').dblistee($row['art_grp'],"SELECT id,name FROM `prefix_artsys_grp` WHERE (recht >= ".$_SESSION['authright']." AND schreibr = 1) OR id = ".$row['art_cat']." ORDER BY name ASC"),
                            'artID'       =>($row['art_id']<>''?'<input type="hidden" name="artID" value="'.$row['art_id'].'" />':''),
                            'text_cols'   =>$ArtsysArray['frontend_textarea_cols'],
                            'text_rows'   =>$ArtsysArray['frontend_textarea_rows'],
                            'TXTL'        =>$ArtsysArray['frontend_textarea_min_lenge'],
                            'art_image_upload'   => ($ArtsysArray['vballow'] == 1?html_art_image($row['art_image']):""),
                            'art_difficult'=>html_art_diff($row['art_difficult'],"'front'"),
                            );
    
               $tpl->set_ar_out($out,0);
            }
    
         }else{wd('?articles','Keine Berechtigung',3);}
         $design->footer();
    
    break;
    
    case 'search':
         $suche = '';
         if (isset($_POST['search'])){
            $suche = $_POST['search_after'].$_POST['search'];
         }elseif (!empty($_GET['articles-search'])){
            $suche = $_GET['articles-search'];
         }
    
         $sucheNach = substr($suche,0,1);
         $suche = stripslashes(escape(substr($suche,1), 'string'));
         $title = $allgAr['title'].'';
         $hmenu  = '<a href="?articles"><font color="#FFFFFF">Tutorials - Anleitungen</font></a><b> &raquo; </b><a href="index.php?articles-search"><font color="#FFFFFF">Suchen</font></a>'.(!empty($suche)?'<b> &raquo; </b> nach: '.htmlentities($suche):"");
         $design = new design ( $title , $hmenu );
         $design->header();
    
    	echo '<table width="100%" border="0" cellspacing="1" cellpadding="4"><tr><th colspan="2"><div align="left"><b>&raquo;<u>Tutorials - Anleitungen</u></b></div></th></tr></table>';
    
         $tpl = new tpl ('articles_write');
         $out = array(
           'search'=>$suche,
           'a_title'=> (isset($_REQUEST['after_title'])?'checked="checked"':""),
           'a_preview'=> (isset($_REQUEST['after_preview'])?'checked="checked"':""),
           'a_txt'=> (isset($_REQUEST['after_txt'])?'checked="checked"':""),
         );
    
         $tpl->set_ar_out($out,1);
    
         if (!empty($suche)){
    
            #-> Seiten einteilung
            $page = 1;
            $limit = 25;  // Limit
            if (isset($_GET['page'])) {
               $page = trim(str_replace('-p','',$_GET['page']));
            }
            $anfang = ($page - 1) * $limit;
            #-> Seiten einteilung Ende
    
            $x = time() - (3600 * 24 * 360);
            if ($sucheNach == '1' AND $uid = @db_result(db_query("SELECT id FROM prefix_user WHERE name = BINARY '".$suche."'"),0)){// Nach Autor suchen
               $sucheSql = "art_uid = $uid AND ";
               $sucheSucc = true;
            }else{ //Text suche
               echo $sucheNach ==  '1'?"<span style='color:#FF0000; background:#000000;'>User '$suche' wurde nicht gefunden </span>":"";
               $suche = str_replace('-','',$suche);
               $suche = str_replace('=','',$suche);
               $suche = str_replace('&','',$suche);
               $searar = explode(' ', $suche);
               $sucheSql = '';
    
               foreach($searar as $elem) {
                  $str = str_replace('\'','',$elem);
                  $str = str_replace('"','',$str);
                  $str = addslashes($str);
    
                  if (!empty($str)) {
                     $sucheSqlTeil = '';
                     $sucheSqlTeil .= (isset($_REQUEST['after_title'])?" art_title LIKE '%$str%' OR ":"");
                     $sucheSqlTeil .= (isset($_REQUEST['after_preview'])?" art_preview LIKE '%$str%' OR ":"");
                     $sucheSqlTeil .= (isset($_REQUEST['after_txt'])?" art_content LIKE '%$str%' OR ":"");
                     $sucheSql .= ($sucheSqlTeil <> ''?" ( $sucheSqlTeil 1 = 2 ) AND ":" ");
                  }
               }
            }
    
            $sql = "SELECT DISTINCT art_id, art_title as titel FROM `prefix_artsys_articles` artsys LEFT JOIN `prefix_artsys_cats` ON id = art_cat
                   WHERE ($sucheSql 1 = 1) AND (art_time >= $x) AND art_status = 1 AND (".$_SESSION['authright']." <= recht OR (art_cat = 0 AND recht IS NULL)) ORDER BY art_time DESC";
            $sAnz = db_num_rows(db_query($sql));
    
            if ((($sucheNach == '1' AND isset($sucheSucc)) OR $sucheNach == '0') AND $sAnz > 0){
               $tpl->set('sAnz',$sAnz);
               $url = '';
               $url .= (isset($_REQUEST['after_title'])?"&amp;after_title=1":"");
               $url .= (isset($_REQUEST['after_preview'])?"&amp;after_preview=1":"");
               $url .= (isset($_REQUEST['after_txt'])?"&amp;after_txt=1":"");
               $tpl->set_out('MPL',$MPL = db_make_sites ($page , "" , $limit , 'index.php?articles-search='.urlencode($suche).$url.'&amp;page=' , "", $sAnz),2);
    
               echo $sucheNach == 1 ? ($sAnz > 1?'Folgende Tutorials - Anleitungen':'Folgendes Tutorial - Anleitung')." wurden von $suche geschrieben:":"'$suche' wurde in ".($sAnz > 1?'folgenden Tutorials - Anleitungen':'folgendem Tutorials - Anleitungen')." gefunden:";
    
               echo "\n <br><br> \n";
    
               $sql .= " LIMIT ".$anfang.",".$limit;
               $erg = db_query($sql) or die(mysql_error());
               $class = '';
               WHILE($row = db_fetch_assoc($erg)){
                  $class = ($class == 'Cmite' ? 'Cnorm' : 'Cmite' );
                  $row['class'] = $class;
                  if ($sucheNach == '1'){
                     $row['titel'] = $suche.' || '.$row['titel'];
                  }
                  $tpl->set_ar_out($row,3);
               }
    
               $tpl->out(4);
            }elseif($sucheNach == '0'){
               echo "es wurden keine Tutorials - Anleitungen gefunden";
            }
         }
    
         $design->footer();
    
    break;
    }
    
    ?>



    Zuletzt modifiziert von Siggi am 30.01.2013 - 11:28:34
    0 Mitglieder finden den Beitrag gut.
  2. #2
    User Pic
    Rock@wulf Hall Of Fame
    Registriert seit
    03.06.2004
    Beiträge
    3.282
    Beitragswertungen
    239 Beitragspunkte
    hast du mal einen link wo man sich ansehen kann wie das funktioniert/funktionieren soll
    Meine Postings repräsentieren meine Meinung wenn nicht anders gekennzeichnet.
    MFG Rock@wulf
    0 Mitglieder finden den Beitrag gut.
  3. #3
    User Pic
    Siggi Hall Of Fame
    Registriert seit
    08.02.2007
    Beiträge
    6.558
    Beitragswertungen
    327 Beitragspunkte
    Jub Link

    öhm wie man in der articles.htm sieht bzw auf der Seite das ich kommi schon drunter gemacht habe aber wie ich es in der php halt änder das er mir dies richtig anzeigt.

    Denke ja schon das es an den explode und tpl out liegt aber meine versuche scheiterten irgendwie
    0 Mitglieder finden den Beitrag gut.
  4. #4
    User Pic
    Rock@wulf Hall Of Fame
    Registriert seit
    03.06.2004
    Beiträge
    3.282
    Beitragswertungen
    239 Beitragspunkte
    na da hab ich was:

    externer Link
    Meine Postings repräsentieren meine Meinung wenn nicht anders gekennzeichnet.
    MFG Rock@wulf
    0 Mitglieder finden den Beitrag gut.
  5. #5
    User Pic
    Siggi Hall Of Fame
    Registriert seit
    08.02.2007
    Beiträge
    6.558
    Beitragswertungen
    327 Beitragspunkte
    Ja das kenn ich ja und den vorgang eigentlich auch zwinker ist ja nicht so das ich es nicht probiert hätte zunge

    Aber ich blicke bei der .php einfach nicht mehr durch und auch obwohl ich das tpl out änder von 13 auf 9 zb passiert nix
    0 Mitglieder finden den Beitrag gut.
  6. #6
    User Pic
    Rock@wulf Hall Of Fame
    Registriert seit
    03.06.2004
    Beiträge
    3.282
    Beitragswertungen
    239 Beitragspunkte
    orginal dateien bitte
    Meine Postings repräsentieren meine Meinung wenn nicht anders gekennzeichnet.
    MFG Rock@wulf
    0 Mitglieder finden den Beitrag gut.
  7. #7
    User Pic
    Siggi Hall Of Fame
    Registriert seit
    08.02.2007
    Beiträge
    6.558
    Beitragswertungen
    327 Beitragspunkte
    Sollte dies hier sein. ->> Artikelsys_1.2.1.zip
    0 Mitglieder finden den Beitrag gut.
  8. #8
    User Pic
    Rock@wulf Hall Of Fame
    Registriert seit
    03.06.2004
    Beiträge
    3.282
    Beitragswertungen
    239 Beitragspunkte
    damit hilfst du mir nicht ich brauch den quell code hier im forum sonst kann ich dir nicht helfen
    Meine Postings repräsentieren meine Meinung wenn nicht anders gekennzeichnet.
    MFG Rock@wulf
    0 Mitglieder finden den Beitrag gut.
  9. #9
    User Pic
    Siggi Hall Of Fame
    Registriert seit
    08.02.2007
    Beiträge
    6.558
    Beitragswertungen
    327 Beitragspunkte
    Okay hier quellcode von originalen datein

    articles.php
    <?php 
    #   Copyright by: Manuel Staechele
    #   Edit by: Nero
    #   Support: www.ilch.de
    
    
    defined ('main') or die ( 'no direct access' );
    
    //PHP datei mit den funktionen laden
    require_once('include/includes/func/articles.php');
    
    
    switch(escape($menu->get(1),'string')){
    default:
             #-> Kategorien-Pfad erstellen
             $cid = ( $menu->get(1) ? escape($menu->get(1), 'integer') : 0 );
             $erg = db_query("SELECT cat,name,schreibr FROM `prefix_artsys_cats` WHERE id = ".$cid." AND recht >= ".$_SESSION['authright']." ORDER BY pos");
             if (db_num_rows($erg) > 0) {
                $row = db_fetch_assoc($erg);
                $array = get_cats_array($row['cat'],'');
                if (!empty($array) ) {
                   $titelzw = get_cats_title($array);
                   $namezw = get_cats_urls($array);
                } else {
                   $titelzw = '';
                   $namezw = '';
                }
                $cattitle = ':: '.$titelzw.$row['name'];
                $catname = '<b> &raquo; </b>'.$namezw.$row['name'];
             } else {
                if ($cid <> 0) {
                   $title = $allgAr['title'].' :: Artikeln ';
                   $hmenu = '<a class="smalfont" href="?articles">Artikeln</a>';
                   $design = new design ( $title , $hmenu );
                   $design->header();
                   echo 'Die Kategorie wurde nicht gefunden';
                   $design->footer(1);
                }
                $cattitle = '';
                $catname = '';
             }
             $schreibrecht = $row['schreibr'];
             #-> Ausgabe
             $title = $allgAr['title'].' :: Artikeln '.$cattitle;
             $hmenu = '<a class="smalfont" href="?articles">Artikeln</a>'.$catname;
             $design = new design ( $title , $hmenu );
             $design->header();
             $tpl = new tpl ('articles' );
             $tpl->out(0);
             $tpl->set('cid', $cid);
             $erg = db_query("SELECT id,name,`desc` FROM `prefix_artsys_cats` WHERE cat = ".$cid." AND recht >= ".$_SESSION['authright']." ORDER BY pos");
             if ( db_num_rows($erg) > 0 ) {
                $tpl->out(1); $class = 'Cnorm';
                while ($row = db_fetch_assoc($erg) ) {
                   $row['anzArt'] = count_art($row['id']);
                   $class = ($class == 'Cmite' ? 'Cnorm' : 'Cmite');
                   $row['class'] = $class;
                   $tpl->set_ar_out($row,2);
                }
                $tpl->out(3);
             }
             #->sortieren
             $felder = array('art_pos','art_viewed','art_time');
             $row = artsys_sort_func($menu->get(2),escape($menu->get(3),'string'),$felder,'list_articles');
             $sort = $row['sort'];
             unset($row['sort']);
             #->sortieren ende
             //Seiten
             $limit = $ArtsysArray['anzArt_perSite'];  // Limit
             $page = ($menu->getA(2) == 'p' ? $menu->getE(2) : 1 );
             $MPL = db_make_sites($page, " WHERE art_cat = ".$cid." AND art_status = 1 ", $limit, '?articles-'.$cid, 'artsys_articles');
             $anfang = ($page - 1) * $limit;
             //Aussgabe
             $erg = db_query("SELECT art_id,art_title,art_preview,art_rating,art_image,art_difficult,art_uid,art_viewed,DATE_FORMAT(art_time,'%d.%m.%Y') as datum from `prefix_artsys_articles` WHERE art_cat = ".$cid." AND art_status = 1 ORDER BY $sort LIMIT $anfang, $limit");
             $anz_art = db_num_rows($erg);
             (($anz_art > 0 OR $cid<>0) ? $tpl->set_ar_out($row,4):'');
             if ( $anz_art > 0 ) {
                $class = 'Cnorm';
                while($row = db_fetch_assoc($erg) ) {
                   $class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' );
                   $row['class'] = $class;
                   $row['art_preview'] = bbcode($row['art_preview']);
                   $row['vorschau'] = '';
                   $row['float'] = '';
                   if ($row['art_image'] <> "" AND file_exists($row['art_image'])){
                       $row['vorschau'] = '<a href="index.php?articles-show-A'.$row['art_id'].'"><img src="'.$row['art_image'].'" alt="'.$row['art_title'].'" title="'.$row['art_title'].'" style="border: medium none ; float: left; padding-right: 5px;"></a>';
                   }
                   artsys_hexToRgb(array($ArtsysArray['diff_bgcolor'],$ArtsysArray['diff_color'],$ArtsysArray['diff_nonecolor']),'diff');
                   $row['art_difficult'] = ($row['art_difficult'] > 0?'Schwierigkeit : <img src="include/images/articles/art_diff_image.php?d='.$row['art_difficult'].'" alt="'.$ArtsysArray['diff'][$row['art_difficult']].'" title="'.$ArtsysArray['diff'][$row['art_difficult']].'" ><br />':'');
                   $row['art_rating'] = show_vote_stats($row['art_rating']);
                   $row['username'] = get_n($row['art_uid']);
                   $tpl->set_ar_out($row,5);
                }
             }else{
                echo ($cid<>0?'<tr><td colspan="3" class="Cnorm">Kein Artikel vorhanden</td></tr>':'');
             }
             (((($anz_art > 0 AND $ArtsysArray['allow_defKat'] <> 0)OR $cid<>0) AND $schreibrecht == 1 )?$tpl->set_out('new_art_cat',($cid<>0?"-C$cid":""),6):'');
             (($anz_art > 0 OR $cid<>0)?$tpl->out(7):"");
             echo $MPL;
             $design->footer();
    break;
    case 'show':
            $fid =$menu->getE(2);
            $erg = db_query("SELECT art_cat,art_viewed,art_votes,art_rating,art_title,art_uid,art_content,art_id,DATE_FORMAT(art_time,'%d.%m.%Y') as datum
                             FROM `prefix_artsys_articles` artsys LEFT JOIN `prefix_artsys_cats` ON id = art_cat
                             WHERE art_id = ".$fid." AND art_status = 1 AND (".$_SESSION['authright']." <= recht OR (art_cat = 0 AND recht IS NULL))");
            if (@db_num_rows($erg) !== 1) {
               $title = $allgAr['title'].' :: Artikeln ';
               $hmenu = '<a class="smalfont" href="?articles">Artikeln</a>';
               $design = new design ( $title , $hmenu );
               $design->header();
               echo 'Der Artikel wurde nicht gefunden';
               $design->footer(1);
            }
            $row = db_fetch_assoc($erg);
            #-> umfrage einen hoch zaehlen ...
            if ($menu->getA(3) === 'z' AND is_numeric($menu->getE(3)) AND !isset($_SESSION['artDoVote'][$row['art_id']]) AND loggedin() ) {
               $_SESSION['artDoVote'][$row['art_id']] = 'o';
               $row['art_rating'] = round( ( ($row['art_rating'] * $row['art_votes'] ) + $menu->getE(3) ) / ( $row['art_votes'] + 1 ), 3);
               $row['art_votes']++;
               db_query("UPDATE prefix_artsys_articles SET art_rating = ".$row['art_rating'].", art_votes = ".$row['art_votes']." WHERE art_id = ".$fid);
            }
            #-> visits einen hoch zaehlen ...
            if (!isset ($_SESSION['artDoKlick'][$row['art_id']]) ) {
               $_SESSION['artDoKlick'][$row['art_id']] = 'o';
               db_query("UPDATE prefix_artsys_articles SET art_viewed = art_viewed +1 WHERE art_id = ".$fid);
            }
            #-> Kategorien-Pfad erstellen
            $cid = $row['art_cat'];
            $erg1 = db_query("SELECT id,cat,name FROM `prefix_artsys_cats` WHERE id = ".$cid);
            if (db_num_rows($erg1)>0){
               $row1 = db_fetch_assoc($erg1);
               $array = get_cats_array($row1['cat'],'');
               if (!empty($array)){
                  $titelzw = get_cats_title($array);
                  $namezw = get_cats_urls($array);
               }else{
                  $titelzw = '';
                  $namezw = '';
               }
               $cattitle = ':: '.$titelzw.$row1['name'].' :: '.$row['art_title'];
               $catname = '<b> &raquo; </b>'.$namezw.'<a class="smalfont" href="?articles-'.$row1['id'].'">'.$row1['name'].'</a>'; //<b> &raquo; </b>'.$row['name'].' '.$row['version'];
            } else {
               $cattitle = '';
               $catname = '';
            }
            if ($menu->getA(2) === 'A'){
               #-> Artikel-Page setzen
               $art_page = ($menu->getA(3) === 'P'?$menu->getE(3):1);
               #-> Anz kommentare holen
               $comAnz= db_result(db_query("SELECT COUNT(ID) FROM `prefix_koms` WHERE uid = ".$row['art_id']." AND cat = 'ARTICLES'"),0);
               #-> Ausgabe
               $page = make_art_pages($row['art_content'],$art_page,$fid);
               $title = $allgAr['title'].' :: Artikeln '.$cattitle;
               $hmenu = '<a class="smalfont" href="?articles">Artikeln</a>'.$catname;
               $design = new design ( $title , $hmenu );
                       $design->header();
               $tpl = new tpl ('articles' );
               $row['creater'] = get_n($row['art_uid']);
               $row['comOderShow'] = ' &nbsp;<a href="index.php?articles-show-C'.$row['art_id'].'">'.$comAnz.' '.$lang['comments'].'</a>';
               $row['art_title'] .= (($row['art_uid'] == $_SESSION['authid'] OR has_right(-9, 'articles'))?
                                    ' &nbsp;&nbsp;<a href="?articles-write-E'.$row['art_id'].'"><img border="0" src="include/images/icons/edit.gif" title="editieren" alt="editieren"></a>':'');
               $row['art_rating'] = show_vote_stats($row['art_rating']);
               show_vote($row['art_id']);//Vote ausgeben
               $tpl->set_ar_out($row,8);
               $tpl->set_ar_out($page,9);
               $tpl->out(13);
            }elseif($menu->getA(2) === 'C'){
               # kommentar add
               if (!empty($_POST['name']) AND !empty($_POST['text']) AND ($ArtsysArray['user_comment_right'] === 2 OR loggedin())) {
                       $_POST['text'] = escape($_POST['text'],'textarea');
                       $_POST['name'] = escape($_POST['name'],'string');
                       db_query("INSERT INTO `prefix_koms` VALUES ('',".$fid.",'ARTICLES','".$_POST['name']."','".$_POST['text']."')");
               }
               # kommentar loeschen
               if ($menu->getA(3) == 'd' AND is_numeric($menu->getE(3)) AND is_admin()) {
                       $kommentar_id = escape($menu->getE(3),'integer');
                       db_query("DELETE FROM `prefix_koms` WHERE uid = ".$fid." AND cat = 'ARTICLES' AND id = ".$kommentar_id);
               }
               #-> Ausgabe
               $title = $allgAr['title'].' :: Artikeln '.$cattitle;
               $hmenu = '<a class="smalfont" href="?articles">Artikeln</a>'.$catname;
               $design = new design ( $title , $hmenu );
               $design->header();
               $tpl = new tpl ('articles' );
               $row['creater'] = get_n($row['art_uid']);
               $row['comOderShow'] = ' &nbsp;<a href="?articles-show-A'.$row['art_id'].'">Artikel lesen</a>';
               $row['art_title'] .= (($row['art_uid'] == $_SESSION['authid'] OR has_right(-9, 'articles'))?
                                    ' &nbsp;&nbsp;<a href="?articles-write-E'.$row['art_id'].'"><img border="0" src="include/images/icons/edit.gif" title="editieren" alt="editieren"></a>':'');
               $row['art_rating'] = show_vote_stats($row['art_rating']);
               show_vote($row['art_id'],'C');//Vote ausgeben
               $tpl->set_ar_out($row,8);
               #-> Kommentar insertfields
               if ($ArtsysArray['user_comment_right'] == 2 OR loggedin()){
                  $row_ins = array('uname'=>get_n($_SESSION['authid']),'art_id'=>$row['art_id']);
                  $tpl->set_ar_out($row_ins,10);
               }elseif($ArtsysArray['user_comment_right'] != 0){
                  $tpl->set_out('writeout','du musst eingelogt sein um einen Kommentare zu schreiben',11);
               }
               #-> kommentar show
               #->sortieren
               $felder = array('id');
               $row2 = artsys_sort_func($menu->get(3),escape($menu->get(4),'string'),$felder,'com_articles');
               $sort = $row2['sort'];
               unset($row2['sort']);
               #->sortieren ende
               //Seiten
               $erg2 = db_query("SELECT text, name, id FROM `prefix_koms` WHERE uid = ".$row['art_id']." AND cat = 'ARTICLES' ORDER BY $sort");
               $ergAnz1 = db_num_rows($erg2);
               $limit = $ArtsysArray['anzCom_perSite'];  // Limit
               $page = ($menu->getA(3) == 'p' ? $menu->getE(3) : 1 );
               $MPL = db_make_sites($page, "", $limit, '?articles-show-C'.$row['art_id'],"",$ergAnz1);
               $anfang = ($page - 1) * $limit;
               //Aussgabe
               $erg2 = db_query("SELECT text, name, id FROM `prefix_koms` WHERE uid = ".$row['art_id']." AND cat = 'ARTICLES' ORDER BY $sort LIMIT $anfang,$limit");
               if ( $ergAnz1 == 0 ) {
                  $tpl->set_out('writeout',$lang['nocomments'],11);
                  $tpl->out(13);
               }elseif($ArtsysArray['user_comment_right'] == 0 AND !loggedin()){
                  $tpl->set_out('writeout','du musst eingelogt sein um die Kommentare zu sehen, bzw. einen zu schreiben',11);
                  $tpl->out(13);
               }else{
                       echo '<tr><td class="Cnorm"><a href="index.php?articles-show-C'.$row['art_id'].'-sort-'.$row2['s0'].'">'.ucfirst(substr($row2['s0'],1)).' sortieren</a>&nbsp; <img src="include/images/icons/pfeil'.$row2['p0'].'.gif" border="0"></td></tr>';
                       $rtung = $row2['s0'];
                       $zahl = ($rtung == '0auf'?($ergAnz1-$anfang):($anfang + 1));
                       while ($row2 = db_fetch_assoc($erg2)) {
                               $row2['text'] = bbcode(trim($row2['text']));
                               if (is_admin()) {
                                   $row2['text'] .= '<a href="index.php?articles-show-C'.$row['art_id'].'-d'.$row2['id'].'"><img src="include/images/icons/del.gif" alt="l&ouml;schen" border="0" title="l&ouml;schen" /></a>';
                               }
                               $tpl->set_ar_out(array('name' => $row2['name'], 'text' => $row2['text'], 'zahl' => $zahl ),12);
                               ($rtung == '0auf'?$zahl--:$zahl++);
                       }
                       $tpl->out(13);
                       echo $MPL;
               }
               # kommentar show ende
            }else{
               $title = $allgAr['title'].' :: Artikeln ';
               $hmenu = '<a class="smalfont" href="?articles">Artikeln</a>';
               $design = new design ( $title , $hmenu );
               $design->header();
               echo 'Unbekannter Befehl';
            }
            $design->footer();
    break;
    case 'write':
         if (has_right(-9, 'articles') AND $ArtsysArray['hasright_thenAdmin'] == 1){
           $host  = $_SERVER['HTTP_HOST'];
           $uri   = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
           if($menu->getA(2) === 'E')
             header("Location: http://$host$uri/admin.php?articles-editArt-E".$menu->getE(2));
           else
             header("Location: http://$host$uri/admin.php?articles-newArt-C".$menu->getE(2));
           exit;
         }
         $title = $allgAr['title'].' :: Artikeln :: erstellen/&uuml;berarbeiten';
         $hmenu = '<a class="smalfont" href="?articles">Artikeln</a><b> &raquo; </b>erstellen/&uuml;berarbeiten';
         $design = new design ( $title , $hmenu );
         $design->header();
         if($_SESSION['authright'] <= $ArtsysArray['write_right']){
            if ($menu->getA(2) === 'E'){
               if (!$row = @db_fetch_assoc(db_query('SELECT art_pos, art_id, art_cat, art_title, art_content, art_preview, art_uid, art_image, art_difficult FROM `prefix_artsys_articles` WHERE art_id = '.$menu->getE(2)))){
                  wd('?articles','Artikel ist nicht vorhanden',3);
                    $design->footer(1);
               }
               $row['mod_title'] = 'Artikel editieren';
            }else{
               $row = array('art_title'=>'', 'art_cat'=>$menu->getE(2), 'art_content'=>'', 'art_preview'=>'','art_id'=>'','art_image'=>'a897s','mod_title'=>'Neuer Artikel schreiben','art_uid'=>'','art_difficult'=>'');
            }
            if (isset($_POST['submit'])){#-> Artikel speichern oder updaten
               if (isset($_POST['artID']) AND $_POST['artID'] == $menu->getE(2)){#-> Artikel ändern
                  $insArr = array('txt'=>'txt','titel'=>'str','art_preview'=>'str','cat'=>'','artID'=>'','difficult'=>'');
                  $insert = escape_arrays($_POST,$insArr);
                  cat_exist_and_has_right($insert['cat'],$ArtsysArray['allow_defKat'],'front',$row['art_uid'],$row['art_cat']);#-> auf Recht prüfen
                  if ($row['art_cat'] <> $insert['cat']){#-> Schauen ob neue Kategorie
                     $pos = db_result(db_query("SELECT COUNT(*) FROM `prefix_artsys_articles` WHERE art_cat = ".$insert['cat']),0);
                     db_query("UPDATE `prefix_artsys_articles` SET art_pos = art_pos - 1 WHERE art_pos > ".$row['art_pos']." AND art_cat = ".$row['art_cat']);
                  }else{
                     $pos = $row['art_pos'];
                  }
                  db_query('UPDATE `prefix_artsys_articles` SET
                           art_status = 0,
                           art_cat = '.$insert['cat'].',
                           art_pos = '.$pos.',
                           art_title = "'.$insert['titel'].'",
                           art_content  = "'.$insert['txt'].'",
                           art_preview  = "'.$insert['art_preview'].'",
                           art_difficult = '.$insert['difficult'].'
                           WHERE art_id = '.$insert['artID'].' LIMIT 1');
                  $imageMsg = $ArtsysArray['vballow'] == 1?config_art_image($insert['artID']):'';
                  #-> Angaben für PM und Weiterleitung
                  $wd = array('pfad'=>'?articles'.($insert['cat'] == 0?'':'-'.$insert['cat']),'msg'=>'Artikel erfolgreich ge&auml;ndert');
                  $msg = "Artikel ".$row['art_title']." wurde ge&auml;ndert in: \n Titel: ".$insert['titel']." \n Kategorie: ";
                  $msg_titel = 'Artikel wurde editiert';
               }else{#-> Neuer Artikel einfügen
                  $insArr = array('txt'=>'txt','titel'=>'str','art_preview'=>'str','cat'=>'','difficult'=>'');
                  $insert = escape_arrays($_POST,$insArr);
                  cat_exist_and_has_right($insert['cat'],$ArtsysArray['allow_defKat'],'front');#-> auf Recht prüfen
                  $pos = db_result(db_query("SELECT COUNT(*) FROM `prefix_artsys_articles` WHERE art_cat = ".$insert['cat']),0);
                  db_query('INSERT INTO `prefix_artsys_articles` (art_uid,art_cat,art_pos,art_time,art_title,art_content,art_preview,art_difficult) VALUES
                            ('.$_SESSION['authid'].','.$insert['cat'].','.$pos.',NOW(),"'.$insert['titel'].'","'.$insert['txt'].'","'.$insert['art_preview'].'",'.$insert['difficult'].')');
                  $imageMsg = $ArtsysArray['vballow'] == 1?config_art_image(db_last_id()):'';
                  #-> Angaben für PM und Weiterleitung
                  $wd = array('pfad'=>'?articles'.($insert['cat'] == 0?'':'-'.$insert['cat']),'msg'=>'Artikel erfolgreich eingef&uuml;gt');
                  $msg = "Es wurde ein neuer Artikel eingetragen: \n \n Titel: ".$insert['titel']." \n Kategorie: ";
                  $msg_titel = 'Neuer Artikel';
               }
    
               if (!has_right(-9, 'articles')){
                  $row_art = db_fetch_assoc(db_query("SELECT pm,name FROM `prefix_artsys_cats` WHERE id = ".$insert['cat']));
                  if ($row_art['pm']<>0 OR ($ArtsysArray['allow_defKat']<>0 AND $ArtsysArray['defKat_uid']<>0)){
                     sendpm($_SESSION['authid'],$row_art['pm'],$msg_titel,$msg .= $row_art['name']." \n \n und wartet darauf freigeschaltet zu werden! \n\n Das Artikelmodul ;)");
                  }
               }
               wd($wd['pfad'],$wd['msg'].' <br> <br> '.$imageMsg,3);
            }else{
               if (isset($_POST['preview'])){#-> alles für die Vorschau aufbereiten
                  $art = array('txt'=>trim(escape($_POST['txt'],'textarea')),'pref'=>trim(escape($_POST['art_preview'],'textarea')),'titel'=>trim($_POST['titel']),'display'=>'');
                  $art['preview'] = MAT_for_priview(bbcode(unescape($art['txt'])),unescape($art['pref']));
                  $row['art_cat'] = escape($_POST['cat'],'integer');
                  $row['art_difficult'] = escape($_POST['difficult'],'integer');
               }else{
                  $art = array('txt'=>$row['art_content'],'pref'=>$row['art_preview'],'titel'=>$row['art_title'],'display'=>'style="display:none;"','preview'=>'');
               }
               cat_exist_and_has_right($row['art_cat'],$ArtsysArray['allow_defKat'],'front',$row['art_uid']);
               $tpl = new tpl ('articles_write' );
               $out = array('modul_titel' =>$row['mod_title'],
                            'show_preview'=>$art['preview'],
                            'art_txt'     =>escape_for_fields(unescape($art['txt'])),
                            'preview'      => escape_for_fields(unescape($art['pref'])),
                            'art_titel'   =>$art['titel'],
                            'display'     =>$art['display'],
                            'smilies'     =>getsmilies(),
                            'kat'         =>($menu->getA(2) <> 'E'?($row['art_cat'] <> 0?'-'.$row['art_cat']:''):'-show-A'.$menu->getE(2)),
                            'cat_list'    =>($ArtsysArray['allow_defKat']<>0?'<option value="0">Keine</option>':'').dblistee($row['art_cat'],"SELECT id,name FROM `prefix_artsys_cats` WHERE (recht >= ".$_SESSION['authright']." AND schreibr = 1) OR id = ".$row['art_cat']." ORDER BY name ASC"),
                            'artID'       =>($row['art_id']<>''?'<input type="hidden" name="artID" value="'.$row['art_id'].'" />':''),
                            'text_cols'   =>$ArtsysArray['frontend_textarea_cols'],
                            'text_rows'   =>$ArtsysArray['frontend_textarea_rows'],
                            'TXTL'        =>$ArtsysArray['frontend_textarea_min_lenge'],
                            'art_image_upload'   => ($ArtsysArray['vballow'] == 1?html_art_image($row['art_image']):""),
                            'art_difficult'=>html_art_diff($row['art_difficult'],"'front'"),
                            );
               $tpl->set_ar_out($out,0);
            }
         }else{wd('?articles','Keine Berechtigung',3);}
         $design->footer();
    break;
    case 'search':
    
         $suche = '';
         if (isset($_POST['search'])){
            $suche = $_POST['search_after'].$_POST['search'];
         }elseif (!empty($_GET['articles-search'])){
            $suche = $_GET['articles-search'];
         }
         $sucheNach = substr($suche,0,1);
         $suche = stripslashes(escape(substr($suche,1), 'string'));
         
         $title = $allgAr['title'].' :: Artikeln :: Suchen '.(!empty($suche)?':: nach: '.htmlentities($suche):"");
         $hmenu  = '<a class="smalfont" href="?articles">Artikeln</a><b> &raquo; </b><a class="smalfont" href="index.php?articles-search">Suchen</a>'.(!empty($suche)?'<b> &raquo; </b> nach: '.htmlentities($suche):"");
         $design = new design ( $title , $hmenu );
         $design->header();
         
         $tpl = new tpl ('articles_write');
         $out = array(
           'search'=>$suche,
           'a_title'=> (isset($_REQUEST['after_title'])?'checked="checked"':""),
           'a_preview'=> (isset($_REQUEST['after_preview'])?'checked="checked"':""),
           'a_txt'=> (isset($_REQUEST['after_txt'])?'checked="checked"':""),
         );
    
         $tpl->set_ar_out($out,1);
         
         if (!empty($suche)){
            #-> Seiten einteilung
            $page = 1;
            $limit = 25;  // Limit
            if (isset($_GET['page'])) {
               $page = trim(str_replace('-p','',$_GET['page']));
            }
            $anfang = ($page - 1) * $limit;
            #-> Seiten einteilung Ende
    
            $x = time() - (3600 * 24 * 360);
            if ($sucheNach == '1' AND $uid = @db_result(db_query("SELECT id FROM prefix_user WHERE name = BINARY '".$suche."'"),0)){// Nach Autor suchen
               $sucheSql = "art_uid = $uid AND ";
               $sucheSucc = true;
            }else{ //Text suche
               echo $sucheNach ==  '1'?"<span style='color:#FF0000; background:#000000;'>User '$suche' wurde nicht gefunden </span>":"";
               $suche = str_replace('-','',$suche);
               $suche = str_replace('=','',$suche);
               $suche = str_replace('&','',$suche);
               $searar = explode(' ', $suche);
               $sucheSql = '';
               foreach($searar as $elem) {
                  $str = str_replace('\'','',$elem);
                  $str = str_replace('"','',$str);
                  $str = addslashes($str);
                  if (!empty($str)) {
                     $sucheSqlTeil = '';
                     $sucheSqlTeil .= (isset($_REQUEST['after_title'])?" art_title LIKE '%$str%' OR ":"");
                     $sucheSqlTeil .= (isset($_REQUEST['after_preview'])?" art_preview LIKE '%$str%' OR ":"");
                     $sucheSqlTeil .= (isset($_REQUEST['after_txt'])?" art_content LIKE '%$str%' OR ":"");
                     $sucheSql .= ($sucheSqlTeil <> ''?" ( $sucheSqlTeil 1 = 2 ) AND ":" ");
                  }
               }
    
            }
            $sql = "SELECT DISTINCT art_id, art_title as titel FROM `prefix_artsys_articles` artsys LEFT JOIN `prefix_artsys_cats` ON id = art_cat
                   WHERE ($sucheSql 1 = 1) AND (art_time >= $x) AND art_status = 1 AND (".$_SESSION['authright']." <= recht OR (art_cat = 0 AND recht IS NULL)) ORDER BY art_time DESC";
            $sAnz = db_num_rows(db_query($sql));
            
            if ((($sucheNach == '1' AND isset($sucheSucc)) OR $sucheNach == '0') AND $sAnz > 0){
               $tpl->set('sAnz',$sAnz);
               $url = '';
               $url .= (isset($_REQUEST['after_title'])?"&amp;after_title=1":"");
               $url .= (isset($_REQUEST['after_preview'])?"&amp;after_preview=1":"");
               $url .= (isset($_REQUEST['after_txt'])?"&amp;after_txt=1":"");
               $tpl->set_out('MPL',$MPL = db_make_sites ($page , "" , $limit , 'index.php?articles-search='.urlencode($suche).$url.'&amp;page=' , "", $sAnz),2);
    
               echo $sucheNach == 1 ? ($sAnz > 1?'Folgende Artikel':'Folgender Artikel')." wurden von $suche geschrieben:":"'$suche' wurde in ".($sAnz > 1?'folgenden Artikeln':'folgendem Artikel')." gefunden:";
               echo "\n <br><br> \n";
               
               $sql .= " LIMIT ".$anfang.",".$limit;
               $erg = db_query($sql) or die(mysql_error());
               $class = '';
               WHILE($row = db_fetch_assoc($erg)){
                  $class = ($class == 'Cmite' ? 'Cnorm' : 'Cmite' );
                  $row['class'] = $class;
                  if ($sucheNach == '1'){
                     $row['titel'] = $suche.' || '.$row['titel'];
                  }
                  $tpl->set_ar_out($row,3);
               }
               $tpl->out(4);
            }elseif($sucheNach == '0'){
               echo "es wurde keinen Artikel gefunden";
            }
         }
         $design->footer();
    break;
    }
    ?>


    articles.htm
    <div class="Cdark" style="float: right; text-align: right">&nbsp; &nbsp;<a style="color:#FFFFFF;" href="index.php?articles-search">Artikel suchen</a> &nbsp;</div><br /><br />
    {EXPLODE}
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
      <tr class="Chead">
          <th width="80%" align="center"><b>{_lang_category}</b></th>
        <th width="20%" align="center">Artikeln</th>
       </tr>
       {EXPLODE}
       <tr class="{class}">
         <td><a href="index.php?articles-{id}">{name}</a><br /><span class="smalfont">&raquo;&nbsp;{desc}</span></td>
          <td align="center">{anzArt}</td>
       </tr>
       {EXPLODE}
    </table>
    <br /><br />
    {EXPLODE}
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
      <tr class="Chead">
        <th width="75%" style="text-indent:2em; text-align:left;">
          Sortieren nach&nbsp;
          &nbsp;&raquo;&nbsp;<a href="index.php?articles-{cid}-sort-{s0}">Artikel<img src="include/images/icons/pfeil{p0}.gif" border="0"></a>
          &nbsp;&raquo;&nbsp;<a href="index.php?articles-{cid}-sort-{s1}">{_lang_date}<img src="include/images/icons/pfeil{p1}.gif" border="0"></a>
          &nbsp;&raquo;&nbsp;<a href="index.php?articles-{cid}-sort-{s2}">Hits<img src="include/images/icons/pfeil{p2}.gif" border="0"></a>
        </th>
       </tr>
      {EXPLODE}
       <tr class="{class}">
         <td width="100%">
           <div style="border:1px dotted #000;">
             {vorschau}
             <div style="padding:0.2em;text-indent:0.2em;font-weight:bold;" class="Cdark"><a href="index.php?articles-show-A{art_id}">{art_title}</a></div>
             <span class="smalfont">&raquo;&nbsp;{_lang_from} <b>{username}</b> geschrieben am {datum}<br /> &raquo;&nbsp;Hits:{art_viewed}</span><br />
             {art_difficult} {art_rating}
             <div style="margin-top:.2em;padding:0.2em;border-top:1px dashed #000;clear:both;">{art_preview}</div>
           </div>
    
         </td>
        </tr>
       {EXPLODE}
       <tr>
         <td colspan="3" class="Cdark">&nbsp;-&nbsp;&nbsp;<a style="color:#FFFFFF;" href="?articles-write{new_art_cat}">neuen Artikel verfassen</a></td>
       </tr>
       {EXPLODE}
    </table>
    {EXPLODE}
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
      <tr class="Chead">
          <th colspan="4" align="center"><b>{art_title}</b></th>
       </tr><tr>
       <td class="Cmite">{_lang_author}</td>
          <td class="Cnorm">{creater}</td>
        <td class="Cmite" colspan="2" valign="top"> {art_rating}</td>
      </tr><tr>
         <td class="Cmite">{_lang_date}</td>
          <td class="Cnorm">{datum}</td>
        <td class="Cnorm" rowspan="2" colspan="2" align="center">
        <table class="border" border="0" cellspacing="1" cellpadding="0">
          <tr>
    {write_vote}
          </tr>
        </table>
        </td>
       </tr><tr>
        <td class="Cmite" width="110">{_lang_voter}</td>
          <td class="Cnorm">{art_votes}</td>
       </tr><tr>
         <td class="Cmite">{_lang_seenfrom}</td>
          <td class="Cnorm">{art_viewed}</td>
          <td class="Cmite" colspan="2" valign="top">{comOderShow}</td>
       </tr>
    </table>
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
    {EXPLODE}
         <th class="Cdark">{titel}</th>
      </tr> <tr>
          <td class="Cnorm">{content}</td>
      </tr> <tr>
          <td class="Cnorm">{links}</td>
    {EXPLODE}
       <tr>
          <td class="Cnorm">
          <form action="index.php?articles-show-C{art_id}" method="POST">
          <fieldset>
          <legend>{_lang_writecomment}</legend>
          <input type="text" name="name" value="{uname}" /> &nbsp; &nbsp; <input type="submit" value="{_lang_enter}"><br />
          <textarea cols="50" rows="2" name="text"></textarea><br />
          </fieldset>
          </form>
          </td>
       </tr>
    {EXPLODE}
       <tr>
          <td class="Cnorm">
              <br />&nbsp;&nbsp;<b>
              {writeout}
              </b><br />
          </td>
       </tr>
    {EXPLODE}
       <tr>
          <td class="Cnorm">
            <span class="Cmite" style="width:100%;display:block;"><span style="display:block;padding:2px 2px 2px 5px;"># <b>{zahl}</b> von {name}</span> </span>
            <span class="Cdark" style="width:100%;display:block;"><span style="display:block;padding:4px 4px 4px 6px;">{text}</span>  </span>
          </td>
       </tr>
    {EXPLODE}
    </table>



    Zuletzt modifiziert von Siggi am 30.01.2013 - 15:33:50
    0 Mitglieder finden den Beitrag gut.
  10. #10
    User Pic
    Rock@wulf Hall Of Fame
    Registriert seit
    03.06.2004
    Beiträge
    3.282
    Beitragswertungen
    239 Beitragspunkte
    Versuch es man damit:

    <?php
    #   Copyright by: Manuel Staechele
    #   Edit by: Nero
    #   Support: www.ilch.de
     
     
    defined ('main') or die ( 'no direct access' );
     
    //PHP datei mit den funktionen laden
    require_once('include/includes/func/articles.php');
     
     
    switch(escape($menu->get(1),'string')){
    default:
             #-> Kategorien-Pfad erstellen
             $cid = ( $menu->get(1) ? escape($menu->get(1), 'integer') : 0 );
             $erg = db_query("SELECT cat,name,schreibr FROM `prefix_artsys_cats` WHERE id = ".$cid." AND recht >= ".$_SESSION['authright']." ORDER BY pos");
             if (db_num_rows($erg) > 0) {
                $row = db_fetch_assoc($erg);
                $array = get_cats_array($row['cat'],'');
                if (!empty($array) ) {
                   $titelzw = get_cats_title($array);
                   $namezw = get_cats_urls($array);
                } else {
                   $titelzw = '';
                   $namezw = '';
                }
                $cattitle = ':: '.$titelzw.$row['name'];
                $catname = '<b> &raquo; </b>'.$namezw.$row['name'];
             } else {
                if ($cid <> 0) {
                   $title = $allgAr['title'].' :: Artikeln ';
                   $hmenu = '<a class="smalfont" href="?articles">Artikeln</a>';
                   $design = new design ( $title , $hmenu );
                   $design->header();
                   echo 'Die Kategorie wurde nicht gefunden';
                   $design->footer(1);
                }
                $cattitle = '';
                $catname = '';
             }
             $schreibrecht = $row['schreibr'];
             #-> Ausgabe
             $title = $allgAr['title'].' :: Artikeln '.$cattitle;
             $hmenu = '<a class="smalfont" href="?articles">Artikeln</a>'.$catname;
             $design = new design ( $title , $hmenu );
             $design->header();
             $tpl = new tpl ('articles' );
             $tpl->out(0);
             $tpl->set('cid', $cid);
             $erg = db_query("SELECT id,name,`desc` FROM `prefix_artsys_cats` WHERE cat = ".$cid." AND recht >= ".$_SESSION['authright']." ORDER BY pos");
             if ( db_num_rows($erg) > 0 ) {
                $tpl->out(1); $class = 'Cnorm';
                while ($row = db_fetch_assoc($erg) ) {
                   $row['anzArt'] = count_art($row['id']);
                   $class = ($class == 'Cmite' ? 'Cnorm' : 'Cmite');
                   $row['class'] = $class;
                   $tpl->set_ar_out($row,2);
                }
                $tpl->out(3);
             }
             #->sortieren
             $felder = array('art_pos','art_viewed','art_time');
             $row = artsys_sort_func($menu->get(2),escape($menu->get(3),'string'),$felder,'list_articles');
             $sort = $row['sort'];
             unset($row['sort']);
             #->sortieren ende
             //Seiten
             $limit = $ArtsysArray['anzArt_perSite'];  // Limit
             $page = ($menu->getA(2) == 'p' ? $menu->getE(2) : 1 );
             $MPL = db_make_sites($page, " WHERE art_cat = ".$cid." AND art_status = 1 ", $limit, '?articles-'.$cid, 'artsys_articles');
             $anfang = ($page - 1) * $limit;
             //Aussgabe
             $erg = db_query("SELECT art_id,art_title,art_preview,art_rating,art_image,art_difficult,art_uid,art_viewed,DATE_FORMAT(art_time,'%d.%m.%Y') as datum from `prefix_artsys_articles` WHERE art_cat = ".$cid." AND art_status = 1 ORDER BY $sort LIMIT $anfang, $limit");
             $anz_art = db_num_rows($erg);
             (($anz_art > 0 OR $cid<>0) ? $tpl->set_ar_out($row,4):'');
             if ( $anz_art > 0 ) {
                $class = 'Cnorm';
                while($row = db_fetch_assoc($erg) ) {
                   $class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' );
                   $row['class'] = $class;
                   $row['art_preview'] = bbcode($row['art_preview']);
                   $row['vorschau'] = '';
                   $row['float'] = '';
                   if ($row['art_image'] <> "" AND file_exists($row['art_image'])){
                       $row['vorschau'] = '<a href="index.php?articles-show-A'.$row['art_id'].'"><img src="'.$row['art_image'].'" alt="'.$row['art_title'].'" title="'.$row['art_title'].'" style="border: medium none ; float: left; padding-right: 5px;"></a>';
                   }
                   artsys_hexToRgb(array($ArtsysArray['diff_bgcolor'],$ArtsysArray['diff_color'],$ArtsysArray['diff_nonecolor']),'diff');
                   $row['art_difficult'] = ($row['art_difficult'] > 0?'Schwierigkeit : <img src="include/images/articles/art_diff_image.php?d='.$row['art_difficult'].'" alt="'.$ArtsysArray['diff'][$row['art_difficult']].'" title="'.$ArtsysArray['diff'][$row['art_difficult']].'" ><br />':'');
                   $row['art_rating'] = show_vote_stats($row['art_rating']);
                   $row['username'] = get_n($row['art_uid']);
                   $tpl->set_ar_out($row,5);
                }
             }else{
                echo ($cid<>0?'<tr><td colspan="3" class="Cnorm">Kein Artikel vorhanden</td></tr>':'');
             }
             (((($anz_art > 0 AND $ArtsysArray['allow_defKat'] <> 0)OR $cid<>0) AND $schreibrecht == 1 )?$tpl->set_out('new_art_cat',($cid<>0?"-C$cid":""),6):'');
             (($anz_art > 0 OR $cid<>0)?$tpl->out(7):"");
             echo $MPL;
             $design->footer();
    break;
    case 'show':
            $fid =escape($menu->getE(2),'integer');
            $erg = db_query("SELECT art_cat,art_viewed,art_votes,art_rating,art_title,art_uid,art_content,art_id,DATE_FORMAT(art_time,'%d.%m.%Y') as datum
                             FROM `prefix_artsys_articles` artsys LEFT JOIN `prefix_artsys_cats` ON id = art_cat
                             WHERE art_id = ".$fid." AND art_status = 1 AND (".$_SESSION['authright']." <= recht OR (art_cat = 0 AND recht IS NULL))");
            if (@db_num_rows($erg) !== 1) {
               $title = $allgAr['title'].' :: Artikeln ';
               $hmenu = '<a class="smalfont" href="?articles">Artikeln</a>';
               $design = new design ( $title , $hmenu );
               $design->header();
               echo 'Der Artikel wurde nicht gefunden';
               $design->footer(1);
            }
            $row = db_fetch_assoc($erg);
            #-> umfrage einen hoch zaehlen ...
            if ($menu->getA(3) === 'z' AND is_numeric($menu->getE(3)) AND !isset($_SESSION['artDoVote'][$row['art_id']]) AND loggedin() ) {
               $_SESSION['artDoVote'][$row['art_id']] = 'o';
               $row['art_rating'] = round( ( ($row['art_rating'] * $row['art_votes'] ) + $menu->getE(3) ) / ( $row['art_votes'] + 1 ), 3);
               $row['art_votes']++;
               db_query("UPDATE prefix_artsys_articles SET art_rating = ".$row['art_rating'].", art_votes = ".$row['art_votes']." WHERE art_id = ".$fid);
            }
            #-> visits einen hoch zaehlen ...
            if (!isset ($_SESSION['artDoKlick'][$row['art_id']]) ) {
               $_SESSION['artDoKlick'][$row['art_id']] = 'o';
               db_query("UPDATE prefix_artsys_articles SET art_viewed = art_viewed +1 WHERE art_id = ".$fid);
            }
            #-> Kategorien-Pfad erstellen
            $cid = $row['art_cat'];
            $erg1 = db_query("SELECT id,cat,name FROM `prefix_artsys_cats` WHERE id = ".$cid);
            if (db_num_rows($erg1)>0){
               $row1 = db_fetch_assoc($erg1);
               $array = get_cats_array($row1['cat'],'');
               if (!empty($array)){
                  $titelzw = get_cats_title($array);
                  $namezw = get_cats_urls($array);
               }else{
                  $titelzw = '';
                  $namezw = '';
               }
               $cattitle = ':: '.$titelzw.$row1['name'].' :: '.$row['art_title'];
               $catname = '<b> &raquo; </b>'.$namezw.'<a class="smalfont" href="?articles-'.$row1['id'].'">'.$row1['name'].'</a>'; //<b> &raquo; </b>'.$row['name'].' '.$row['version'];
            } else {
               $cattitle = '';
               $catname = '';
            }
            /*Kommentare immer anzeigen
            if ($menu->getA(2) === 'A'){
               #-> Artikel-Page setzen
               $art_page = ($menu->getA(3) === 'P'?$menu->getE(3):1);
               #-> Anz kommentare holen
               $comAnz= db_result(db_query("SELECT COUNT(ID) FROM `prefix_koms` WHERE uid = ".$row['art_id']." AND cat = 'ARTICLES'"),0);
               #-> Ausgabe
               $page = make_art_pages($row['art_content'],$art_page,$fid);
               $title = $allgAr['title'].' :: Artikeln '.$cattitle;
               $hmenu = '<a class="smalfont" href="?articles">Artikeln</a>'.$catname;
               $design = new design ( $title , $hmenu );
                       $design->header();
               $tpl = new tpl ('articles' );
               $row['creater'] = get_n($row['art_uid']);
               $row['comOderShow'] = ' &nbsp;<a href="index.php?articles-show-C'.$row['art_id'].'">'.$comAnz.' '.$lang['comments'].'</a>';
               $row['art_title'] .= (($row['art_uid'] == $_SESSION['authid'] OR has_right(-9, 'articles'))?
                                    ' &nbsp;&nbsp;<a href="?articles-write-E'.$row['art_id'].'"><img border="0" src="include/images/icons/edit.gif" title="editieren" alt="editieren"></a>':'');
               $row['art_rating'] = show_vote_stats($row['art_rating']);
               show_vote($row['art_id']);//Vote ausgeben
               $tpl->set_ar_out($row,8);
               $tpl->set_ar_out($page,9);
               $tpl->out(13);
            }elseif($menu->getA(2) === 'C'){
            **/
            if ($menu->getA(2) === 'A' OR $menu->getA(2) === 'C'){
               # kommentar add
               if (!empty($_POST['name']) AND !empty($_POST['text']) AND ($ArtsysArray['user_comment_right'] === 2 OR loggedin())) {
                       $_POST['text'] = escape($_POST['text'],'textarea');
                       $_POST['name'] = escape($_POST['name'],'string');
                       db_query("INSERT INTO `prefix_koms` VALUES ('',".$fid.",'ARTICLES','".$_POST['name']."','".$_POST['text']."')");
               }
               #-> Artikel-Page setzen
               $art_page = ($menu->getA(3) === 'P'?$menu->getE(3):1);
               # kommentar loeschen
               if ($menu->getA(3) == 'd' AND is_numeric($menu->getE(3)) AND is_admin()) {
                       $kommentar_id = escape($menu->getE(3),'integer');
                       db_query("DELETE FROM `prefix_koms` WHERE uid = ".$fid." AND cat = 'ARTICLES' AND id = ".$kommentar_id);
               }
               #-> Ausgabe
               $title = $allgAr['title'].' :: Artikeln '.$cattitle;
               $hmenu = '<a class="smalfont" href="?articles">Artikeln</a>'.$catname;
               $design = new design ( $title , $hmenu );
               $design->header();
               $tpl = new tpl ('articles' );
               $row['creater'] = get_n($row['art_uid']);
               $row['comOderShow'] = '';#' &nbsp;<a href="?articles-show-A'.$row['art_id'].'">Artikel lesen</a>';
               $row['art_title'] .= (($row['art_uid'] == $_SESSION['authid'] OR has_right(-9, 'articles'))?
                                    ' &nbsp;&nbsp;<a href="?articles-write-E'.$row['art_id'].'"><img border="0" src="include/images/icons/edit.gif" title="editieren" alt="editieren"></a>':'');
               $row['art_rating'] = show_vote_stats($row['art_rating']);
               show_vote($row['art_id'],'C');//Vote ausgeben
               $tpl->set_ar_out($row,8);
               $tpl->set_ar_out($page,9);
               #-> Kommentar insertfields
               if ($ArtsysArray['user_comment_right'] == 2 OR loggedin()){
                  $row_ins = array('uname'=>get_n($_SESSION['authid']),'art_id'=>$row['art_id']);
                  $tpl->set_ar_out($row_ins,10);
               }elseif($ArtsysArray['user_comment_right'] != 0){
                  $tpl->set_out('writeout','du musst eingelogt sein um einen Kommentare zu schreiben',11);
               }
               #-> kommentar show
               #->sortieren
               $felder = array('id');
               $row2 = artsys_sort_func($menu->get(3),escape($menu->get(4),'string'),$felder,'com_articles');
               $sort = $row2['sort'];
               unset($row2['sort']);
               #->sortieren ende
               //Seiten
               $erg2 = db_query("SELECT text, name, id FROM `prefix_koms` WHERE uid = ".$row['art_id']." AND cat = 'ARTICLES' ORDER BY $sort");
               $ergAnz1 = db_num_rows($erg2);
               $limit = $ArtsysArray['anzCom_perSite'];  // Limit
               $page = ($menu->getA(3) == 'p' ? $menu->getE(3) : 1 );
               $MPL = db_make_sites($page, "", $limit, '?articles-show-C'.$row['art_id'],"",$ergAnz1);
               $anfang = ($page - 1) * $limit;
               //Aussgabe
               $erg2 = db_query("SELECT text, name, id FROM `prefix_koms` WHERE uid = ".$row['art_id']." AND cat = 'ARTICLES' ORDER BY $sort LIMIT $anfang,$limit");
               if ( $ergAnz1 == 0 ) {
                  $tpl->set_out('writeout',$lang['nocomments'],11);
                  $tpl->out(13);
               }elseif($ArtsysArray['user_comment_right'] == 0 AND !loggedin()){
                  $tpl->set_out('writeout','du musst eingelogt sein um die Kommentare zu sehen, bzw. einen zu schreiben',11);
                  $tpl->out(13);
               }else{
                       echo '<tr><td class="Cnorm"><a href="index.php?articles-show-C'.$row['art_id'].'-sort-'.$row2['s0'].'">'.ucfirst(substr($row2['s0'],1)).' sortieren</a>&nbsp; <img src="include/images/icons/pfeil'.$row2['p0'].'.gif" border="0"></td></tr>';
                       $rtung = $row2['s0'];
                       $zahl = ($rtung == '0auf'?($ergAnz1-$anfang):($anfang + 1));
                       while ($row2 = db_fetch_assoc($erg2)) {
                               $row2['text'] = bbcode(trim($row2['text']));
                               if (is_admin()) {
                                   $row2['text'] .= '<a href="index.php?articles-show-C'.$row['art_id'].'-d'.$row2['id'].'"><img src="include/images/icons/del.gif" alt="l&ouml;schen" border="0" title="l&ouml;schen" /></a>';
                               }
                               $tpl->set_ar_out(array('name' => $row2['name'], 'text' => $row2['text'], 'zahl' => $zahl ),12);
                               ($rtung == '0auf'?$zahl--:$zahl++);
                       }
                       $tpl->out(13);
                       echo $MPL;
               }
               # kommentar show ende
            }else{
               $title = $allgAr['title'].' :: Artikeln ';
               $hmenu = '<a class="smalfont" href="?articles">Artikeln</a>';
               $design = new design ( $title , $hmenu );
               $design->header();
               echo 'Unbekannter Befehl';
            }
            $design->footer();
    break;
    case 'write':
         if (has_right(-9, 'articles') AND $ArtsysArray['hasright_thenAdmin'] == 1){
           $host  = $_SERVER['HTTP_HOST'];
           $uri   = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
           if($menu->getA(2) === 'E')
             header("Location: http://$host$uri/admin.php?articles-editArt-E".$menu->getE(2));
           else
             header("Location: http://$host$uri/admin.php?articles-newArt-C".$menu->getE(2));
           exit;
         }
         $title = $allgAr['title'].' :: Artikeln :: erstellen/&uuml;berarbeiten';
         $hmenu = '<a class="smalfont" href="?articles">Artikeln</a><b> &raquo; </b>erstellen/&uuml;berarbeiten';
         $design = new design ( $title , $hmenu );
         $design->header();
         if($_SESSION['authright'] <= $ArtsysArray['write_right']){
            if ($menu->getA(2) === 'E'){
               if (!$row = @db_fetch_assoc(db_query('SELECT art_pos, art_id, art_cat, art_title, art_content, art_preview, art_uid, art_image, art_difficult FROM `prefix_artsys_articles` WHERE art_id = '.$menu->getE(2)))){
                  wd('?articles','Artikel ist nicht vorhanden',3);
                    $design->footer(1);
               }
               $row['mod_title'] = 'Artikel editieren';
            }else{
               $row = array('art_title'=>'', 'art_cat'=>$menu->getE(2), 'art_content'=>'', 'art_preview'=>'','art_id'=>'','art_image'=>'a897s','mod_title'=>'Neuer Artikel schreiben','art_uid'=>'','art_difficult'=>'');
            }
            if (isset($_POST['submit'])){#-> Artikel speichern oder updaten
               if (isset($_POST['artID']) AND $_POST['artID'] == $menu->getE(2)){#-> Artikel ändern
                  $insArr = array('txt'=>'txt','titel'=>'str','art_preview'=>'str','cat'=>'','artID'=>'','difficult'=>'');
                  $insert = escape_arrays($_POST,$insArr);
                  cat_exist_and_has_right($insert['cat'],$ArtsysArray['allow_defKat'],'front',$row['art_uid'],$row['art_cat']);#-> auf Recht prüfen
                  if ($row['art_cat'] <> $insert['cat']){#-> Schauen ob neue Kategorie
                     $pos = db_result(db_query("SELECT COUNT(*) FROM `prefix_artsys_articles` WHERE art_cat = ".$insert['cat']),0);
                     db_query("UPDATE `prefix_artsys_articles` SET art_pos = art_pos - 1 WHERE art_pos > ".$row['art_pos']." AND art_cat = ".$row['art_cat']);
                  }else{
                     $pos = $row['art_pos'];
                  }
                  db_query('UPDATE `prefix_artsys_articles` SET
                           art_status = 0,
                           art_cat = '.$insert['cat'].',
                           art_pos = '.$pos.',
                           art_title = "'.$insert['titel'].'",
                           art_content  = "'.$insert['txt'].'",
                           art_preview  = "'.$insert['art_preview'].'",
                           art_difficult = '.$insert['difficult'].'
                           WHERE art_id = '.$insert['artID'].' LIMIT 1');
                  $imageMsg = $ArtsysArray['vballow'] == 1?config_art_image($insert['artID']):'';
                  #-> Angaben für PM und Weiterleitung
                  $wd = array('pfad'=>'?articles'.($insert['cat'] == 0?'':'-'.$insert['cat']),'msg'=>'Artikel erfolgreich ge&auml;ndert');
                  $msg = "Artikel ".$row['art_title']." wurde ge&auml;ndert in: \n Titel: ".$insert['titel']." \n Kategorie: ";
                  $msg_titel = 'Artikel wurde editiert';
               }else{#-> Neuer Artikel einfügen
                  $insArr = array('txt'=>'txt','titel'=>'str','art_preview'=>'str','cat'=>'','difficult'=>'');
                  $insert = escape_arrays($_POST,$insArr);
                  cat_exist_and_has_right($insert['cat'],$ArtsysArray['allow_defKat'],'front');#-> auf Recht prüfen
                  $pos = db_result(db_query("SELECT COUNT(*) FROM `prefix_artsys_articles` WHERE art_cat = ".$insert['cat']),0);
                  db_query('INSERT INTO `prefix_artsys_articles` (art_uid,art_cat,art_pos,art_time,art_title,art_content,art_preview,art_difficult) VALUES
                            ('.$_SESSION['authid'].','.$insert['cat'].','.$pos.',NOW(),"'.$insert['titel'].'","'.$insert['txt'].'","'.$insert['art_preview'].'",'.$insert['difficult'].')');
                  $imageMsg = $ArtsysArray['vballow'] == 1?config_art_image(db_last_id()):'';
                  #-> Angaben für PM und Weiterleitung
                  $wd = array('pfad'=>'?articles'.($insert['cat'] == 0?'':'-'.$insert['cat']),'msg'=>'Artikel erfolgreich eingef&uuml;gt');
                  $msg = "Es wurde ein neuer Artikel eingetragen: \n \n Titel: ".$insert['titel']." \n Kategorie: ";
                  $msg_titel = 'Neuer Artikel';
               }
     
               if (!has_right(-9, 'articles')){
                  $row_art = db_fetch_assoc(db_query("SELECT pm,name FROM `prefix_artsys_cats` WHERE id = ".$insert['cat']));
                  if ($row_art['pm']<>0 OR ($ArtsysArray['allow_defKat']<>0 AND $ArtsysArray['defKat_uid']<>0)){
                     sendpm($_SESSION['authid'],$row_art['pm'],$msg_titel,$msg .= $row_art['name']." \n \n und wartet darauf freigeschaltet zu werden! \n\n Das Artikelmodul ;)");
                  }
               }
               wd($wd['pfad'],$wd['msg'].' <br> <br> '.$imageMsg,3);
            }else{
               if (isset($_POST['preview'])){#-> alles für die Vorschau aufbereiten
                  $art = array('txt'=>trim(escape($_POST['txt'],'textarea')),'pref'=>trim(escape($_POST['art_preview'],'textarea')),'titel'=>trim($_POST['titel']),'display'=>'');
                  $art['preview'] = MAT_for_priview(bbcode(unescape($art['txt'])),unescape($art['pref']));
                  $row['art_cat'] = escape($_POST['cat'],'integer');
                  $row['art_difficult'] = escape($_POST['difficult'],'integer');
               }else{
                  $art = array('txt'=>$row['art_content'],'pref'=>$row['art_preview'],'titel'=>$row['art_title'],'display'=>'style="display:none;"','preview'=>'');
               }
               cat_exist_and_has_right($row['art_cat'],$ArtsysArray['allow_defKat'],'front',$row['art_uid']);
               $tpl = new tpl ('articles_write' );
               $out = array('modul_titel' =>$row['mod_title'],
                            'show_preview'=>$art['preview'],
                            'art_txt'     =>escape_for_fields(unescape($art['txt'])),
                            'preview'      => escape_for_fields(unescape($art['pref'])),
                            'art_titel'   =>$art['titel'],
                            'display'     =>$art['display'],
                            'smilies'     =>getsmilies(),
                            'kat'         =>($menu->getA(2) <> 'E'?($row['art_cat'] <> 0?'-'.$row['art_cat']:''):'-show-A'.$menu->getE(2)),
                            'cat_list'    =>($ArtsysArray['allow_defKat']<>0?'<option value="0">Keine</option>':'').dblistee($row['art_cat'],"SELECT id,name FROM `prefix_artsys_cats` WHERE (recht >= ".$_SESSION['authright']." AND schreibr = 1) OR id = ".$row['art_cat']." ORDER BY name ASC"),
                            'artID'       =>($row['art_id']<>''?'<input type="hidden" name="artID" value="'.$row['art_id'].'" />':''),
                            'text_cols'   =>$ArtsysArray['frontend_textarea_cols'],
                            'text_rows'   =>$ArtsysArray['frontend_textarea_rows'],
                            'TXTL'        =>$ArtsysArray['frontend_textarea_min_lenge'],
                            'art_image_upload'   => ($ArtsysArray['vballow'] == 1?html_art_image($row['art_image']):""),
                            'art_difficult'=>html_art_diff($row['art_difficult'],"'front'"),
                            );
               $tpl->set_ar_out($out,0);
            }
         }else{wd('?articles','Keine Berechtigung',3);}
         $design->footer();
    break;
    case 'search':
     
         $suche = '';
         if (isset($_POST['search'])){
            $suche = $_POST['search_after'].$_POST['search'];
         }elseif (!empty($_GET['articles-search'])){
            $suche = $_GET['articles-search'];
         }
         $sucheNach = substr($suche,0,1);
         $suche = stripslashes(escape(substr($suche,1), 'string'));
          
         $title = $allgAr['title'].' :: Artikeln :: Suchen '.(!empty($suche)?':: nach: '.htmlentities($suche):"");
         $hmenu  = '<a class="smalfont" href="?articles">Artikeln</a><b> &raquo; </b><a class="smalfont" href="index.php?articles-search">Suchen</a>'.(!empty($suche)?'<b> &raquo; </b> nach: '.htmlentities($suche):"");
         $design = new design ( $title , $hmenu );
         $design->header();
          
         $tpl = new tpl ('articles_write');
         $out = array(
           'search'=>$suche,
           'a_title'=> (isset($_REQUEST['after_title'])?'checked="checked"':""),
           'a_preview'=> (isset($_REQUEST['after_preview'])?'checked="checked"':""),
           'a_txt'=> (isset($_REQUEST['after_txt'])?'checked="checked"':""),
         );
     
         $tpl->set_ar_out($out,1);
          
         if (!empty($suche)){
            #-> Seiten einteilung
            $page = 1;
            $limit = 25;  // Limit
            if (isset($_GET['page'])) {
               $page = trim(str_replace('-p','',$_GET['page']));
            }
            $anfang = ($page - 1) * $limit;
            #-> Seiten einteilung Ende
     
            $x = time() - (3600 * 24 * 360);
            if ($sucheNach == '1' AND $uid = @db_result(db_query("SELECT id FROM prefix_user WHERE name = BINARY '".$suche."'"),0)){// Nach Autor suchen
               $sucheSql = "art_uid = $uid AND ";
               $sucheSucc = true;
            }else{ //Text suche
               echo $sucheNach ==  '1'?"<span style='color:#FF0000; background:#000000;'>User '$suche' wurde nicht gefunden </span>":"";
               $suche = str_replace('-','',$suche);
               $suche = str_replace('=','',$suche);
               $suche = str_replace('&','',$suche);
               $searar = explode(' ', $suche);
               $sucheSql = '';
               foreach($searar as $elem) {
                  $str = str_replace('\'','',$elem);
                  $str = str_replace('"','',$str);
                  $str = addslashes($str);
                  if (!empty($str)) {
                     $sucheSqlTeil = '';
                     $sucheSqlTeil .= (isset($_REQUEST['after_title'])?" art_title LIKE '%$str%' OR ":"");
                     $sucheSqlTeil .= (isset($_REQUEST['after_preview'])?" art_preview LIKE '%$str%' OR ":"");
                     $sucheSqlTeil .= (isset($_REQUEST['after_txt'])?" art_content LIKE '%$str%' OR ":"");
                     $sucheSql .= ($sucheSqlTeil <> ''?" ( $sucheSqlTeil 1 = 2 ) AND ":" ");
                  }
               }
     
            }
            $sql = "SELECT DISTINCT art_id, art_title as titel FROM `prefix_artsys_articles` artsys LEFT JOIN `prefix_artsys_cats` ON id = art_cat
                   WHERE ($sucheSql 1 = 1) AND (art_time >= $x) AND art_status = 1 AND (".$_SESSION['authright']." <= recht OR (art_cat = 0 AND recht IS NULL)) ORDER BY art_time DESC";
            $sAnz = db_num_rows(db_query($sql));
             
            if ((($sucheNach == '1' AND isset($sucheSucc)) OR $sucheNach == '0') AND $sAnz > 0){
               $tpl->set('sAnz',$sAnz);
               $url = '';
               $url .= (isset($_REQUEST['after_title'])?"&amp;after_title=1":"");
               $url .= (isset($_REQUEST['after_preview'])?"&amp;after_preview=1":"");
               $url .= (isset($_REQUEST['after_txt'])?"&amp;after_txt=1":"");
               $tpl->set_out('MPL',$MPL = db_make_sites ($page , "" , $limit , 'index.php?articles-search='.urlencode($suche).$url.'&amp;page=' , "", $sAnz),2);
     
               echo $sucheNach == 1 ? ($sAnz > 1?'Folgende Artikel':'Folgender Artikel')." wurden von $suche geschrieben:":"'$suche' wurde in ".($sAnz > 1?'folgenden Artikeln':'folgendem Artikel')." gefunden:";
               echo "\n <br><br> \n";
                
               $sql .= " LIMIT ".$anfang.",".$limit;
               $erg = db_query($sql) or die(mysql_error());
               $class = '';
               WHILE($row = db_fetch_assoc($erg)){
                  $class = ($class == 'Cmite' ? 'Cnorm' : 'Cmite' );
                  $row['class'] = $class;
                  if ($sucheNach == '1'){
                     $row['titel'] = $suche.' || '.$row['titel'];
                  }
                  $tpl->set_ar_out($row,3);
               }
               $tpl->out(4);
            }elseif($sucheNach == '0'){
               echo "es wurde keinen Artikel gefunden";
            }
         }
         $design->footer();
    break;
    }
    ?>


    <div class="Cdark" style="float: right; text-align: right">&nbsp; &nbsp;<a style="color:#FFFFFF;" href="index.php?articles-search">Artikel suchen</a> &nbsp;</div><br /><br />
    {EXPLODE}
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
      <tr class="Chead">
          <th width="80%" align="center"><b>{_lang_category}</b></th>
        <th width="20%" align="center">Artikeln</th>
       </tr>
       {EXPLODE}
       <tr class="{class}">
         <td><a href="index.php?articles-{id}">{name}</a><br /><span class="smalfont">&raquo;&nbsp;{desc}</span></td>
          <td align="center">{anzArt}</td>
       </tr>
       {EXPLODE}
    </table>
    <br /><br />
    {EXPLODE}
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
      <tr class="Chead">
        <th width="75%" style="text-indent:2em; text-align:left;">
          Sortieren nach&nbsp;
          &nbsp;&raquo;&nbsp;<a href="index.php?articles-{cid}-sort-{s0}">Artikel<img src="include/images/icons/pfeil{p0}.gif" border="0"></a>
          &nbsp;&raquo;&nbsp;<a href="index.php?articles-{cid}-sort-{s1}">{_lang_date}<img src="include/images/icons/pfeil{p1}.gif" border="0"></a>
          &nbsp;&raquo;&nbsp;<a href="index.php?articles-{cid}-sort-{s2}">Hits<img src="include/images/icons/pfeil{p2}.gif" border="0"></a>
        </th>
       </tr>
      {EXPLODE}
       <tr class="{class}">
         <td width="100%">
           <div style="border:1px dotted #000;">
             {vorschau}
             <div style="padding:0.2em;text-indent:0.2em;font-weight:bold;" class="Cdark"><a href="index.php?articles-show-A{art_id}">{art_title}</a></div>
             <span class="smalfont">&raquo;&nbsp;{_lang_from} <b>{username}</b> geschrieben am {datum}<br /> &raquo;&nbsp;Hits:{art_viewed}</span><br />
             {art_difficult} {art_rating}
             <div style="margin-top:.2em;padding:0.2em;border-top:1px dashed #000;clear:both;">{art_preview}</div>
           </div>
     
         </td>
        </tr>
       {EXPLODE}
       <tr>
         <td colspan="3" class="Cdark">&nbsp;-&nbsp;&nbsp;<a style="color:#FFFFFF;" href="?articles-write{new_art_cat}">neuen Artikel verfassen</a></td>
       </tr>
       {EXPLODE}
    </table>
    {EXPLODE}
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
      <tr class="Chead">
          <th colspan="4" align="center"><b>{art_title}</b></th>
       </tr><tr>
       <td class="Cmite">{_lang_author}</td>
          <td class="Cnorm">{creater}</td>
        <td class="Cmite" colspan="2" valign="top"> {art_rating}</td>
      </tr><tr>
         <td class="Cmite">{_lang_date}</td>
          <td class="Cnorm">{datum}</td>
        <td class="Cnorm" rowspan="2" colspan="2" align="center">
        <table class="border" border="0" cellspacing="1" cellpadding="0">
          <tr>
    {write_vote}
          </tr>
        </table>
        </td>
       </tr><tr>
        <td class="Cmite" width="110">{_lang_voter}</td>
          <td class="Cnorm">{art_votes}</td>
       </tr><tr>
         <td class="Cmite">{_lang_seenfrom}</td>
          <td class="Cnorm">{art_viewed}</td>
          <td class="Cmite" colspan="2" valign="top">{comOderShow}</td>
       </tr>
    </table>
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
    {EXPLODE}
         <th class="Cdark">{titel}</th>
      </tr> <tr>
          <td class="Cnorm">{content}</td>
      </tr> <tr>
          <td class="Cnorm">{links}</td>
      </tr>
    {EXPLODE}
       <tr>
          <td class="Cnorm">
          <form action="index.php?articles-show-C{art_id}" method="POST">
          <fieldset>
          <legend>{_lang_writecomment}</legend>
          <input type="text" name="name" value="{uname}" /> &nbsp; &nbsp; <input type="submit" value="{_lang_enter}"><br />
          <textarea cols="50" rows="2" name="text"></textarea><br />
          </fieldset>
          </form>
          </td>
       </tr>
    {EXPLODE}
       <tr>
          <td class="Cnorm">
              <br />&nbsp;&nbsp;<b>
              {writeout}
              </b><br />
          </td>
       </tr>
    {EXPLODE}
       <tr>
          <td class="Cnorm">
            <span class="Cmite" style="width:100%;display:block;"><span style="display:block;padding:2px 2px 2px 5px;"># <b>{zahl}</b> von {name}</span> </span>
            <span class="Cdark" style="width:100%;display:block;"><span style="display:block;padding:4px 4px 4px 6px;">{text}</span>  </span>
          </td>
       </tr>
    {EXPLODE}
    </table>
    Meine Postings repräsentieren meine Meinung wenn nicht anders gekennzeichnet.
    MFG Rock@wulf
    0 Mitglieder finden den Beitrag gut.
  11. #11
    User Pic
    Siggi Hall Of Fame
    Registriert seit
    08.02.2007
    Beiträge
    6.558
    Beitragswertungen
    327 Beitragspunkte
    Er sagt mir in der 6. Zeile
    Parse error: syntax error, unexpected T_STRING in /usr/export/www/vhosts/funnetwork/hosting/ilch/include/contents/articles.php on line 6

    Obwohl da garnix ist?


    Zuletzt modifiziert von Siggi am 31.01.2013 - 13:19:36
    0 Mitglieder finden den Beitrag gut.
  12. #12
    User Pic
    Rock@wulf Hall Of Fame
    Registriert seit
    03.06.2004
    Beiträge
    3.282
    Beitragswertungen
    239 Beitragspunkte
    ehm ja, ...

    Ich hab da grade keine idee was das soll, lad doch die datei nochmal hoch evtl hat er es nicht gemocht
    Meine Postings repräsentieren meine Meinung wenn nicht anders gekennzeichnet.
    MFG Rock@wulf
    0 Mitglieder finden den Beitrag gut.
  13. #13
    User Pic
    Siggi Hall Of Fame
    Registriert seit
    08.02.2007
    Beiträge
    6.558
    Beitragswertungen
    327 Beitragspunkte
    hm habs nun nochmal gemacht also hab ganzen text makiert und copy + past kommt immer wieder das gleiche
    0 Mitglieder finden den Beitrag gut.
  14. #14
    User Pic
    Mairu Coder
    Registriert seit
    16.06.2006
    Beiträge
    15.334
    Beitragswertungen
    386 Beitragspunkte
    Irgendwelche Zeichen sind da, ggf. mal schauen bis wohin der Cursor geht und dann alle (unsichtbaren) Zeichen löschen, wäre zumindest ein Versuch.
    Und auch immer mal ein Blick auf die FAQ werfen. | Mairus Ilchseite
    0 Mitglieder finden den Beitrag gut.
  15. #15
    User Pic
    Siggi Hall Of Fame
    Registriert seit
    08.02.2007
    Beiträge
    6.558
    Beitragswertungen
    327 Beitragspunkte
    hm geht leider auch nicht ganz nun zeigt er mir dann an
    Parse error: syntax error, unexpected T_STRING in /usr/export/www/vhosts/funnetwork/hosting/ilch/include/contents/articles.php on line 16

    Obwohl bei 16 kein unsichtbares zeichen dahinter ist nach den ; ist schluss
    <?php
    #   Copyright by: Manuel Staechele
    #   Edit by: Nero
    #   Support: www.ilch.de
    
    
    defined ('main') or die ( 'no direct access' );
    
    //PHP datei mit den funktionen laden
    require_once('include/includes/func/articles.php');
    
    
    switch(escape($menu->get(1),'string')){
    default:
             #-> Kategorien-Pfad erstellen
             $cid = ( $menu->get(1) ? escape($menu->get(1), 'integer') : 0 );
             $erg = db_query("SELECT cat,name,schreibr FROM `prefix_artsys_cats` WHERE id = ".$cid." AND recht >= ".$_SESSION['authright']." ORDER BY pos");
             if (db_num_rows($erg) > 0) {
                $row = db_fetch_assoc($erg);
                $array = get_cats_array($row['cat'],'');
                if (!empty($array) ) {
                   $titelzw = get_cats_title($array);
                   $namezw = get_cats_urls($array);
                } else {
                   $titelzw = '';
                   $namezw = '';
                }
                $cattitle = ':: '.$titelzw.$row['name'];
                $catname = '<b> &raquo; </b>'.$namezw.$row['name'];
             } else {
                if ($cid <> 0) {
                   $title = $allgAr['title'].' :: Artikeln ';
                   $hmenu = '<a class="smalfont" href="?articles">Artikeln</a>';
                   $design = new design ( $title , $hmenu );
                   $design->header();
                   echo 'Die Kategorie wurde nicht gefunden';
                   $design->footer(1);
                }
                $cattitle = '';
                $catname = '';
             }
             $schreibrecht = $row['schreibr'];
             #-> Ausgabe
             $title = $allgAr['title'].' :: Artikeln '.$cattitle;
             $hmenu = '<a class="smalfont" href="?articles">Artikeln</a>'.$catname;
             $design = new design ( $title , $hmenu );
             $design->header();
             $tpl = new tpl ('articles' );
             $tpl->out(0);
             $tpl->set('cid', $cid);
             $erg = db_query("SELECT id,name,`desc` FROM `prefix_artsys_cats` WHERE cat = ".$cid." AND recht >= ".$_SESSION['authright']." ORDER BY pos");
             if ( db_num_rows($erg) > 0 ) {
                $tpl->out(1); $class = 'Cnorm';
                while ($row = db_fetch_assoc($erg) ) {
                   $row['anzArt'] = count_art($row['id']);
                   $class = ($class == 'Cmite' ? 'Cnorm' : 'Cmite');
                   $row['class'] = $class;
                   $tpl->set_ar_out($row,2);
                }
                $tpl->out(3);
             }
             #->sortieren
             $felder = array('art_pos','art_viewed','art_time');
             $row = artsys_sort_func($menu->get(2),escape($menu->get(3),'string'),$felder,'list_articles');
             $sort = $row['sort'];
             unset($row['sort']);
             #->sortieren ende
             //Seiten
             $limit = $ArtsysArray['anzArt_perSite'];  // Limit
             $page = ($menu->getA(2) == 'p' ? $menu->getE(2) : 1 );
             $MPL = db_make_sites($page, " WHERE art_cat = ".$cid." AND art_status = 1 ", $limit, '?articles-'.$cid, 'artsys_articles');
             $anfang = ($page - 1) * $limit;
             //Aussgabe
             $erg = db_query("SELECT art_id,art_title,art_preview,art_rating,art_image,art_difficult,art_uid,art_viewed,DATE_FORMAT(art_time,'%d.%m.%Y') as datum from `prefix_artsys_articles` WHERE art_cat = ".$cid." AND art_status = 1 ORDER BY $sort LIMIT $anfang, $limit");
             $anz_art = db_num_rows($erg);
             (($anz_art > 0 OR $cid<>0) ? $tpl->set_ar_out($row,4):'');
             if ( $anz_art > 0 ) {
                $class = 'Cnorm';
                while($row = db_fetch_assoc($erg) ) {
                   $class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' );
                   $row['class'] = $class;
                   $row['art_preview'] = bbcode($row['art_preview']);
                   $row['vorschau'] = '';
                   $row['float'] = '';
                   if ($row['art_image'] <> "" AND file_exists($row['art_image'])){
                       $row['vorschau'] = '<a href="index.php?articles-show-A'.$row['art_id'].'"><img src="'.$row['art_image'].'" alt="'.$row['art_title'].'" title="'.$row['art_title'].'" style="border: medium none ; float: left; padding-right: 5px;"></a>';
                   }
                   artsys_hexToRgb(array($ArtsysArray['diff_bgcolor'],$ArtsysArray['diff_color'],$ArtsysArray['diff_nonecolor']),'diff');
                   $row['art_difficult'] = ($row['art_difficult'] > 0?'Schwierigkeit : <img src="include/images/articles/art_diff_image.php?d='.$row['art_difficult'].'" alt="'.$ArtsysArray['diff'][$row['art_difficult']].'" title="'.$ArtsysArray['diff'][$row['art_difficult']].'" ><br />':'');
                   $row['art_rating'] = show_vote_stats($row['art_rating']);
                   $row['username'] = get_n($row['art_uid']);
                   $tpl->set_ar_out($row,5);
                }
             }else{
                echo ($cid<>0?'<tr><td colspan="3" class="Cnorm">Kein Artikel vorhanden</td></tr>':'');
             }
             (((($anz_art > 0 AND $ArtsysArray['allow_defKat'] <> 0)OR $cid<>0) AND $schreibrecht == 1 )?$tpl->set_out('new_art_cat',($cid<>0?"-C$cid":""),6):'');
             (($anz_art > 0 OR $cid<>0)?$tpl->out(7):"");
             echo $MPL;
             $design->footer();
    break;
    case 'show':
            $fid =escape($menu->getE(2),'integer');
            $erg = db_query("SELECT art_cat,art_viewed,art_votes,art_rating,art_title,art_uid,art_content,art_id,DATE_FORMAT(art_time,'%d.%m.%Y') as datum
                             FROM `prefix_artsys_articles` artsys LEFT JOIN `prefix_artsys_cats` ON id = art_cat
                             WHERE art_id = ".$fid." AND art_status = 1 AND (".$_SESSION['authright']." <= recht OR (art_cat = 0 AND recht IS NULL))");
            if (@db_num_rows($erg) !== 1) {
               $title = $allgAr['title'].' :: Artikeln ';
               $hmenu = '<a class="smalfont" href="?articles">Artikeln</a>';
               $design = new design ( $title , $hmenu );
               $design->header();
               echo 'Der Artikel wurde nicht gefunden';
               $design->footer(1);
            }
            $row = db_fetch_assoc($erg);
            #-> umfrage einen hoch zaehlen ...
            if ($menu->getA(3) === 'z' AND is_numeric($menu->getE(3)) AND !isset($_SESSION['artDoVote'][$row['art_id']]) AND loggedin() ) {
               $_SESSION['artDoVote'][$row['art_id']] = 'o';
               $row['art_rating'] = round( ( ($row['art_rating'] * $row['art_votes'] ) + $menu->getE(3) ) / ( $row['art_votes'] + 1 ), 3);
               $row['art_votes']++;
               db_query("UPDATE prefix_artsys_articles SET art_rating = ".$row['art_rating'].", art_votes = ".$row['art_votes']." WHERE art_id = ".$fid);
            }
            #-> visits einen hoch zaehlen ...
            if (!isset ($_SESSION['artDoKlick'][$row['art_id']]) ) {
               $_SESSION['artDoKlick'][$row['art_id']] = 'o';
               db_query("UPDATE prefix_artsys_articles SET art_viewed = art_viewed +1 WHERE art_id = ".$fid);
            }
            #-> Kategorien-Pfad erstellen
            $cid = $row['art_cat'];
            $erg1 = db_query("SELECT id,cat,name FROM `prefix_artsys_cats` WHERE id = ".$cid);
            if (db_num_rows($erg1)>0){
               $row1 = db_fetch_assoc($erg1);
               $array = get_cats_array($row1['cat'],'');
               if (!empty($array)){
                  $titelzw = get_cats_title($array);
                  $namezw = get_cats_urls($array);
               }else{
                  $titelzw = '';
                  $namezw = '';
               }
               $cattitle = ':: '.$titelzw.$row1['name'].' :: '.$row['art_title'];
               $catname = '<b> &raquo; </b>'.$namezw.'<a class="smalfont" href="?articles-'.$row1['id'].'">'.$row1['name'].'</a>'; //<b> &raquo; </b>'.$row['name'].' '.$row['version'];
            } else {
               $cattitle = '';
               $catname = '';
            }
            /*Kommentare immer anzeigen
            if ($menu->getA(2) === 'A'){
               #-> Artikel-Page setzen
               $art_page = ($menu->getA(3) === 'P'?$menu->getE(3):1);
               #-> Anz kommentare holen
               $comAnz= db_result(db_query("SELECT COUNT(ID) FROM `prefix_koms` WHERE uid = ".$row['art_id']." AND cat = 'ARTICLES'"),0);
               #-> Ausgabe
               $page = make_art_pages($row['art_content'],$art_page,$fid);
               $title = $allgAr['title'].' :: Artikeln '.$cattitle;
               $hmenu = '<a class="smalfont" href="?articles">Artikeln</a>'.$catname;
               $design = new design ( $title , $hmenu );
                       $design->header();
               $tpl = new tpl ('articles' );
               $row['creater'] = get_n($row['art_uid']);
               $row['comOderShow'] = ' &nbsp;<a href="index.php?articles-show-C'.$row['art_id'].'">'.$comAnz.' '.$lang['comments'].'</a>';
               $row['art_title'] .= (($row['art_uid'] == $_SESSION['authid'] OR has_right(-9, 'articles'))?
                                    ' &nbsp;&nbsp;<a href="?articles-write-E'.$row['art_id'].'"><img border="0" src="include/images/icons/edit.gif" title="editieren" alt="editieren"></a>':'');
               $row['art_rating'] = show_vote_stats($row['art_rating']);
               show_vote($row['art_id']);//Vote ausgeben
               $tpl->set_ar_out($row,8);
               $tpl->set_ar_out($page,9);
               $tpl->out(13);
            }elseif($menu->getA(2) === 'C'){
            **/
            if ($menu->getA(2) === 'A' OR $menu->getA(2) === 'C'){
               # kommentar add
               if (!empty($_POST['name']) AND !empty($_POST['text']) AND ($ArtsysArray['user_comment_right'] === 2 OR loggedin())) {
                       $_POST['text'] = escape($_POST['text'],'textarea');
                       $_POST['name'] = escape($_POST['name'],'string');
                       db_query("INSERT INTO `prefix_koms` VALUES ('',".$fid.",'ARTICLES','".$_POST['name']."','".$_POST['text']."')");
               }
               #-> Artikel-Page setzen
               $art_page = ($menu->getA(3) === 'P'?$menu->getE(3):1);
               # kommentar loeschen
               if ($menu->getA(3) == 'd' AND is_numeric($menu->getE(3)) AND is_admin()) {
                       $kommentar_id = escape($menu->getE(3),'integer');
                       db_query("DELETE FROM `prefix_koms` WHERE uid = ".$fid." AND cat = 'ARTICLES' AND id = ".$kommentar_id);
               }
               #-> Ausgabe
               $title = $allgAr['title'].' :: Artikeln '.$cattitle;
               $hmenu = '<a class="smalfont" href="?articles">Artikeln</a>'.$catname;
               $design = new design ( $title , $hmenu );
               $design->header();
               $tpl = new tpl ('articles' );
               $row['creater'] = get_n($row['art_uid']);
               $row['comOderShow'] = '';#' &nbsp;<a href="?articles-show-A'.$row['art_id'].'">Artikel lesen</a>';
               $row['art_title'] .= (($row['art_uid'] == $_SESSION['authid'] OR has_right(-9, 'articles'))?
                                    ' &nbsp;&nbsp;<a href="?articles-write-E'.$row['art_id'].'"><img border="0" src="include/images/icons/edit.gif" title="editieren" alt="editieren"></a>':'');
               $row['art_rating'] = show_vote_stats($row['art_rating']);
               show_vote($row['art_id'],'C');//Vote ausgeben
               $tpl->set_ar_out($row,8);
               $tpl->set_ar_out($page,9);
               #-> Kommentar insertfields
               if ($ArtsysArray['user_comment_right'] == 2 OR loggedin()){
                  $row_ins = array('uname'=>get_n($_SESSION['authid']),'art_id'=>$row['art_id']);
                  $tpl->set_ar_out($row_ins,10);
               }elseif($ArtsysArray['user_comment_right'] != 0){
                  $tpl->set_out('writeout','du musst eingelogt sein um einen Kommentare zu schreiben',11);
               }
               #-> kommentar show
               #->sortieren
               $felder = array('id');
               $row2 = artsys_sort_func($menu->get(3),escape($menu->get(4),'string'),$felder,'com_articles');
               $sort = $row2['sort'];
               unset($row2['sort']);
               #->sortieren ende
               //Seiten
               $erg2 = db_query("SELECT text, name, id FROM `prefix_koms` WHERE uid = ".$row['art_id']." AND cat = 'ARTICLES' ORDER BY $sort");
               $ergAnz1 = db_num_rows($erg2);
               $limit = $ArtsysArray['anzCom_perSite'];  // Limit
               $page = ($menu->getA(3) == 'p' ? $menu->getE(3) : 1 );
               $MPL = db_make_sites($page, "", $limit, '?articles-show-C'.$row['art_id'],"",$ergAnz1);
               $anfang = ($page - 1) * $limit;
               //Aussgabe
               $erg2 = db_query("SELECT text, name, id FROM `prefix_koms` WHERE uid = ".$row['art_id']." AND cat = 'ARTICLES' ORDER BY $sort LIMIT $anfang,$limit");
               if ( $ergAnz1 == 0 ) {
                  $tpl->set_out('writeout',$lang['nocomments'],11);
                  $tpl->out(13);
               }elseif($ArtsysArray['user_comment_right'] == 0 AND !loggedin()){
                  $tpl->set_out('writeout','du musst eingelogt sein um die Kommentare zu sehen, bzw. einen zu schreiben',11);
                  $tpl->out(13);
               }else{
                       echo '<tr><td class="Cnorm"><a href="index.php?articles-show-C'.$row['art_id'].'-sort-'.$row2['s0'].'">'.ucfirst(substr($row2['s0'],1)).' sortieren</a>&nbsp; <img src="include/images/icons/pfeil'.$row2['p0'].'.gif" border="0"></td></tr>';
                       $rtung = $row2['s0'];
                       $zahl = ($rtung == '0auf'?($ergAnz1-$anfang):($anfang + 1));
                       while ($row2 = db_fetch_assoc($erg2)) {
                               $row2['text'] = bbcode(trim($row2['text']));
                               if (is_admin()) {
                                   $row2['text'] .= '<a href="index.php?articles-show-C'.$row['art_id'].'-d'.$row2['id'].'"><img src="include/images/icons/del.gif" alt="l&ouml;schen" border="0" title="l&ouml;schen" /></a>';
                               }
                               $tpl->set_ar_out(array('name' => $row2['name'], 'text' => $row2['text'], 'zahl' => $zahl ),12);
                               ($rtung == '0auf'?$zahl--:$zahl++);
                       }
                       $tpl->out(13);
                       echo $MPL;
               }
               # kommentar show ende
            }else{
               $title = $allgAr['title'].' :: Artikeln ';
               $hmenu = '<a class="smalfont" href="?articles">Artikeln</a>';
               $design = new design ( $title , $hmenu );
               $design->header();
               echo 'Unbekannter Befehl';
            }
            $design->footer();
    break;
    case 'write':
         if (has_right(-9, 'articles') AND $ArtsysArray['hasright_thenAdmin'] == 1){
           $host  = $_SERVER['HTTP_HOST'];
           $uri   = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
           if($menu->getA(2) === 'E')
             header("Location: http://$host$uri/admin.php?articles-editArt-E".$menu->getE(2));
           else
             header("Location: http://$host$uri/admin.php?articles-newArt-C".$menu->getE(2));
           exit;
         }
         $title = $allgAr['title'].' :: Artikeln :: erstellen/&uuml;berarbeiten';
         $hmenu = '<a class="smalfont" href="?articles">Artikeln</a><b> &raquo; </b>erstellen/&uuml;berarbeiten';
         $design = new design ( $title , $hmenu );
         $design->header();
         if($_SESSION['authright'] <= $ArtsysArray['write_right']){
            if ($menu->getA(2) === 'E'){
               if (!$row = @db_fetch_assoc(db_query('SELECT art_pos, art_id, art_cat, art_title, art_content, art_preview, art_uid, art_image, art_difficult FROM `prefix_artsys_articles` WHERE art_id = '.$menu->getE(2)))){
                  wd('?articles','Artikel ist nicht vorhanden',3);
                    $design->footer(1);
               }
               $row['mod_title'] = 'Artikel editieren';
            }else{
               $row = array('art_title'=>'', 'art_cat'=>$menu->getE(2), 'art_content'=>'', 'art_preview'=>'','art_id'=>'','art_image'=>'a897s','mod_title'=>'Neuer Artikel schreiben','art_uid'=>'','art_difficult'=>'');
            }
            if (isset($_POST['submit'])){#-> Artikel speichern oder updaten
               if (isset($_POST['artID']) AND $_POST['artID'] == $menu->getE(2)){#-> Artikel ändern
                  $insArr = array('txt'=>'txt','titel'=>'str','art_preview'=>'str','cat'=>'','artID'=>'','difficult'=>'');
                  $insert = escape_arrays($_POST,$insArr);
                  cat_exist_and_has_right($insert['cat'],$ArtsysArray['allow_defKat'],'front',$row['art_uid'],$row['art_cat']);#-> auf Recht prüfen
                  if ($row['art_cat'] <> $insert['cat']){#-> Schauen ob neue Kategorie
                     $pos = db_result(db_query("SELECT COUNT(*) FROM `prefix_artsys_articles` WHERE art_cat = ".$insert['cat']),0);
                     db_query("UPDATE `prefix_artsys_articles` SET art_pos = art_pos - 1 WHERE art_pos > ".$row['art_pos']." AND art_cat = ".$row['art_cat']);
                  }else{
                     $pos = $row['art_pos'];
                  }
                  db_query('UPDATE `prefix_artsys_articles` SET
                           art_status = 0,
                           art_cat = '.$insert['cat'].',
                           art_pos = '.$pos.',
                           art_title = "'.$insert['titel'].'",
                           art_content  = "'.$insert['txt'].'",
                           art_preview  = "'.$insert['art_preview'].'",
                           art_difficult = '.$insert['difficult'].'
                           WHERE art_id = '.$insert['artID'].' LIMIT 1');
                  $imageMsg = $ArtsysArray['vballow'] == 1?config_art_image($insert['artID']):'';
                  #-> Angaben für PM und Weiterleitung
                  $wd = array('pfad'=>'?articles'.($insert['cat'] == 0?'':'-'.$insert['cat']),'msg'=>'Artikel erfolgreich ge&auml;ndert');
                  $msg = "Artikel ".$row['art_title']." wurde ge&auml;ndert in: \n Titel: ".$insert['titel']." \n Kategorie: ";
                  $msg_titel = 'Artikel wurde editiert';
               }else{#-> Neuer Artikel einfügen
                  $insArr = array('txt'=>'txt','titel'=>'str','art_preview'=>'str','cat'=>'','difficult'=>'');
                  $insert = escape_arrays($_POST,$insArr);
                  cat_exist_and_has_right($insert['cat'],$ArtsysArray['allow_defKat'],'front');#-> auf Recht prüfen
                  $pos = db_result(db_query("SELECT COUNT(*) FROM `prefix_artsys_articles` WHERE art_cat = ".$insert['cat']),0);
                  db_query('INSERT INTO `prefix_artsys_articles` (art_uid,art_cat,art_pos,art_time,art_title,art_content,art_preview,art_difficult) VALUES
                            ('.$_SESSION['authid'].','.$insert['cat'].','.$pos.',NOW(),"'.$insert['titel'].'","'.$insert['txt'].'","'.$insert['art_preview'].'",'.$insert['difficult'].')');
                  $imageMsg = $ArtsysArray['vballow'] == 1?config_art_image(db_last_id()):'';
                  #-> Angaben für PM und Weiterleitung
                  $wd = array('pfad'=>'?articles'.($insert['cat'] == 0?'':'-'.$insert['cat']),'msg'=>'Artikel erfolgreich eingef&uuml;gt');
                  $msg = "Es wurde ein neuer Artikel eingetragen: \n \n Titel: ".$insert['titel']." \n Kategorie: ";
                  $msg_titel = 'Neuer Artikel';
               }
      
               if (!has_right(-9, 'articles')){
                  $row_art = db_fetch_assoc(db_query("SELECT pm,name FROM `prefix_artsys_cats` WHERE id = ".$insert['cat']));
                  if ($row_art['pm']<>0 OR ($ArtsysArray['allow_defKat']<>0 AND $ArtsysArray['defKat_uid']<>0)){
                     sendpm($_SESSION['authid'],$row_art['pm'],$msg_titel,$msg .= $row_art['name']." \n \n und wartet darauf freigeschaltet zu werden! \n\n Das Artikelmodul ;)");
                  }
               }
               wd($wd['pfad'],$wd['msg'].' <br> <br> '.$imageMsg,3);
            }else{
               if (isset($_POST['preview'])){#-> alles für die Vorschau aufbereiten
                  $art = array('txt'=>trim(escape($_POST['txt'],'textarea')),'pref'=>trim(escape($_POST['art_preview'],'textarea')),'titel'=>trim($_POST['titel']),'display'=>'');
                  $art['preview'] = MAT_for_priview(bbcode(unescape($art['txt'])),unescape($art['pref']));
                  $row['art_cat'] = escape($_POST['cat'],'integer');
                  $row['art_difficult'] = escape($_POST['difficult'],'integer');
               }else{
                  $art = array('txt'=>$row['art_content'],'pref'=>$row['art_preview'],'titel'=>$row['art_title'],'display'=>'style="display:none;"','preview'=>'');
               }
               cat_exist_and_has_right($row['art_cat'],$ArtsysArray['allow_defKat'],'front',$row['art_uid']);
               $tpl = new tpl ('articles_write' );
               $out = array('modul_titel' =>$row['mod_title'],
                            'show_preview'=>$art['preview'],
                            'art_txt'     =>escape_for_fields(unescape($art['txt'])),
                            'preview'      => escape_for_fields(unescape($art['pref'])),
                            'art_titel'   =>$art['titel'],
                            'display'     =>$art['display'],
                            'smilies'     =>getsmilies(),
                            'kat'         =>($menu->getA(2) <> 'E'?($row['art_cat'] <> 0?'-'.$row['art_cat']:''):'-show-A'.$menu->getE(2)),
                            'cat_list'    =>($ArtsysArray['allow_defKat']<>0?'<option value="0">Keine</option>':'').dblistee($row['art_cat'],"SELECT id,name FROM `prefix_artsys_cats` WHERE (recht >= ".$_SESSION['authright']." AND schreibr = 1) OR id = ".$row['art_cat']." ORDER BY name ASC"),
                            'artID'       =>($row['art_id']<>''?'<input type="hidden" name="artID" value="'.$row['art_id'].'" />':''),
                            'text_cols'   =>$ArtsysArray['frontend_textarea_cols'],
                            'text_rows'   =>$ArtsysArray['frontend_textarea_rows'],
                            'TXTL'        =>$ArtsysArray['frontend_textarea_min_lenge'],
                            'art_image_upload'   => ($ArtsysArray['vballow'] == 1?html_art_image($row['art_image']):""),
                            'art_difficult'=>html_art_diff($row['art_difficult'],"'front'"),
                            );
               $tpl->set_ar_out($out,0);
            }
         }else{wd('?articles','Keine Berechtigung',3);}
         $design->footer();
    break;
    case 'search':
      
         $suche = '';
         if (isset($_POST['search'])){
            $suche = $_POST['search_after'].$_POST['search'];
         }elseif (!empty($_GET['articles-search'])){
            $suche = $_GET['articles-search'];
         }
         $sucheNach = substr($suche,0,1);
         $suche = stripslashes(escape(substr($suche,1), 'string'));
           
         $title = $allgAr['title'].' :: Artikeln :: Suchen '.(!empty($suche)?':: nach: '.htmlentities($suche):"");
         $hmenu  = '<a class="smalfont" href="?articles">Artikeln</a><b> &raquo; </b><a class="smalfont" href="index.php?articles-search">Suchen</a>'.(!empty($suche)?'<b> &raquo; </b> nach: '.htmlentities($suche):"");
         $design = new design ( $title , $hmenu );
         $design->header();
           
         $tpl = new tpl ('articles_write');
         $out = array(
           'search'=>$suche,
           'a_title'=> (isset($_REQUEST['after_title'])?'checked="checked"':""),
           'a_preview'=> (isset($_REQUEST['after_preview'])?'checked="checked"':""),
           'a_txt'=> (isset($_REQUEST['after_txt'])?'checked="checked"':""),
         );
      
         $tpl->set_ar_out($out,1);
           
         if (!empty($suche)){
            #-> Seiten einteilung
            $page = 1;
            $limit = 25;  // Limit
            if (isset($_GET['page'])) {
               $page = trim(str_replace('-p','',$_GET['page']));
            }
            $anfang = ($page - 1) * $limit;
            #-> Seiten einteilung Ende
      
            $x = time() - (3600 * 24 * 360);
            if ($sucheNach == '1' AND $uid = @db_result(db_query("SELECT id FROM prefix_user WHERE name = BINARY '".$suche."'"),0)){// Nach Autor suchen
               $sucheSql = "art_uid = $uid AND ";
               $sucheSucc = true;
            }else{ //Text suche
               echo $sucheNach ==  '1'?"<span style='color:#FF0000; background:#000000;'>User '$suche' wurde nicht gefunden </span>":"";
               $suche = str_replace('-','',$suche);
               $suche = str_replace('=','',$suche);
               $suche = str_replace('&','',$suche);
               $searar = explode(' ', $suche);
               $sucheSql = '';
               foreach($searar as $elem) {
                  $str = str_replace('\'','',$elem);
                  $str = str_replace('"','',$str);
                  $str = addslashes($str);
                  if (!empty($str)) {
                     $sucheSqlTeil = '';
                     $sucheSqlTeil .= (isset($_REQUEST['after_title'])?" art_title LIKE '%$str%' OR ":"");
                     $sucheSqlTeil .= (isset($_REQUEST['after_preview'])?" art_preview LIKE '%$str%' OR ":"");
                     $sucheSqlTeil .= (isset($_REQUEST['after_txt'])?" art_content LIKE '%$str%' OR ":"");
                     $sucheSql .= ($sucheSqlTeil <> ''?" ( $sucheSqlTeil 1 = 2 ) AND ":" ");
                  }
               }
      
            }
            $sql = "SELECT DISTINCT art_id, art_title as titel FROM `prefix_artsys_articles` artsys LEFT JOIN `prefix_artsys_cats` ON id = art_cat
                   WHERE ($sucheSql 1 = 1) AND (art_time >= $x) AND art_status = 1 AND (".$_SESSION['authright']." <= recht OR (art_cat = 0 AND recht IS NULL)) ORDER BY art_time DESC";
            $sAnz = db_num_rows(db_query($sql));
              
            if ((($sucheNach == '1' AND isset($sucheSucc)) OR $sucheNach == '0') AND $sAnz > 0){
               $tpl->set('sAnz',$sAnz);
               $url = '';
               $url .= (isset($_REQUEST['after_title'])?"&amp;after_title=1":"");
               $url .= (isset($_REQUEST['after_preview'])?"&amp;after_preview=1":"");
               $url .= (isset($_REQUEST['after_txt'])?"&amp;after_txt=1":"");
               $tpl->set_out('MPL',$MPL = db_make_sites ($page , "" , $limit , 'index.php?articles-search='.urlencode($suche).$url.'&amp;page=' , "", $sAnz),2);
      
               echo $sucheNach == 1 ? ($sAnz > 1?'Folgende Artikel':'Folgender Artikel')." wurden von $suche geschrieben:":"'$suche' wurde in ".($sAnz > 1?'folgenden Artikeln':'folgendem Artikel')." gefunden:";
               echo "\n <br><br> \n";
                 
               $sql .= " LIMIT ".$anfang.",".$limit;
               $erg = db_query($sql) or die(mysql_error());
               $class = '';
               WHILE($row = db_fetch_assoc($erg)){
                  $class = ($class == 'Cmite' ? 'Cnorm' : 'Cmite' );
                  $row['class'] = $class;
                  if ($sucheNach == '1'){
                     $row['titel'] = $suche.' || '.$row['titel'];
                  }
                  $tpl->set_ar_out($row,3);
               }
               $tpl->out(4);
            }elseif($sucheNach == '0'){
               echo "es wurde keinen Artikel gefunden";
            }
         }
         $design->footer();
    break;
    }
    ?>
    0 Mitglieder finden den Beitrag gut.
  16. #16
    User Pic
    Rock@wulf Hall Of Fame
    Registriert seit
    03.06.2004
    Beiträge
    3.282
    Beitragswertungen
    239 Beitragspunkte
    <?php
    #   Copyright by: Manuel Staechele
    #   Edit by: Nero
    #   Support: www.ilch.de
     
     
    defined ('main') or die ( 'no direct access' );
     
    //PHP datei mit den funktionen laden
    require_once('include/includes/func/articles.php');
     
     
    switch(escape($menu->get(1),'string')){
    default:
             #-> Kategorien-Pfad erstellen
             $cid = ( $menu->get(1) ? escape($menu->get(1), 'integer') : 0 );
             $erg = db_query("SELECT cat,name,schreibr FROM `prefix_artsys_cats` WHERE id = ".$cid." AND recht >= ".$_SESSION['authright']." ORDER BY pos");
             if (db_num_rows($erg) > 0) {
                $row = db_fetch_assoc($erg);
                $array = get_cats_array($row['cat'],'');
                if (!empty($array) ) {
                   $titelzw = get_cats_title($array);
                   $namezw = get_cats_urls($array);
                } else {
                   $titelzw = '';
                   $namezw = '';
                }
                $cattitle = ':: '.$titelzw.$row['name'];
                $catname = '<b> &raquo; </b>'.$namezw.$row['name'];
             } else {
                if ($cid <> 0) {
                   $title = $allgAr['title'].' :: Artikeln ';
                   $hmenu = '<a class="smalfont" href="?articles">Artikeln</a>';
                   $design = new design ( $title , $hmenu );
                   $design->header();
                   echo 'Die Kategorie wurde nicht gefunden';
                   $design->footer(1);
                }
                $cattitle = '';
                $catname = '';
             }
             $schreibrecht = $row['schreibr'];
             #-> Ausgabe
             $title = $allgAr['title'].' :: Artikeln '.$cattitle;
             $hmenu = '<a class="smalfont" href="?articles">Artikeln</a>'.$catname;
             $design = new design ( $title , $hmenu );
             $design->header();
             $tpl = new tpl ('articles' );
             $tpl->out(0);
             $tpl->set('cid', $cid);
             $erg = db_query("SELECT id,name,`desc` FROM `prefix_artsys_cats` WHERE cat = ".$cid." AND recht >= ".$_SESSION['authright']." ORDER BY pos");
             if ( db_num_rows($erg) > 0 ) {
                $tpl->out(1); $class = 'Cnorm';
                while ($row = db_fetch_assoc($erg) ) {
                   $row['anzArt'] = count_art($row['id']);
                   $class = ($class == 'Cmite' ? 'Cnorm' : 'Cmite');
                   $row['class'] = $class;
                   $tpl->set_ar_out($row,2);
                }
                $tpl->out(3);
             }
             #->sortieren
             $felder = array('art_pos','art_viewed','art_time');
             $row = artsys_sort_func($menu->get(2),escape($menu->get(3),'string'),$felder,'list_articles');
             $sort = $row['sort'];
             unset($row['sort']);
             #->sortieren ende
             //Seiten
             $limit = $ArtsysArray['anzArt_perSite'];  // Limit
             $page = ($menu->getA(2) == 'p' ? $menu->getE(2) : 1 );
             $MPL = db_make_sites($page, " WHERE art_cat = ".$cid." AND art_status = 1 ", $limit, '?articles-'.$cid, 'artsys_articles');
             $anfang = ($page - 1) * $limit;
             //Aussgabe
             $erg = db_query("SELECT art_id,art_title,art_preview,art_rating,art_image,art_difficult,art_uid,art_viewed,DATE_FORMAT(art_time,'%d.%m.%Y') as datum from `prefix_artsys_articles` WHERE art_cat = ".$cid." AND art_status = 1 ORDER BY $sort LIMIT $anfang, $limit");
             $anz_art = db_num_rows($erg);
             (($anz_art > 0 OR $cid<>0) ? $tpl->set_ar_out($row,4):'');
             if ( $anz_art > 0 ) {
                $class = 'Cnorm';
                while($row = db_fetch_assoc($erg) ) {
                   $class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' );
                   $row['class'] = $class;
                   $row['art_preview'] = bbcode($row['art_preview']);
                   $row['vorschau'] = '';
                   $row['float'] = '';
                   if ($row['art_image'] <> "" AND file_exists($row['art_image'])){
                       $row['vorschau'] = '<a href="index.php?articles-show-A'.$row['art_id'].'"><img src="'.$row['art_image'].'" alt="'.$row['art_title'].'" title="'.$row['art_title'].'" style="border: medium none ; float: left; padding-right: 5px;"></a>';
                   }
                   artsys_hexToRgb(array($ArtsysArray['diff_bgcolor'],$ArtsysArray['diff_color'],$ArtsysArray['diff_nonecolor']),'diff');
                   $row['art_difficult'] = ($row['art_difficult'] > 0?'Schwierigkeit : <img src="include/images/articles/art_diff_image.php?d='.$row['art_difficult'].'" alt="'.$ArtsysArray['diff'][$row['art_difficult']].'" title="'.$ArtsysArray['diff'][$row['art_difficult']].'" ><br />':'');
                   $row['art_rating'] = show_vote_stats($row['art_rating']);
                   $row['username'] = get_n($row['art_uid']);
                   $tpl->set_ar_out($row,5);
                }
             }else{
                echo ($cid<>0?'<tr><td colspan="3" class="Cnorm">Kein Artikel vorhanden</td></tr>':'');
             }
             (((($anz_art > 0 AND $ArtsysArray['allow_defKat'] <> 0)OR $cid<>0) AND $schreibrecht == 1 )?$tpl->set_out('new_art_cat',($cid<>0?"-C$cid":""),6):'');
             (($anz_art > 0 OR $cid<>0)?$tpl->out(7):"");
             echo $MPL;
             $design->footer();
    break;
    case 'show':
            $fid =$menu->getE(2);
            $erg = db_query("SELECT art_cat,art_viewed,art_votes,art_rating,art_title,art_uid,art_content,art_id,DATE_FORMAT(art_time,'%d.%m.%Y') as datum
                             FROM `prefix_artsys_articles` artsys LEFT JOIN `prefix_artsys_cats` ON id = art_cat
                             WHERE art_id = ".$fid." AND art_status = 1 AND (".$_SESSION['authright']." <= recht OR (art_cat = 0 AND recht IS NULL))");
            if (@db_num_rows($erg) !== 1) {
               $title = $allgAr['title'].' :: Artikeln ';
               $hmenu = '<a class="smalfont" href="?articles">Artikeln</a>';
               $design = new design ( $title , $hmenu );
               $design->header();
               echo 'Der Artikel wurde nicht gefunden';
               $design->footer(1);
            }
            $row = db_fetch_assoc($erg);
            #-> umfrage einen hoch zaehlen ...
            if ($menu->getA(3) === 'z' AND is_numeric($menu->getE(3)) AND !isset($_SESSION['artDoVote'][$row['art_id']]) AND loggedin() ) {
               $_SESSION['artDoVote'][$row['art_id']] = 'o';
               $row['art_rating'] = round( ( ($row['art_rating'] * $row['art_votes'] ) + $menu->getE(3) ) / ( $row['art_votes'] + 1 ), 3);
               $row['art_votes']++;
               db_query("UPDATE prefix_artsys_articles SET art_rating = ".$row['art_rating'].", art_votes = ".$row['art_votes']." WHERE art_id = ".$fid);
            }
            #-> visits einen hoch zaehlen ...
            if (!isset ($_SESSION['artDoKlick'][$row['art_id']]) ) {
               $_SESSION['artDoKlick'][$row['art_id']] = 'o';
               db_query("UPDATE prefix_artsys_articles SET art_viewed = art_viewed +1 WHERE art_id = ".$fid);
            }
            #-> Kategorien-Pfad erstellen
            $cid = $row['art_cat'];
            $erg1 = db_query("SELECT id,cat,name FROM `prefix_artsys_cats` WHERE id = ".$cid);
            if (db_num_rows($erg1)>0){
               $row1 = db_fetch_assoc($erg1);
               $array = get_cats_array($row1['cat'],'');
               if (!empty($array)){
                  $titelzw = get_cats_title($array);
                  $namezw = get_cats_urls($array);
               }else{
                  $titelzw = '';
                  $namezw = '';
               }
               $cattitle = ':: '.$titelzw.$row1['name'].' :: '.$row['art_title'];
               $catname = '<b> &raquo; </b>'.$namezw.'<a class="smalfont" href="?articles-'.$row1['id'].'">'.$row1['name'].'</a>'; //<b> &raquo; </b>'.$row['name'].' '.$row['version'];
            } else {
               $cattitle = '';
               $catname = '';
            }
            /*Kommentare immer anzeigen
            if ($menu->getA(2) === 'A'){
               #-> Artikel-Page setzen
               $art_page = ($menu->getA(3) === 'P'?$menu->getE(3):1);
               #-> Anz kommentare holen
               $comAnz= db_result(db_query("SELECT COUNT(ID) FROM `prefix_koms` WHERE uid = ".$row['art_id']." AND cat = 'ARTICLES'"),0);
               #-> Ausgabe
               $page = make_art_pages($row['art_content'],$art_page,$fid);
               $title = $allgAr['title'].' :: Artikeln '.$cattitle;
               $hmenu = '<a class="smalfont" href="?articles">Artikeln</a>'.$catname;
               $design = new design ( $title , $hmenu );
                       $design->header();
               $tpl = new tpl ('articles' );
               $row['creater'] = get_n($row['art_uid']);
               $row['comOderShow'] = ' &nbsp;<a href="index.php?articles-show-C'.$row['art_id'].'">'.$comAnz.' '.$lang['comments'].'</a>';
               $row['art_title'] .= (($row['art_uid'] == $_SESSION['authid'] OR has_right(-9, 'articles'))?
                                    ' &nbsp;&nbsp;<a href="?articles-write-E'.$row['art_id'].'"><img border="0" src="include/images/icons/edit.gif" title="editieren" alt="editieren"></a>':'');
               $row['art_rating'] = show_vote_stats($row['art_rating']);
               show_vote($row['art_id']);//Vote ausgeben
               $tpl->set_ar_out($row,8);
               $tpl->set_ar_out($page,9);
               $tpl->out(13);
            }elseif($menu->getA(2) === 'C'){
            **/
            if ($menu->getA(2) === 'A' OR $menu->getA(2) === 'C'){
               # kommentar add
               if (!empty($_POST['name']) AND !empty($_POST['text']) AND ($ArtsysArray['user_comment_right'] === 2 OR loggedin())) {
                       $_POST['text'] = escape($_POST['text'],'textarea');
                       $_POST['name'] = escape($_POST['name'],'string');
                       db_query("INSERT INTO `prefix_koms` VALUES ('',".$fid.",'ARTICLES','".$_POST['name']."','".$_POST['text']."')");
               }
               #-> Artikel-Page setzen
               $art_page = ($menu->getA(3) === 'P'?$menu->getE(3):1);
               # kommentar loeschen
               if ($menu->getA(3) == 'd' AND is_numeric($menu->getE(3)) AND is_admin()) {
                       $kommentar_id = escape($menu->getE(3),'integer');
                       db_query("DELETE FROM `prefix_koms` WHERE uid = ".$fid." AND cat = 'ARTICLES' AND id = ".$kommentar_id);
               }
               #-> Ausgabe
               $kommPage=($menu->getA(4) == 'p'?'-p'.$menu->getE(4):'');
               $page = make_art_pages($row['art_content'],$art_page,$fid,$kommPage);
               $title = $allgAr['title'].' :: Artikeln '.$cattitle;
               $hmenu = '<a class="smalfont" href="?articles">Artikeln</a>'.$catname;
               $design = new design ( $title , $hmenu );
               $design->header();
               $tpl = new tpl ('articles' );
               $row['creater'] = get_n($row['art_uid']);
               $row['comOderShow'] = '';#' &nbsp;<a href="?articles-show-A'.$row['art_id'].'">Artikel lesen</a>';
               $row['art_title'] .= (($row['art_uid'] == $_SESSION['authid'] OR has_right(-9, 'articles'))?
                                    ' &nbsp;&nbsp;<a href="?articles-write-E'.$row['art_id'].'"><img border="0" src="include/images/icons/edit.gif" title="editieren" alt="editieren"></a>':'');
               $row['art_rating'] = show_vote_stats($row['art_rating']);
               show_vote($row['art_id'],'C');//Vote ausgeben
               $tpl->set_ar_out($row,8);
               $tpl->set_ar_out($page,9);
               #-> Kommentar insertfields
               if ($ArtsysArray['user_comment_right'] == 2 OR loggedin()){
                  $kommPageInsert=($menu->getA(3) == 'P'?'-P'.$menu->getE(3):'').($menu->getA(4) == 'p'?'-p'.$menu->getE(4):'');
                  $row_ins = array('uname'=>get_n($_SESSION['authid']),'art_id'=>$row['art_id'],'page_index'=>$kommPageInsert);
                  $tpl->set_ar_out($row_ins,10);
               }elseif($ArtsysArray['user_comment_right'] != 0){
                  $tpl->set_out('writeout','du musst eingelogt sein um einen Kommentare zu schreiben',11);
               }
               #-> kommentar show
               #->sortieren
               $felder = array('id');
               $row2 = artsys_sort_func($menu->get(3),escape($menu->get(4),'string'),$felder,'com_articles');
               $sort = $row2['sort'];
               unset($row2['sort']);
               #->sortieren ende
               //Seiten
               $erg2 = db_query("SELECT text, name, id FROM `prefix_koms` WHERE uid = ".$row['art_id']." AND cat = 'ARTICLES' ORDER BY $sort");
               $ergAnz1 = db_num_rows($erg2);
               $limit = $ArtsysArray['anzCom_perSite'];  // Limit
               $pageMenu=($menu->getA(3) == 'P'?4:3);
               $page = ($menu->getA($pageMenu) == 'p' ? $menu->getE($pageMenu) : 1 );
               $komsMenu=($menu->getA(3) == 'P'?'-P'.$menu->getE(3):'');
               $MPL = db_make_sites($page, "", $limit, '?articles-show-C'.$row['art_id'].$komsMenu,"",$ergAnz1);
               $anfang = ($page - 1) * $limit;
               //Aussgabe
               $erg2 = db_query("SELECT text, name, id FROM `prefix_koms` WHERE uid = ".$row['art_id']." AND cat = 'ARTICLES' ORDER BY $sort LIMIT $anfang,$limit");
               if ( $ergAnz1 == 0 ) {
                  $tpl->set_out('writeout',$lang['nocomments'],11);
                  $tpl->out(13);
               }elseif($ArtsysArray['user_comment_right'] == 0 AND !loggedin()){
                  $tpl->set_out('writeout','du musst eingelogt sein um die Kommentare zu sehen, bzw. einen zu schreiben',11);
                  $tpl->out(13);
               }else{
                       echo '<tr><td class="Cnorm"><a href="index.php?articles-show-C'.$row['art_id'].'-sort-'.$row2['s0'].'">'.ucfirst(substr($row2['s0'],1)).' sortieren</a>&nbsp; <img src="include/images/icons/pfeil'.$row2['p0'].'.gif" border="0"></td></tr>';
                       $rtung = $row2['s0'];
                       $zahl = ($rtung == '0auf'?($ergAnz1-$anfang):($anfang + 1));
                       while ($row2 = db_fetch_assoc($erg2)) {
                               $row2['text'] = bbcode(trim($row2['text']));
                               if (is_admin()) {
                                   $row2['text'] .= '<a href="index.php?articles-show-C'.$row['art_id'].'-d'.$row2['id'].'"><img src="include/images/icons/del.gif" alt="l&ouml;schen" border="0" title="l&ouml;schen" /></a>';
                               }
                               $tpl->set_ar_out(array('name' => $row2['name'], 'text' => $row2['text'], 'zahl' => $zahl ),12);
                               ($rtung == '0auf'?$zahl--:$zahl++);
                       }
                       $tpl->out(13);
                       echo $MPL;
               }
               # kommentar show ende
            }else{
               $title = $allgAr['title'].' :: Artikeln ';
               $hmenu = '<a class="smalfont" href="?articles">Artikeln</a>';
               $design = new design ( $title , $hmenu );
               $design->header();
               echo 'Unbekannter Befehl';
            }
            $design->footer();
    break;
    case 'write':
         if (has_right(-9, 'articles') AND $ArtsysArray['hasright_thenAdmin'] == 1){
           $host  = $_SERVER['HTTP_HOST'];
           $uri   = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
           if($menu->getA(2) === 'E')
             header("Location: http://$host$uri/admin.php?articles-editArt-E".$menu->getE(2));
           else
             header("Location: http://$host$uri/admin.php?articles-newArt-C".$menu->getE(2));
           exit;
         }
         $title = $allgAr['title'].' :: Artikeln :: erstellen/&uuml;berarbeiten';
         $hmenu = '<a class="smalfont" href="?articles">Artikeln</a><b> &raquo; </b>erstellen/&uuml;berarbeiten';
         $design = new design ( $title , $hmenu );
         $design->header();
         if($_SESSION['authright'] <= $ArtsysArray['write_right']){
            if ($menu->getA(2) === 'E'){
               if (!$row = @db_fetch_assoc(db_query('SELECT art_pos, art_id, art_cat, art_title, art_content, art_preview, art_uid, art_image, art_difficult FROM `prefix_artsys_articles` WHERE art_id = '.$menu->getE(2)))){
                  wd('?articles','Artikel ist nicht vorhanden',3);
                    $design->footer(1);
               }
               $row['mod_title'] = 'Artikel editieren';
            }else{
               $row = array('art_title'=>'', 'art_cat'=>$menu->getE(2), 'art_content'=>'', 'art_preview'=>'','art_id'=>'','art_image'=>'a897s','mod_title'=>'Neuer Artikel schreiben','art_uid'=>'','art_difficult'=>'');
            }
            if (isset($_POST['submit'])){#-> Artikel speichern oder updaten
               if (isset($_POST['artID']) AND $_POST['artID'] == $menu->getE(2)){#-> Artikel ändern
                  $insArr = array('txt'=>'txt','titel'=>'str','art_preview'=>'str','cat'=>'','artID'=>'','difficult'=>'');
                  $insert = escape_arrays($_POST,$insArr);
                  cat_exist_and_has_right($insert['cat'],$ArtsysArray['allow_defKat'],'front',$row['art_uid'],$row['art_cat']);#-> auf Recht prüfen
                  if ($row['art_cat'] <> $insert['cat']){#-> Schauen ob neue Kategorie
                     $pos = db_result(db_query("SELECT COUNT(*) FROM `prefix_artsys_articles` WHERE art_cat = ".$insert['cat']),0);
                     db_query("UPDATE `prefix_artsys_articles` SET art_pos = art_pos - 1 WHERE art_pos > ".$row['art_pos']." AND art_cat = ".$row['art_cat']);
                  }else{
                     $pos = $row['art_pos'];
                  }
                  db_query('UPDATE `prefix_artsys_articles` SET
                           art_status = 0,
                           art_cat = '.$insert['cat'].',
                           art_pos = '.$pos.',
                           art_title = "'.$insert['titel'].'",
                           art_content  = "'.$insert['txt'].'",
                           art_preview  = "'.$insert['art_preview'].'",
                           art_difficult = '.$insert['difficult'].'
                           WHERE art_id = '.$insert['artID'].' LIMIT 1');
                  $imageMsg = $ArtsysArray['vballow'] == 1?config_art_image($insert['artID']):'';
                  #-> Angaben für PM und Weiterleitung
                  $wd = array('pfad'=>'?articles'.($insert['cat'] == 0?'':'-'.$insert['cat']),'msg'=>'Artikel erfolgreich ge&auml;ndert');
                  $msg = "Artikel ".$row['art_title']." wurde ge&auml;ndert in: \n Titel: ".$insert['titel']." \n Kategorie: ";
                  $msg_titel = 'Artikel wurde editiert';
               }else{#-> Neuer Artikel einfügen
                  $insArr = array('txt'=>'txt','titel'=>'str','art_preview'=>'str','cat'=>'','difficult'=>'');
                  $insert = escape_arrays($_POST,$insArr);
                  cat_exist_and_has_right($insert['cat'],$ArtsysArray['allow_defKat'],'front');#-> auf Recht prüfen
                  $pos = db_result(db_query("SELECT COUNT(*) FROM `prefix_artsys_articles` WHERE art_cat = ".$insert['cat']),0);
                  db_query('INSERT INTO `prefix_artsys_articles` (art_uid,art_cat,art_pos,art_time,art_title,art_content,art_preview,art_difficult) VALUES
                            ('.$_SESSION['authid'].','.$insert['cat'].','.$pos.',NOW(),"'.$insert['titel'].'","'.$insert['txt'].'","'.$insert['art_preview'].'",'.$insert['difficult'].')');
                  $imageMsg = $ArtsysArray['vballow'] == 1?config_art_image(db_last_id()):'';
                  #-> Angaben für PM und Weiterleitung
                  $wd = array('pfad'=>'?articles'.($insert['cat'] == 0?'':'-'.$insert['cat']),'msg'=>'Artikel erfolgreich eingef&uuml;gt');
                  $msg = "Es wurde ein neuer Artikel eingetragen: \n \n Titel: ".$insert['titel']." \n Kategorie: ";
                  $msg_titel = 'Neuer Artikel';
               }
     
               if (!has_right(-9, 'articles')){
                  $row_art = db_fetch_assoc(db_query("SELECT pm,name FROM `prefix_artsys_cats` WHERE id = ".$insert['cat']));
                  if ($row_art['pm']<>0 OR ($ArtsysArray['allow_defKat']<>0 AND $ArtsysArray['defKat_uid']<>0)){
                     sendpm($_SESSION['authid'],$row_art['pm'],$msg_titel,$msg .= $row_art['name']." \n \n und wartet darauf freigeschaltet zu werden! \n\n Das Artikelmodul ;)");
                  }
               }
               wd($wd['pfad'],$wd['msg'].' <br> <br> '.$imageMsg,3);
            }else{
               if (isset($_POST['preview'])){#-> alles für die Vorschau aufbereiten
                  $art = array('txt'=>trim(escape($_POST['txt'],'textarea')),'pref'=>trim(escape($_POST['art_preview'],'textarea')),'titel'=>trim($_POST['titel']),'display'=>'');
                  $art['preview'] = MAT_for_priview(bbcode(unescape($art['txt'])),unescape($art['pref']));
                  $row['art_cat'] = escape($_POST['cat'],'integer');
                  $row['art_difficult'] = escape($_POST['difficult'],'integer');
               }else{
                  $art = array('txt'=>$row['art_content'],'pref'=>$row['art_preview'],'titel'=>$row['art_title'],'display'=>'style="display:none;"','preview'=>'');
               }
               cat_exist_and_has_right($row['art_cat'],$ArtsysArray['allow_defKat'],'front',$row['art_uid']);
               $tpl = new tpl ('articles_write' );
               $out = array('modul_titel' =>$row['mod_title'],
                            'show_preview'=>$art['preview'],
                            'art_txt'     =>escape_for_fields(unescape($art['txt'])),
                            'preview'      => escape_for_fields(unescape($art['pref'])),
                            'art_titel'   =>$art['titel'],
                            'display'     =>$art['display'],
                            'smilies'     =>getsmilies(),
                            'kat'         =>($menu->getA(2) <> 'E'?($row['art_cat'] <> 0?'-'.$row['art_cat']:''):'-show-A'.$menu->getE(2)),
                            'cat_list'    =>($ArtsysArray['allow_defKat']<>0?'<option value="0">Keine</option>':'').dblistee($row['art_cat'],"SELECT id,name FROM `prefix_artsys_cats` WHERE (recht >= ".$_SESSION['authright']." AND schreibr = 1) OR id = ".$row['art_cat']." ORDER BY name ASC"),
                            'artID'       =>($row['art_id']<>''?'<input type="hidden" name="artID" value="'.$row['art_id'].'" />':''),
                            'text_cols'   =>$ArtsysArray['frontend_textarea_cols'],
                            'text_rows'   =>$ArtsysArray['frontend_textarea_rows'],
                            'TXTL'        =>$ArtsysArray['frontend_textarea_min_lenge'],
                            'art_image_upload'   => ($ArtsysArray['vballow'] == 1?html_art_image($row['art_image']):""),
                            'art_difficult'=>html_art_diff($row['art_difficult'],"'front'"),
                            );
               $tpl->set_ar_out($out,0);
            }
         }else{wd('?articles','Keine Berechtigung',3);}
         $design->footer();
    break;
    case 'search':
     
         $suche = '';
         if (isset($_POST['search'])){
            $suche = $_POST['search_after'].$_POST['search'];
         }elseif (!empty($_GET['articles-search'])){
            $suche = $_GET['articles-search'];
         }
         $sucheNach = substr($suche,0,1);
         $suche = stripslashes(escape(substr($suche,1), 'string'));
          
         $title = $allgAr['title'].' :: Artikeln :: Suchen '.(!empty($suche)?':: nach: '.htmlentities($suche):"");
         $hmenu  = '<a class="smalfont" href="?articles">Artikeln</a><b> &raquo; </b><a class="smalfont" href="index.php?articles-search">Suchen</a>'.(!empty($suche)?'<b> &raquo; </b> nach: '.htmlentities($suche):"");
         $design = new design ( $title , $hmenu );
         $design->header();
          
         $tpl = new tpl ('articles_write');
         $out = array(
           'search'=>$suche,
           'a_title'=> (isset($_REQUEST['after_title'])?'checked="checked"':""),
           'a_preview'=> (isset($_REQUEST['after_preview'])?'checked="checked"':""),
           'a_txt'=> (isset($_REQUEST['after_txt'])?'checked="checked"':""),
         );
     
         $tpl->set_ar_out($out,1);
          
         if (!empty($suche)){
            #-> Seiten einteilung
            $page = 1;
            $limit = 25;  // Limit
            if (isset($_GET['page'])) {
               $page = trim(str_replace('-p','',$_GET['page']));
            }
            $anfang = ($page - 1) * $limit;
            #-> Seiten einteilung Ende
     
            $x = time() - (3600 * 24 * 360);
            if ($sucheNach == '1' AND $uid = @db_result(db_query("SELECT id FROM prefix_user WHERE name = BINARY '".$suche."'"),0)){// Nach Autor suchen
               $sucheSql = "art_uid = $uid AND ";
               $sucheSucc = true;
            }else{ //Text suche
               echo $sucheNach ==  '1'?"<span style='color:#FF0000; background:#000000;'>User '$suche' wurde nicht gefunden </span>":"";
               $suche = str_replace('-','',$suche);
               $suche = str_replace('=','',$suche);
               $suche = str_replace('&','',$suche);
               $searar = explode(' ', $suche);
               $sucheSql = '';
               foreach($searar as $elem) {
                  $str = str_replace('\'','',$elem);
                  $str = str_replace('"','',$str);
                  $str = addslashes($str);
                  if (!empty($str)) {
                     $sucheSqlTeil = '';
                     $sucheSqlTeil .= (isset($_REQUEST['after_title'])?" art_title LIKE '%$str%' OR ":"");
                     $sucheSqlTeil .= (isset($_REQUEST['after_preview'])?" art_preview LIKE '%$str%' OR ":"");
                     $sucheSqlTeil .= (isset($_REQUEST['after_txt'])?" art_content LIKE '%$str%' OR ":"");
                     $sucheSql .= ($sucheSqlTeil <> ''?" ( $sucheSqlTeil 1 = 2 ) AND ":" ");
                  }
               }
     
            }
            $sql = "SELECT DISTINCT art_id, art_title as titel FROM `prefix_artsys_articles` artsys LEFT JOIN `prefix_artsys_cats` ON id = art_cat
                   WHERE ($sucheSql 1 = 1) AND (art_time >= $x) AND art_status = 1 AND (".$_SESSION['authright']." <= recht OR (art_cat = 0 AND recht IS NULL)) ORDER BY art_time DESC";
            $sAnz = db_num_rows(db_query($sql));
             
            if ((($sucheNach == '1' AND isset($sucheSucc)) OR $sucheNach == '0') AND $sAnz > 0){
               $tpl->set('sAnz',$sAnz);
               $url = '';
               $url .= (isset($_REQUEST['after_title'])?"&amp;after_title=1":"");
               $url .= (isset($_REQUEST['after_preview'])?"&amp;after_preview=1":"");
               $url .= (isset($_REQUEST['after_txt'])?"&amp;after_txt=1":"");
               $tpl->set_out('MPL',$MPL = db_make_sites ($page , "" , $limit , 'index.php?articles-search='.urlencode($suche).$url.'&amp;page=' , "", $sAnz),2);
     
               echo $sucheNach == 1 ? ($sAnz > 1?'Folgende Artikel':'Folgender Artikel')." wurden von $suche geschrieben:":"'$suche' wurde in ".($sAnz > 1?'folgenden Artikeln':'folgendem Artikel')." gefunden:";
               echo "\n <br><br> \n";
                
               $sql .= " LIMIT ".$anfang.",".$limit;
               $erg = db_query($sql) or die(mysql_error());
               $class = '';
               WHILE($row = db_fetch_assoc($erg)){
                  $class = ($class == 'Cmite' ? 'Cnorm' : 'Cmite' );
                  $row['class'] = $class;
                  if ($sucheNach == '1'){
                     $row['titel'] = $suche.' || '.$row['titel'];
                  }
                  $tpl->set_ar_out($row,3);
               }
               $tpl->out(4);
            }elseif($sucheNach == '0'){
               echo "es wurde keinen Artikel gefunden";
            }
         }
         $design->footer();
    break;
    }
    ?>

    <div class="Cdark" style="float: right; text-align: right">&nbsp; &nbsp;<a style="color:#FFFFFF;" href="index.php?articles-search">Artikel suchen</a> &nbsp;</div><br /><br />
    {EXPLODE}
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
      <tr class="Chead">
          <th width="80%" align="center"><b>{_lang_category}</b></th>
        <th width="20%" align="center">Artikeln</th>
       </tr>
       {EXPLODE}
       <tr class="{class}">
         <td><a href="index.php?articles-{id}">{name}</a><br /><span class="smalfont">&raquo;&nbsp;{desc}</span></td>
          <td align="center">{anzArt}</td>
       </tr>
       {EXPLODE}
    </table>
    <br /><br />
    {EXPLODE}
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
      <tr class="Chead">
        <th width="75%" style="text-indent:2em; text-align:left;">
          Sortieren nach&nbsp;
          &nbsp;&raquo;&nbsp;<a href="index.php?articles-{cid}-sort-{s0}">Artikel<img src="include/images/icons/pfeil{p0}.gif" border="0"></a>
          &nbsp;&raquo;&nbsp;<a href="index.php?articles-{cid}-sort-{s1}">{_lang_date}<img src="include/images/icons/pfeil{p1}.gif" border="0"></a>
          &nbsp;&raquo;&nbsp;<a href="index.php?articles-{cid}-sort-{s2}">Hits<img src="include/images/icons/pfeil{p2}.gif" border="0"></a>
        </th>
       </tr>
      {EXPLODE}
       <tr class="{class}">
         <td width="100%">
           <div style="border:1px dotted #000;">
             {vorschau}
             <div style="padding:0.2em;text-indent:0.2em;font-weight:bold;" class="Cdark"><a href="index.php?articles-show-A{art_id}">{art_title}</a></div>
             <span class="smalfont">&raquo;&nbsp;{_lang_from} <b>{username}</b> geschrieben am {datum}<br /> &raquo;&nbsp;Hits:{art_viewed}</span><br />
             {art_difficult} {art_rating}
             <div style="margin-top:.2em;padding:0.2em;border-top:1px dashed #000;clear:both;">{art_preview}</div>
           </div>
     
         </td>
        </tr>
       {EXPLODE}
       <tr>
         <td colspan="3" class="Cdark">&nbsp;-&nbsp;&nbsp;<a style="color:#FFFFFF;" href="?articles-write{new_art_cat}">neuen Artikel verfassen</a></td>
       </tr>
       {EXPLODE}
    </table>
    {EXPLODE}
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
      <tr class="Chead">
          <th colspan="4" align="center"><b>{art_title}</b></th>
       </tr><tr>
       <td class="Cmite">{_lang_author}</td>
          <td class="Cnorm">{creater}</td>
        <td class="Cmite" colspan="2" valign="top"> {art_rating}</td>
      </tr><tr>
         <td class="Cmite">{_lang_date}</td>
          <td class="Cnorm">{datum}</td>
        <td class="Cnorm" rowspan="2" colspan="2" align="center">
        <table class="border" border="0" cellspacing="1" cellpadding="0">
          <tr>
    {write_vote}
          </tr>
        </table>
        </td>
       </tr><tr>
        <td class="Cmite" width="110">{_lang_voter}</td>
          <td class="Cnorm">{art_votes}</td>
       </tr><tr>
         <td class="Cmite">{_lang_seenfrom}</td>
          <td class="Cnorm">{art_viewed}</td>
          <td class="Cmite" colspan="2" valign="top">{comOderShow}</td>
       </tr>
    </table>
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
    {EXPLODE}
         <th class="Cdark">{titel}</th>
      </tr> <tr>
          <td class="Cnorm">{content}</td>
      </tr> <tr>
          <td class="Cnorm">{links}</td>
      </tr>
    {EXPLODE}
       <tr>
          <td class="Cnorm">
          <form action="index.php?articles-show-C{art_id}{page_index}" method="POST">
          <fieldset>
          <legend>{_lang_writecomment}</legend>
          <input type="text" name="name" value="{uname}" /> &nbsp; &nbsp; <input type="submit" value="{_lang_enter}"><br />
          <textarea cols="50" rows="2" name="text"></textarea><br />
          </fieldset>
          </form>
          </td>
       </tr>
    {EXPLODE}
       <tr>
          <td class="Cnorm">
              <br />&nbsp;&nbsp;<b>
              {writeout}
              </b><br />
          </td>
       </tr>
    {EXPLODE}
       <tr>
          <td class="Cnorm">
            <span class="Cmite" style="width:100%;display:block;"><span style="display:block;padding:2px 2px 2px 5px;"># <b>{zahl}</b> von {name}</span> </span>
            <span class="Cdark" style="width:100%;display:block;"><span style="display:block;padding:4px 4px 4px 6px;">{text}</span>  </span>
          </td>
       </tr>
    {EXPLODE}
    </table>

    <?php
    #   Copyright by: Nero
    #   Support: www.ilch.de
    defined ('main') or die ( 'no direct access' );
    #-> Allgemeine Daten vom Artikelsys laden.
    $erg = db_query('SELECT schl, wert FROM prefix_artsys_config');
    $ArtsysArray = array();
    WHILE($row = db_fetch_assoc($erg)){
       $ArtsysArray[$row['schl']] = $row['wert'];
    }
    $ArtsysArray['diff'] = array('Keine Angaben','very easy', 'easy', 'very light', 'light', 'middl','doable', 'hard','very hard', 'difficult', 'very difficult');
    
    /*--------------------------
    
    Allgemeine Funktionen
    
    --------------------------*/
    function escape_arrays($ar,$check){#-> Escaped nach vorgaben Arrays
             foreach($check as $Key=>$Value){
                if (isset($ar[$Key]))
                   if($Value === 'str'){
                      $return[$Key] = trim(escape($ar[$Key],'string'));
                   }elseif($Value === 'txt'){
                      $return[$Key] = trim(escape($ar[$Key],'textarea'));
                   }else{
                      $return[$Key] = trim(escape($ar[$Key],'integer'));
                   }
             }
             return $return;
    }
    function cat_exist_and_has_right($id,$defRight = 1,$ort = 'back',$erstUid = '',$artCat = ''){#-> Prüfen ob User recht hat für die kategorie
             $check = true;
             $artCat = ($artCat == ''?'a':$artCat);
             if ($erstUid <> ''){
               user_has_edit_right($erstUid);
               $check = false;
             }
             global $design;
             if ($id == '0' OR $id == ''){
                if ($defRight == 1 OR $artCat == $id){
                   return( true );
                }
                wd('?articles',(has_right(-9, 'articles')?'Die Default-Kategorie ist deaktiviert!':'Diese Kategorie ist leider nicht vorhanden'),3);
                $design->footer(1);
             }
             $erg = db_query('SELECT recht, schreibr FROM `prefix_artsys_cats` WHERE id = '.$id);
             if(db_num_rows($erg) <> 1){
                wd('?articles','Diese Kategorie ist leider nicht vorhanden',3);
                $design->footer(1);
             }
             $row = db_fetch_assoc($erg);
             if($row['recht']<$_SESSION['authright'] OR ($ort <> 'back' AND $row['schreibr'] <> 1 AND ($check OR ($artCat <> $id AND $artCat <> 'a')))){
                wd('?articles','Sie haben nicht die n&ouml;tigen Rechte f&uuml;r diese Kategorie',3);
                $design->footer(1);
             }
             return( true );
    }
    function user_has_edit_right($erstUid){
             global $design;
             if ($erstUid == $_SESSION['authid']){
                return( true );
             }
             if (has_right(-9, 'articles')){
                return( true );
             }
             wd('?articles','Sie haben nicht die n&ouml;tigen Rechte f&uuml;r diesen Artikel zu Editieren',4);
             $design->footer(1);
    }
    function MAT_for_priview($s,$pref){
      $return = '<table width="100%" class="border" border="0" cellspacing="1" cellpadding="3"><tr><td  class="Cmite">';
      $return .= '<tr><td class="Cdark" height="15" align="center" valign="middle"><b>------[ Vorschau ]------</b></td></tr>';
      $return .= '<tr><td  class="Cmite">'.bbcode($pref);
      $s_arr = explode('[NEWARTPAGE]', $s);
      foreach($s_arr as $key=>$value){
        if($key === 0)continue;
        $return .= '</td></tr><tr><td class="Cdark" height="15" align="center" valign="middle"><b>------[ Seite '.($key);
        if (preg_match("/\[artTitel\](.*?)\[\/artTitel\]/Ui",$value,$titel)){
          $return .= (substr($titel[1],0,5) != 'seite'?'&nbsp; &nbsp;"'.$titel[1].'"':'');
          $value = str_replace($titel[0],"",$value);
        }
        $return .= ' ]------</b></td></tr><tr><td  class="Cmite">'.$value;
      }
      $return .= '</td></tr></table>';
      return ($return);
    }
    function config_art_image($art_id){
             global $ArtsysArray, $lang;
             $msg = '';
             if ( !empty ( $_FILES['artimagefile']['name'] ) ) {
                $file_tmpe = $_FILES['artimagefile']['tmp_name'];
                $rile_type = ic_mime_type ($_FILES['artimagefile']['tmp_name']);
                $file_type = $_FILES['artimagefile']['type'];
                $file_size = $_FILES['artimagefile']['size'];
                $msg = 'Unerlaubter Datentyp';
                $size   = getimagesize($file_tmpe);
                if (($size[2] == 1 OR $size[2] == 2 OR $size[2] == 3) AND $size[0] > 10 AND $size[1] > 10 AND substr ( $file_type , 0 , 6 ) == 'image/' AND substr ( $rile_type , 0 , 6 ) == 'image/') {
                   $endar = array (1 => 'gif', 2 => 'jpg', 3 => 'png');
                   $endung = $endar[$size[2]];
                   $breite = $size[0];
                   $hoehe  = $size[1];
                   $msg  = $lang['avatarcannotupload'];
                   if ( $file_size <= $ArtsysArray['vbSize'] AND $breite <= $ArtsysArray['vbBreite'] AND $hoehe <=  $ArtsysArray['vbHohe'] ) {
                      $neuer_name = 'include/images/articles/'.$art_id.'.'.$endung;
                      @unlink (db_result(db_query("SELECT art_image FROM `prefix_artsys_articles` WHERE art_id = ".$art_id),0));
                      move_uploaded_file ( $file_tmpe , $neuer_name );
                      db_query("UPDATE `prefix_artsys_articles` SET art_image = '$neuer_name' WHERE art_id = $art_id LIMIT 1");
                      $msg = $lang['pictureupload'];
                   }
                }
             } elseif ( isset($_POST['artimageloeschen']) ) {
                $msg = $lang['picturedelete'];
                @unlink (db_result(db_query("SELECT art_image FROM `prefix_artsys_articles` WHERE art_id = ".$art_id),0));
                db_query("UPDATE `prefix_artsys_articles` SET art_image = '' WHERE art_id = $art_id LIMIT 1");
             }
             return $msg;
    }
    function html_art_image($image = 'a897s'){
             global $lang, $ArtsysArray;
             return ('</tr><tr>
                       <td class="Cmite" align="left"><strong>Vorschau Bild : </strong></td>
                       <td class="Cnorm">'.(($image <>'a897s' AND file_exists($image))? '<img src="'.$image.'" alt=""> &nbsp; &nbsp; &nbsp; &nbsp; <input type="checkbox" name="artimageloeschen" value="yes">  '.$lang['delete'].'? <br> ' :'')
                       .'<input type="file" name="artimagefile"><br><br> <font class="smalfont">'
                       .$lang['criterions'].': '.$lang['maxwidth'].' '.$ArtsysArray['vbBreite'].'px, '.$lang['maxheight'].' '.$ArtsysArray['vbHohe'].'px '.$lang['and'].' max size '.$ArtsysArray['vbSize'].' bytes. </font></td>');
    }
    function html_art_diff($d = '', $f = "'admin'"){
      global $ArtsysArray;
      $erg = db_query("SELECT id, diff FROM `prefix_artsys_cats` WHERE recht >= ".$_SESSION['authright']." AND (schreibr = 1 OR $f = 'admin')");
      $js = '
        <script type="text/javascript">
          var cat_diff = new Array();
          cat_diff[0] = '.$ArtsysArray['defKat_diff'].';
        ';
      WHILE($row = db_fetch_assoc($erg)){
         $js .= 'cat_diff['.$row['id'].'] ='.$row['diff'].'; ';
      }
      $js .= '</script>';
      return $js.'</tr><tr id="cat_diff">
             <td class="Cmite" align="left"><strong>Schwierigkeitsgrad : <strong></td>
             <td class="Cnorm"><select name="difficult">'.arlistee($d,$ArtsysArray['diff']).'</select></td>';
    }
    
    function artsys_sort_func($str,$switch,$felder,$id = false){
      if ($str == 'sort'){
        if ($id){
          $_SESSION['SORTSYS'.$id][$_SESSION['authid']] = $switch;
        }
      } elseif ($id AND isset($_SESSION['SORTSYS'.$id][$_SESSION['authid']])){
        $switch = $_SESSION['SORTSYS'.$id][$_SESSION['authid']];
      } else {
        $switch = '0ab';
      }
      foreach($felder as $key=>$elem){
        switch($switch){
          case $key.'ab':
            $return['sort'] = $elem.' ASC';$return['s'.$key] = $key.'auf';$return['p'.$key] = 'u';break;
          case $key.'auf':
            $return['sort'] = $elem.' DESC';$return['s'.$key] = $key.'ab';$return['p'.$key] = 'o';break;
          default:
            $return['s'.$key] = $key.'ab';$return['p'.$key] = 'l';
        }
      }
      if (!isset($return['sort'])){
        $return['sort'] = $felder[0].' ASC';$return['s0'] = '0auf';$return['p0'] = 'u';
      }
      return $return;
    }
    /*--------------------------
    
    Funktionen für den Frontend
    
    --------------------------*/
    function make_art_pages($s,$page,$art_id,$kommPage=''){//Seiten der Artikel erstellen
             $return = array('links'=>'','content'=>'','titel'=>'Beschreibung');
             $s_arr = preg_split('/\[NEWARTPAGE\]/', $s);
             //$s_arr = explode('[NEWARTPAGE]', $s);
             foreach($s_arr as $key=>$value){
                if($key === 0)continue;
                if ($page == $key){
                  if (preg_match("/\[artTitel\](.*?)\[\/artTitel\]/Ui",$value,$titel) AND substr($titel[1],0,5) != 'Seite'){
                    $return['links'] .= ($key === 1?'<br><select onChange="changePage(this.value)" name="choosePage">':'')
                                     .'<option selected value="'.$key.'">'.$key.'-'.$titel[1].'</option>';
                    $return['titel'] = $titel[1];
                  }else{
                    $return['links'] .= ($key === 1?'[ ':' | ').$key;
                  }
                  if(isset($titel[0]))$value = str_replace($titel[0],"",$value);
                  $return['content'] = bbcode($value);
                }else{
                  if (preg_match("/\[artTitel\](.*?)\[\/artTitel\]/si",$value,$titel) AND substr($titel[1],0,5) != 'Seite'){
                    $return['links'] .= ($key === 1?'<br><select onChange="changePage(this.value)" name="choosePage">':'')
                                     .'<option value="'.$key.'">'.$key.'-'.$titel[1].'</option>';
                  }else{
                    $return['links'] .= ($key === 1?'[ ':' | ').'<a href="?articles-show-A'.$art_id.'-P'.$key.$kommPage.'">'.$key.'</a>';
                  }
                }
             }
             if ($key <> 1 AND strpos($return['links'],'select') > 0){$return['links'] .= '</select><br>'.js_changePage($art_id);}
             elseif ($return['links'] === '[ 1' OR $return['links'] === '' OR $key === 1){$return['links'] = '';}
             else{$return['links'] .= ' ]';}
             if (empty($return['content'])){
               if (preg_match("/\[artTitel\](.*?)\[\/artTitel\]/Ui",$s_arr[1],$titel) AND substr($titel[1],0,5) != 'Seite'){
                 $return['titel'] = $titel[1];
               }
               if(isset($titel[0]))$s_arr[1]= str_replace($titel[0],"",$s_arr[1]);
               $return['content'] = bbcode($s_arr[1]);
             }
             return ($return);
    }
    function js_changePage($id){
      return '
      <script type="text/javascript">
      <!--
        function changePage(w){
          document.location.href="index.php?articles-show-A'.$id.'-P"+w;
        }
      //-->
      </script>
                ';
    }
    
    function show_vote($id,$w = 'A'){//Voteausgabe im Frontend
             global $tpl;
             if(loggedin()){
                $return = '
                <script language="JavaScript" type="text/javascript">
                <!--
                function doVote(n1,did) {
                  document.location.href="index.php?articles-show-'.$w.'" + did + "-z"+n1;
                }
                //-->
                </script>
                        <td class="Cdark" onClick="doVote(1,'.$id.')" style="cursor:pointer">&nbsp;1&nbsp;</td>
                        <td class="Cmite" onClick="doVote(2,'.$id.')" style="cursor:pointer">&nbsp;2&nbsp;</td>
                        <td class="Cdark" onClick="doVote(3,'.$id.')" style="cursor:pointer">&nbsp;3&nbsp;</td>
                        <td class="Cmite" onClick="doVote(4,'.$id.')" style="cursor:pointer">&nbsp;4&nbsp;</td>
                        <td class="Cdark" onClick="doVote(5,'.$id.')" style="cursor:pointer">&nbsp;5&nbsp;</td>
                        <td class="Cmite" onClick="doVote(6,'.$id.')" style="cursor:pointer">&nbsp;6&nbsp;</td>
                        <td class="Cdark" onClick="doVote(7,'.$id.')" style="cursor:pointer">&nbsp;7&nbsp;</td>
                        <td class="Cmite" onClick="doVote(8,'.$id.')" style="cursor:pointer">&nbsp;8&nbsp;</td>
                        <td class="Cdark" onClick="doVote(9,'.$id.')" style="cursor:pointer">&nbsp;9&nbsp;</td>
                        <td class="Cmite" onClick="doVote(10,'.$id.')" style="cursor:pointer">&nbsp;10&nbsp;</td>'."\n";
             }else{
                $return='<td class="Cdark">Du muss eingeloggt sein um zu voten</td>';
             }
             $tpl->set('write_vote',$return);
    }
    function show_vote_stats($stat){//Votestats ausgabe
             global $lang, $ArtsysArray;
             artsys_hexToRgb(array($ArtsysArray['vote_result_bgcolor'],$ArtsysArray['vote_result_color'],$ArtsysArray['vote_result_fontcolor']),'rat');
             $stat = $stat*10;
             $return = $lang['voting'].' : <img src="include/images/articles/art_rat_image.php?d='.$stat.'" title="'.$stat.'%" alt="'.$stat.'%">';
             return $return;
    }
    function artsys_hexToRgb($hex,$ort){
      $hex_ar = array('0'=>1, '1'=>2, '2'=>3, '3'=>4, '4'=>5, '5'=>6, '6'=>7, '7'=>8, '8'=>9, '9'=>10, 'a'=>11, 'b'=>12, 'c'=>13, 'd'=>14, 'e'=>15, 'f'=>16);
      FOREACH($hex as $k=>$v){
        $v = strtolower(substr($v,1));
        $y = 0;
        FOR ($i = 0;$i < 3;$i++){
          FOR ($j = 0;$j < 2;$j++){
            $cash = substr($v,$y,1);
            if (isset($hex_ar[$cash]))
              $hex[$j] = $hex_ar[$cash];
            else
              $hex[$j] = 1;
            $y++;
          }
          $_SESSION['artsys_'.$ort][$k.$i]= ($hex[0] * $hex[1])-1;
        }
      }
    }
    
    
    
    
    #-> Restliche Funktionen, Copyright by: Manuel Staechele
    function get_cats_title ( $catsar ){
      $l = '';
       foreach($catsar as $k => $v){
         if ( $k != '' AND $v != '' ) {
            $l = $v.' :: '.$l;
          }
       }
       return ($l);
    }
    function get_cats_urls($catsar){
      $l = '';
       foreach($catsar as $k => $v) {
         if ( $k != '' AND $v != '' ) {
            $l = '<a class="smalfont" href="?articles-'.$k.'">'.$v.'</a><b> &raquo; </b>'.$l;
          }
       }
       return ($l);
    }
    function get_cats_array($cid, $ar){
       if ( empty($cid) ) {
         return ($ar);
       }else{
         $erg = db_query("SELECT cat,id,name FROM `prefix_artsys_cats` WHERE id = ".$cid);
          $row = db_fetch_assoc($erg);
          $ar[$row['id']] = $row['name'];
         return (get_cats_array($row['cat'],$ar));
       }
       if ($r){
         return ($l);
       }
    }
    function count_art($cid){
      $zges = 0;
       $e = db_query("SELECT id FROM `prefix_artsys_cats` WHERE cat = ".$cid);
       if ( db_num_rows($e) > 0 ) {
         while ($r = db_fetch_assoc($e) ) {
           $zges = $zges + count_art ($r['id']);
         }
       }
       $zges = $zges + db_count_query("SELECT COUNT(art_id) FROM `prefix_artsys_articles` WHERE art_cat = ".$cid." AND art_status = 1");
       return ($zges);
    }
    ?>


    Ich habs getestet sollte so gehen

    PS: lag an der includierten Datei im endeffekt


    Zuletzt modifiziert von Rock@wulf am 31.01.2013 - 14:50:39
    Meine Postings repräsentieren meine Meinung wenn nicht anders gekennzeichnet.
    MFG Rock@wulf
    1 Mitglieder finden den Beitrag gut.
  17. #17
    User Pic
    Siggi Hall Of Fame
    Registriert seit
    08.02.2007
    Beiträge
    6.558
    Beitragswertungen
    327 Beitragspunkte
    hm kommt bei mir das gleiche bei raus wie ich oben stehen hab
    Parse error: syntax error, unexpected T_STRING in /usr/export/www/vhosts/funnetwork/hosting/ilch/include/contents/articles.

    kannst deine sachen mal zippen oder so?


    Zuletzt modifiziert von Siggi am 31.01.2013 - 14:59:46
    0 Mitglieder finden den Beitrag gut.
  18. #18
    User Pic
    Rock@wulf Hall Of Fame
    Registriert seit
    03.06.2004
    Beiträge
    3.282
    Beitragswertungen
    239 Beitragspunkte
    nope bin auf arbeit.

    wie gesagt ich habs getestet funzt 1A
    Meine Postings repräsentieren meine Meinung wenn nicht anders gekennzeichnet.
    MFG Rock@wulf
    0 Mitglieder finden den Beitrag gut.
  19. #19
    User Pic
    Siggi Hall Of Fame
    Registriert seit
    08.02.2007
    Beiträge
    6.558
    Beitragswertungen
    327 Beitragspunkte
    Bei mir nicht habs mehrmals nun ersetzt bzw gelöscht und kommt gleiche Fehlermeldung wie ich oben geschrieben habe.
    0 Mitglieder finden den Beitrag gut.
  20. #20
    User Pic
    Rock@wulf Hall Of Fame
    Registriert seit
    03.06.2004
    Beiträge
    3.282
    Beitragswertungen
    239 Beitragspunkte
    Ich hoffe du hast auch wirklich nur den Teil der Dateien Kopiert mit <?php beginnend und mit ?> endend!

    STRG+A geht nämlich nicht dann gibts Datenmüll
    Meine Postings repräsentieren meine Meinung wenn nicht anders gekennzeichnet.
    MFG Rock@wulf
    0 Mitglieder finden den Beitrag gut.
  21. #21
    User Pic
    Siggi Hall Of Fame
    Registriert seit
    08.02.2007
    Beiträge
    6.558
    Beitragswertungen
    327 Beitragspunkte
    Nein ^^ ich hab nur von <?php bis ?> mit strg + c und strg + v so wie ich es immer mache und auch immer ging
    0 Mitglieder finden den Beitrag gut.
  22. #22
    User Pic
    Rock@wulf Hall Of Fame
    Registriert seit
    03.06.2004
    Beiträge
    3.282
    Beitragswertungen
    239 Beitragspunkte
    Gut wollte nur sichergehen lächeln

    trotzdem verstehe ich es dann nicht.
    Meine Postings repräsentieren meine Meinung wenn nicht anders gekennzeichnet.
    MFG Rock@wulf
    0 Mitglieder finden den Beitrag gut.
  23. #23
    User Pic
    Siggi Hall Of Fame
    Registriert seit
    08.02.2007
    Beiträge
    6.558
    Beitragswertungen
    327 Beitragspunkte
    Ich ja leider auch nicht :/ hab ja auch nochmal nachgeschaut ob unsichtbare zeichen in der zeile oder so aber ist nix
    0 Mitglieder finden den Beitrag gut.
  24. #24
    User Pic
    Rock@wulf Hall Of Fame
    Registriert seit
    03.06.2004
    Beiträge
    3.282
    Beitragswertungen
    239 Beitragspunkte
    lösch mal die datei

    und speichere den Code mit dem Text editor neu und lad die dann hoch
    Meine Postings repräsentieren meine Meinung wenn nicht anders gekennzeichnet.
    MFG Rock@wulf
    0 Mitglieder finden den Beitrag gut.
  25. #25
    User Pic
    Siggi Hall Of Fame
    Registriert seit
    08.02.2007
    Beiträge
    6.558
    Beitragswertungen
    327 Beitragspunkte
    Habe ich kommt leider das gleiche traurig

    Hab alles vom Server gelöscht und datein extra neu abgespeichert auf Desktop dann hochgeladen.

    hab auch zwei verschiedene editor benutzt immer das gleiche
    0 Mitglieder finden den Beitrag gut.
  26. #26
    User Pic
    Siggi Hall Of Fame
    Registriert seit
    08.02.2007
    Beiträge
    6.558
    Beitragswertungen
    327 Beitragspunkte
    Hab es nun nochmal tausendmal kopiert und einzeln verglichen sowie einzeln rüberkopiert und mit WinMerge verglichen etc es will einfach nicht egal wie und womit ich es mache


    Zuletzt modifiziert von Siggi am 02.02.2013 - 17:59:40
    0 Mitglieder finden den Beitrag gut.
  27. #27
    User Pic
    Rock@wulf Hall Of Fame
    Registriert seit
    03.06.2004
    Beiträge
    3.282
    Beitragswertungen
    239 Beitragspunkte
    Ich kann dir dabei nicht helfen, der code funktioniert bei mir so wie ich ihn gepostet habe ohne probleme
    Meine Postings repräsentieren meine Meinung wenn nicht anders gekennzeichnet.
    MFG Rock@wulf
    0 Mitglieder finden den Beitrag gut.
  28. #28
    User Pic
    Siggi Hall Of Fame
    Registriert seit
    08.02.2007
    Beiträge
    6.558
    Beitragswertungen
    327 Beitragspunkte
    Okay habs nochmal nach gefühlten 100 mal zeile für zeile mit WinMerge verglichen lächeln nun gehts


    Zuletzt modifiziert von Siggi am 03.02.2013 - 02:02:29
    0 Mitglieder finden den Beitrag gut.
  29. #29
    User Pic
    sladee Mitglied
    Registriert seit
    19.01.2010
    Beiträge
    55
    Beitragswertungen
    1 Beitragspunkte
    komme hier auch gleich mit einer Frage - und zwar habe ich diese Anpassung auch vorgenommen, funtzt soweit auch Problemlos. Nur die Nummerierung der Kommentare passt mir absolut nicht und ich bekomms gerade auch nicht hin grumml

    Also die Variable $zahl ist ja dafür zuständig und sieht folglich aus:
    $zahl = ($rtung == '0auf'?($ergAnz1-$anfang):($anfang + 1));


    Nun bekommt hier immer der neueste Kommentar die Nummer 1, was meiner Ansicht nach falsch ist... der allererste Kommentar zu einem Artikel sollte die 1, der nächste die 2 usw.

    Wie bekomme ich das hin?

    Thx und Gruss sladee
    0 Mitglieder finden den Beitrag gut.
  30. #30
    User Pic
    Mairu Coder
    Registriert seit
    16.06.2006
    Beiträge
    15.334
    Beitragswertungen
    386 Beitragspunkte
    0auf klingt für mich wie aufsteigen, du müsstest wohl einfach nur die Option zu absteigend ändern. Das scheint irgendwo einstellbar zu sein.
    Und auch immer mal ein Blick auf die FAQ werfen. | Mairus Ilchseite
    0 Mitglieder finden den Beitrag gut.
Geschlossen

Zurück zu Module und Modifikationen

Optionen: Bei einer Antwort zu diesem Thema eine eMail erhalten