getting this error
Fatal error: Class kbclientview_query: Cannot inherit from undefined class kbclientview_common_query in httpdocs/client/inc/default/view/KBClientView_query.php on line 16
<?php
// +---------------------------------------------------------------------------+
// | This file is part of the KnowledgebasePublisher package |
// | KnowledgebasePublisher - web based knowledgebase publisher tool |
// | |
// | Author: Evgeny Leontev <eleontev@gmail.com> |
// | Copyright (c) 2005 Evgeny Leontev |
// | |
// | For the full copyright and license information, please view the LICENSE |
// | file that was distributed with this source code. |
// +---------------------------------------------------------------------------+
require_once 'eleontev/Util/CryptEmail.php';
class KBClientView_query extends KBClientView_common_query
{
function &execute(&$manager) {
$row = &$manager->getEntryById($this->entry_id, $this->category_id);
$row = &$this->stripVars($row);
if(!$row) { return; }
$this->meta_title = $this->msg['add_query_msg'];
$title = ''; //($this->controller->getSetting('show_title_nav')) ? $row['title'] : '';
$data = $this->getTop($manager, $title, false);
$data .= $this->getForm($manager);
$data .= $this->getEntry($manager, $row);
return $data;
}
function getEntry(&$manager, &$row) {
$tpl = &new tplTemplatez($this->template_dir . 'article.html');
$tpl->tplParse(array_merge($row, $this->msg));
return $tpl->tplPrint(1);
}
function getForm($manager) {
$tpl = &new tplTemplatez($this->template_dir . 'query_form.html');
$tpl->tplSetNeeded('/cancel_btn');
$tpl->tplAssign('action_link', $this->_getLink('all'));
$tpl->tplAssign('cancel_link', $this->_getLink('entry', $this->category_id, $this->entry_id));
/*added above code to display login_link if the user is not registered and showing logout and create account when the user is not registered START -- saigoopal*/
if($manager->is_registered) {
$tpl->tplAssign('username', AuthMember::getUsername());
$tpl->tplAssign('logout_link', $this->_getLink('logout'));
$tpl->tplAssign('username_link', $this->_getLink('member'));
$tpl->tplAssign('delim', '|');
if(AuthMember::getCookie()) {
$this->msg['logout_msg'] = '';
$tpl->tplAssign('delim', '');
}
$tpl->tplSetNeeded('/logged');
} elseif($manager->use_registration) {
// should check more to redirect correct after login
$tpl->tplAssign('login_link', $this->_getLink('login', $this->category_id, $this->entry_id, '_' . $this->view_id));
if($manager->getSetting('register_policy')) {
$tpl->tplAssign('register_link', $this->_getLink('register'));
$tpl->tplSetNeeded('/register_link');
}
$tpl->tplSetNeeded('/login_link');
}
/*added above code to display login_link if the user is not registered and showing logout and create account when the user is not registered end -- saigoopal*/
/* to display search form the following code is added sai gopal starting*/
if($this->display_categories) {
$tpl->tplAssign('category_select', $this->_getCategorySelect($manager));
}
//<input type="hidden" name="View" value="search">
$search_str = (isset($_GET['q'])) ? sprintf('?q=%s', $_GET['q']) : '';
if($this->view_id == 'files') {
if(!$this->controller->mod_rewrite) {
$ar = array($this->view_key => 'files', $this->msg_key => 'search');
$tpl->tplAssign('hidden_search', http_build_hidden($ar));
$ar = array($this->view_key => 'files');
$tpl->tplAssign('hidden_category', http_build_hidden($ar));
}
$tpl->tplAssign('form_search_action', $this->_getLink('files', $this->category_id, '', 'search'));
$tpl->tplAssign('form_category_action', $this->_getLink('files', $this->category_id));
$tpl->tplAssign('advanced_search_link', $this->_getLink('files', $this->category_id, '', 'search') . $search_str);
} else {
if(!$this->controller->mod_rewrite) {
$ar = array($this->controller->getRequestKey('view') => 'search');
$tpl->tplAssign('hidden_search', http_build_hidden($ar));
}
$tpl->tplAssign('form_category_action', $this->_getLink());
$tpl->tplAssign('form_search_action', $this->_getLink('search', $this->category_id));
$tpl->tplAssign('advanced_search_link', $this->_getLink('search', $this->category_id) . $search_str);
}
/* to display search form the following code is added sai gopal ending*/
$sqlqry="SELECT * FROM s_subscription_details";
$resqry=mysql_query($sqlqry);
$num=mysql_num_rows($resqry);
if($num>0)
{
// $subscript_array=$row['subscription_name'];
// $subscript_price_array=$row['subscription_price'];
while($row=mysql_fetch_assoc($resqry))
{
$subscript_array =$row['subscription_name'];
$subscript_price_array=$row['subscription_price'];
}
}
/*$tpl->tplAssign('subscription_list',$subscript_array);
$tpl->tplAssign('subscription_price_list',$subscript_price_array); */
$tpl->tplAssign('user_msg', $this->getErrors());
if(!$manager->is_registered) {
$tpl->tplSetNeeded('/not_registered');
}
if($this->useCaptcha($manager, 'comment')) {
$tpl->tplSetNeeded('/captcha');
$tpl->tplAssign('captcha_src', $this->getCaptchaSrc());
}
$tpl->tplAssign('toggle_form', 0);
$tpl->tplAssign('display_form', 'block');
$tpl->tplAssign('kb_path', $this->controller->kb_path);
$tpl->tplAssign($this->msg);
$tpl->tplAssign($this->getFormData());
$tpl->tplParse();
return $tpl->tplPrint(1);
}
function validate($values, $manager) {
require_once 'eleontev/Validator.php';
$v =& new Validator($values, false);
$v->requiredArray('required_msg', array('comment'));
if(isset($values['email'])) {
$v->regex('email_msg', 'email', 'email', false);
}
if($this->useCaptcha($manager, 'comment')) {
if($_SESSION['kb_captcha_'] != $values['captcha']) {
$v->setError('captcha_text_msg', 'captcha', 'captcha');
}
}
return $v->getErrors();
}
}
?>