Пример #1
0
 /**
  * Function search
  * @params $forms - the html tag of the form
  * @params $hidden - the html of hidden values
  * @params $search - the value to be search
  * @params $id - the input id that will be used by the javascript in the button
  */
 public static function search($forms, $hiddenobj = null, $search = '', $id = 'search', $filterobj = null, $message = '', $pagination = null)
 {
     $html = '';
     $html .= $forms;
     $html .= $hiddenobj;
     $html .= '<table cellspacing="0" cellpadding="2" border="0" style="text-align: left; width: 100%;"><tbody>';
     $html .= '<tr><td style="text-align: left; padding: 0px 0px 3px 5px; width: 300px;">' . _JNEWS_SEARCH;
     $html .= '<input type="text" name="' . $id . '" id="' . $id . '" value="' . $search . '" style="margin: 2px 5px;" class="inputbox" onchange="document.adminForm.submit();" />';
     $html .= '<button class="joobibutton" onclick="this.form.submit();">' . _JNEWS_SEARCH_GO . '</button>';
     $js = "document.getElementById('{$id}').value='';this.form.submit();";
     $html .= '<button class="joobibutton" onclick="' . $js . '">' . _JNEWS_SEARCH_RESET . '</button>';
     if (isset($message)) {
         $html .= '</td><td style="text-align: center;">';
         $html .= $message;
     }
     if (isset($pagination)) {
         $html .= '</td><td style="text-align: right;">';
         $html .= jnews::pagination($pagination);
     }
     if (isset($filterobj)) {
         $html .= '</td><td style="text-align: right;">';
         $html .= $filterobj;
     }
     $html .= '</td></tr>';
     $html .= '</tbody></table>';
     $html .= '</form>';
     return $html;
 }