Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: I panele iterpimas

Parašė kiskiss· 2007 Lie. 20 02:07:00
#1

Man reikia iterpti koda i panele taciau amzinai gaunu klaida. gal zinote kur klaida?

<?php

if (isset($_GET['process'])) {
    $smarty->assign('navbar', array(array('name' => $settings[0]['dbname'], 'url' => ''), array('name' => lang('search'), 'url' => '?act=search'), array('name' => lang('search_results').': '.$_POST['query'], 'url' => '?act=search')));
    $smarty->assign('title', $settings[0]['dbname'].' Ā» '.lang('search').' Ā» '.lang('search_results').': '.$_POST['query']);
    $smarty->assign('act', 'process');
   
   
    if (!check_input($_POST)) {
        smarty_error(lang('emptyfield'));
    }
   
   
    $allowed_fields = array("file_name", "file_desc", "file_creator", "file_version", "file_longdesc");
   
   
    $searchin = array();
    foreach ($_POST['search_in'] as $s) {
       if (in_array($s, $allowed_fields)) {
          $searchin[] = $s." LIKE '%".xhtml_convert($_POST['query'])."%'";
       }
    }
    $searchin = implode(' OR ', $searchin);
   
   
    $results = $db->GetArray("SELECT * FROM ".$dbPrefix."files WHERE (".$searchin.") AND file_catid IN (".implode(',', $_POST['categories']).")");
    if (count($results) == 0) {
        smarty_error(str_replace('{keyword}', $_POST['query'], lang('no_results')));
    }
    $smarty->assign('results', $results);
} else {
    
    
     $cats = $settings[0]['dropdown'];
     $drop = '<select name="categories[]" multiple="multiple">'."\n";
     $a = unserialize($cats);
    
     foreach ($a as $b) {
      $level = '';
      for($x = 0; $x < $b['sub']; $x++)
      {
        $level .= ' ';
      }
      if (strlen($level) > 0)
      {
        $level = str_replace(' ', ' ', $level);
      }
   
      $cat_id[] = $b['id'];
      $cat_name[] = $level.$b['name'];
      
      $drop .= '<option selected="selected" value="'.$b['id'].'">'.$level.''.$b['name']."</option>\n";
     }
     $drop .= '</select>';
   $smarty->assign('categories', $drop);
    $smarty->assign('navbar', array(array('name' => $settings[0]['dbname'], 'url' => ''), array('name' => lang('search'), 'url' => '?act=search')));
    $smarty->assign('title', $settings[0]['dbname'].' Ā» '.lang('search'));
}

?>



Redagavo kiskiss· 2007 Lie. 20 02:07:52

Parašė kiskiss· 2007 Lie. 20 10:07:09
#2

Nieks nezinot? :?

Parašė ozzWANTED· 2007 Lie. 20 12:07:50
#3

Nu tai ir atpostink tą klaidą kokią metą, ir kokioj eilutėj...

Parašė kiskiss· 2007 Lie. 20 17:07:42
#4

ne nu kai i panele keliu tai raso. cia as jeigu ka i panele keliu


Fatal error: Call to a member function assign() on a non-object in /home/******/*********/ation/panel_editor.php(111) : eval()'d code on line 53