kostenloser Webspace werbefrei: lima-city


PHPkit code problem

lima-cityForumProgrammiersprachenPHP, MySQL & .htaccess

  1. Autor dieses Themas

    f****y

    Hallo, wollte mir noch eine navigation anlegen in PHPKit und habe den code nach der struktur weiter gemacht also habe wenig plan von php und wollte fragen wieso er den fehler anzeigt obwohl ich nach der struktur gearbeitet habe!!
    hier der code:
    <?php
    if (adminaccess('navcat')) {
     if (isset($_POST['action'])) $ACTION=$_POST['action'];
     else $ACTION='view';
     
     if ($ACTION==$_POST['cancel']) {header("location: admin.php?path=editnavcat.php&PHPKITSID=".session_id()); exit();}
     elseif (isset($_POST['edit']) && isset($_POST['navigation_cat'])) $select_navcat=$_POST['navigation_cat'];
     elseif (isset($_POST['select_navcat'])) $select_navcat=$_POST['select_navcat'];
     else unset($select_navcat);
     
     if (isset($_POST['new'])) $select_navcat='new';
     elseif (isset($_POST['setopen']) && isset($_POST['navigation_cat'])) $DB->query("UPDATE ".$db_tab['navigationcat']." SET navigationcat_status='1' WHERE navigationcat_id='".$_POST['navigation_cat']."'");
     elseif (isset($_POST['setup']) && isset($_POST['navigation_cat'])) $DB->query("UPDATE ".$db_tab['navigationcat']." SET navigationcat_order=navigationcat_order-1 WHERE navigationcat_id='".$_POST['navigation_cat']."'");
     elseif (isset($_POST['settop']) && isset($_POST['navigation_cat'])) $DB->query("UPDATE ".$db_tab['navigationcat']." SET navigationcat_align='2' WHERE navigationcat_id='".$_POST['navigation_cat']."'");
     elseif (isset($_POST['setleft']) && isset($_POST['navigation_cat'])) $DB->query("UPDATE ".$db_tab['navigationcat']." SET navigationcat_align='0' WHERE navigationcat_id='".$_POST['navigation_cat']."'");
     elseif (isset($_POST['setright']) && isset($_POST['navigation_cat'])) $DB->query("UPDATE ".$db_tab['navigationcat']." SET navigationcat_align='1'  WHERE navigationcat_id='".$_POST['navigation_cat']."'");
     elseif (isset($_POST['setkopf']) && isset($_POST['navigation_cat'])) $DB->query("UPDATE ".$db_tab['navigationcat']." SET navigationcat_align='4'  WHERE navigationcat_id='".$_POST['navigation_cat']."'");
     elseif (isset($_POST['setkopf2']) && isset($_POST['navigation_cat'])) $DB->query("UPDATE ".$db_tab'navigationcat']." SET navigationcat_align='5'  WHERE navigationcat_id='".$_POST['navigation_cat']."'");
     elseif (isset($_POST['setbottom']) && isset($_POST['navigation_cat'])) $DB->query("UPDATE ".$db_tab['navigationcat']." SET navigationcat_align='3'  WHERE navigationcat_id='".$_POST['navigation_cat']."'");
     elseif (isset($_POST['setdown']) && isset($_POST['navigation_cat'])) $DB->query("UPDATE ".$db_tab['navigationcat']." SET navigationcat_order=navigationcat_order+1 WHERE navigationcat_id='".$_POST['navigation_cat']."'");
     elseif (isset($_POST['setclose']) && isset($_POST['navigation_cat'])) $DB->query("UPDATE ".$db_tab['navigationcat']." SET navigationcat_status='0' WHERE navigationcat_id='".$_POST['navigation_cat']."'");
    
     if ($ACTION==$_POST['save']) {
      if ($_POST['delete_cat']==1 && isset($select_navcat)) {
       if ($_POST['delete_links']==0) $DB->query("DELETE FROM ".$db_tab['navigation']." WHERE navigation_cat='".$select_navcat."'");
       else $DB->query("UPDATE ".$db_tab['navigation']." SET navigation_cat='".$_POST['delete_links']."' WHERE navigation_cat='".$select_navcat."'");
       $DB->query("DELETE FROM ".$db_tab['navigationcat']." WHERE navigationcat_id='".$select_navcat."' LIMIT 1");
       }
      else {
       if ($select_navcat=='new') {
        $DB->query("INSERT INTO ".$db_tab['navigationcat']." (navigationcat_title) VALUES ('new')");
        $select_navcat=$DB->insert_id();
    	}
       if (!filecheck('../navigation/'.$_POST['cat_navbox'])) unset($_POST['cat_navbox']);
       $DB->query("UPDATE ".$db_tab['navigationcat']." SET  navigationcat_title='".$_POST['cat_title']."',navigationcat_align='".$_POST['cat_align']."',navigationcat_status='".$_POST['cat_status']."',navigationcat_rights='".$_POST['cat_rights']."',navigationcat_template='".$_POST['cat_template']."',navigationcat_open='".$_POST['cat_open']."',navigationcat_showtitle='".$_POST['cat_showtitle']."',navigationcat_box='".$_POST['cat_navbox']."',navigationcat_link='".$_POST['cat_link']."' WHERE navigationcat_id='".$select_navcat."'");
       }
      header("location: admin.php?path=editnavcat.php&PHPKITSID=".session_id()); exit();
      }
    
     $getcat=$DB->query("SELECT * FROM ".$db_tab['navigationcat']." ORDER by navigationcat_order ASC");
     while($cat=$DB->fetch_array($getcat)) {$navigationcat_option.='<option value="'.$cat['navigationcat_id'].'">'.$cat['navigationcat_title'].'</option>';}
    
     if ($select_navcat!="") {
      $boxhash=array();
      $dir="../navigation";
      $a=opendir($dir);
      while ($datei=readdir($a)) {
       if (strstr($datei,"navbox")) {
        $datei_name=$datei_name=$lang['navbox_default'][$datei];
        if ($datei_name=='') $datei_name=$datei;
    	$boxhash[$datei_name]=$datei;
        }
       }
      closedir($a);
    
      if ($select_navcat!=0) {
       $type=$lang['edit'];
       $info=$DB->fetch_array($DB->query("SELECT * FROM ".$db_tab['navigationcat']." WHERE navigationcat_id='".$select_navcat."'"));
    
       if ($info['navigationcat_box']=='') 	{
        $getinfo=$DB->query("SELECT * FROM ".$db_tab['navigationcat']." WHERE navigationcat_id!='".$info['navigationcat_id']."' AND navigationcat_boxdir=''");
        while($delinfo=$DB->fetch_array($getinfo)) {
    	 eval ("\$delete_cats.= \"".templateinclude("editnavcat_delete_ext_option")."\";");
    	 }
    
        if ($delete_cats!='') eval ("\$delete_ext= \"".templateinclude("editnavcat_delete_ext")."\";");
        }
       if (is_array($boxhash)) {
        ksort($boxhash);
        foreach($boxhash as $name=>$file) {
    	 if ($file==$info['navigationcat_box']) $selected='selected';
    	 else unset($selected);
    	 eval ("\$navigation_box_option.= \"".templateinclude("editnavcat_box_option")."\";");
         }
        eval ("\$navigation_box= \"".templateinclude("editnavcat_box")."\";");
        }
       eval ("\$navigation_delete= \"".templateinclude("editnavcat_delete")."\";");
       }
      else {
       $type=$lang['create'];
       $info['navigationcat_status']=1;
       $info['navigationcat_showtitle']=1;
       $info['navigationcat_open']=1;
       $info['navigationcat_align']=0;
       if (is_array($boxhash)) {
        ksort($boxhash);
        foreach($boxhash as $name=>$file) {
    	 eval ("\$navigation_box_option.= \"".templateinclude("editnavcat_box_option")."\";");
         }
        }
       eval ("\$navigation_box= \"".templateinclude("editnavcat_box")."\";");
       }
      if ($info['navigationcat_status']==1) $status1="selected";
      else $status0="selected";
    
      if ($info['navigationcat_showtitle']==1) $show1="checked";
      else $show0="checked";
    
      if ($info['navigationcat_open']==1) $open1="selected";
      else $open0="selected";
    
      if ($info['navigationcat_align']==1) $align1="selected";
      elseif ($info['navigationcat_align']==2) $align2="selected";
      elseif ($info['navigationcat_align']==3) $align3="selected";
      elseif ($info['navigationcat_align']==4) $align4="selected";
      else $align0="selected";
    
      if ($info[navigationcat_rights]=="admin") $rights4="selected";
      elseif ($info[navigationcat_rights]=="mod") $rights3="selected";
      elseif ($info[navigationcat_rights]=="member") $rights2="selected";
      elseif ($info[navigationcat_rights]=="user") $rights1="selected";
      else $rights0="selected";
    
      eval ("\$navigation_show= \"".templateinclude("editnavcat_edit")."\";");	
      }
     else {
      $getcats=$DB->query("SELECT * FROM ".$db_tab['navigationcat']." ORDER by navigationcat_order ASC");
      while($cat=$DB->fetch_array($getcats)) {
       if ($cat['navigationcat_status']==0) $navigation_info='('.$lang['disabled'].')';
       else $navigation_info='';
    
       if ($navigation_cat==$cat['navigationcat_id']) $select=" selected";
    
       if ($cat['navigationcat_align']=="1") {eval ("\$navigation_right.= \"".templateinclude("editnavcat_navigation_right")."\";"); $countr++;}
       elseif ($cat['navigationcat_align']=="2") {eval ("\$navigation_top.= \"".templateinclude("editnavcat_navigation_right")."\";"); $countt++;}
       elseif ($cat['navigationcat_align']=="4") {eval ("\$navigation_kopf.= \"".templateinclude("editnavcat_navigation_right")."\";"); $countt++;}
       elseif ($cat['navigationcat_align']=="5") {eval ("\$navigation_kopf2.= \"".templateinclude("editnavcat_navigation_right")."\";"); $countt++;}
       elseif ($cat['navigationcat_align']=="3") {eval ("\$navigation_bottom.= \"".templateinclude("editnavcat_navigation_right")."\";"); $countb++;}
       else {eval ("\$navigation_left.= \"".templateinclude("editnavcat_navigation_left")."\";"); $countl++;}
       unset($select);
       }
      if ($countl>$countr) $count=$countl+1;
      else $count=$countr+1;
      if ($countb==1) $countb++;
      if ($countt==1) $countt++;
      eval ("\$navigation_show= \"".templateinclude("editnavcat_navigation")."\";");
      }
     eval ("\$site_body.= \"".templateinclude("editnavcat")."\";");
     }
    else {header ("location: admin.php?PHPKITSID=".session_id()); exit();}
    ?>


    Hier der fehler in zeile 18:
    Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /srv/www/web30/html/hp/admin/editnavcat.php on line 18

    das ist bei mir im dreamweaver z18
    elseif (isset($_POST['setkopf2']) && isset($_POST['navigation_cat'])) $DB->query("UPDATE ".$db_ta
  2. Diskutiere mit und stelle Fragen: Jetzt kostenlos anmelden!

    lima-city: Gratis werbefreier Webspace für deine eigene Homepage

  3. da fehlt ne eckige klammer...
    so m?sste es funktionieren:
    elseif (isset($_POST['setkopf2']) && isset($_POST['navigation_cat'])) $DB->query("UPDATE ".$db_tab['navigationcat']." SET navigationcat_align='5'  WHERE navigationcat_id='".$_POST['navigation_cat']."'");

  4. Autor dieses Themas

    f****y

    cool ja funzt
    Hat sich erledigt :)))

    danke schonmal f?r die antwort c0d3c

    Beitrag ge?ndert am 20.07.2006 17:47 von freddy
  5. Diskutiere mit und stelle Fragen: Jetzt kostenlos anmelden!

    lima-city: Gratis werbefreier Webspace für deine eigene Homepage

Dir gefällt dieses Thema?

Über lima-city

Login zum Webhosting ohne Werbung!