soctell

Участники
  • Публикации

    60
  • Зарегистрирован

  • Посещение

Все публикации пользователя soctell

  1. Подскажите, как вывести имя пользователя в форме обратной связи если он залогинен ( в поле имя и названия организации)
  2. Если добавить в main.tpl следующее то $user_id пуст {php}$qwer2="SELECT * FROM re_user where user_id='$user_id'";$result3 = mysql_query($qwer2);$row3 = mysql_fetch_array($result3);echo $qwer2;{/php}
  3. А если в main.tpl в коде привязать файл например menu.php <ul class="top"><li><a href="{$estate_folder}/account/data/?do=new">Добавить объявление</a></li><li>{include file="menu.php"}{if $user_data.imgfile.value != ''}<img src="{$estate_folder}/img/data/user/{$user_data.imgfile.value}" width="20" border="0"/>{else}<img src="{$estate_folder}/template/frontend/agency/img/no_photo.png" width="20" border="0"/>{/if}<a href="{$estate_folder}/account/profile/" >Мой профиль</a></li><li><a href="{$estate_folder}/account/data/" >Мои объявления</a></li>И использовать эту выборку для вывода изображения
  4. Я имею ввиду код который подцепляет изображение пользователя (т.е. сама выборка)
  5. Подскажите а где находится процедура отвечающая за вывод изображения пользователя при просмотре обьявления
  6. А что использовать кроме empty для заглушечной разметки
  7. Вот решение проблемы function getAccountValue() { $qwe = $this->getEmail(); $qwe = str_replace(' ', '', trim($qwe));$query = "select * from re_user where email='".$qwe."' LIMIT 1"; $this->db->exec($query); $this->db->fetch_assoc(); return $this->db->row['imgfile'];}
  8. Сделал так, не выводит конечный результат в $img function getemail() { $query = "select * from results_score order by yscore, mscore LIMIT 1"; $this->db->exec($query); $this->db->fetch_assoc(); return $this->db->row['email']; } function getAccountValue() { $qwe = $this->getemail(); $query = "select * from ".DB_PREFIX."_user where email='$qwe' LIMIT 1"; $this->db->exec($query); $this->db->fetch_assoc(); return $this->db->row['imgfile'];} function getImage() { $img = $this->getAccountValue(); $rs ='<img width="50" border="0" style=" margin-left: 84px; margin-top: -72px;
  9. Т.е. так function getemail() { $query = "select * from results_score order by yscore, mscore LIMIT 1"; $this->db->exec($query); $this->db->fetch_assoc(); return $this->db->row['email']; } function getAccountValue() { $qwe = $this->getemail(); $query = "select * from ".DB_PREFIX."_user where email='$qwe' LIMIT 1"; $this->db->exec($query); $this->db->fetch_assoc(); return $this->db->row['imgfile'];} function getImage() { $query = "select * from results_score order by yscore, mscore LIMIT 1"; $this->db->exec($query); $this->db->fetch_assoc(); $em = $this->db->row['email']; $img = $this->getAccountValue();
  10. Вот добавил функцию getemail(), она не работает function getemail() { $query = "select * from results_score order by yscore, mscore LIMIT 1"; $this->db->exec($query); $this->db->fetch_assoc(); return $this->db->row['email']; } function getAccountValue($em) { $qwe = $this->getemail(); $query = "select * from ".DB_PREFIX."_user where email='$qwe' LIMIT 1"; $this->db->exec($query); $this->db->fetch_assoc(); return $this->db->row['imgfile'];} function getImage() { $query = "select * from results_score order by yscore, mscore LIMIT 1"; $this->db->exec($query); $this->db->fetch_assoc(); $em = $this->db->row['email']; $img = $this->getAccountValue($em);
  11. Я ошибался вот этот код работает при конкретном значении email, т.е. не передается $em function getAccountValue($em) { $query = "select * from ".DB_PREFIX."_user where email='$em' LIMIT 1"; $this->db->exec($query); $this->db->fetch_assoc(); return $this->db->row['imgfile'];}
  12. В смысле типа этого, но условие !empty($img) не работает function getImage() { $query = "select * from results_score order by yscore, mscore LIMIT 1"; $this->db->exec($query); $this->db->fetch_assoc(); $em = $this->db->row['email']; $img = $this->getAccountValue($em); if ( !empty($img)) { $rs ='<img width="50" border="0" style=" margin-left: 84px; margin-top: -72px; position: absolute; border: 1px solid #CFCFCF; border-radius: 5px 5px 5px 5px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);" src="/img/data/user/'.$img.'">'; } else { $rs ='<img width="50" border="0" style=" margin-left: 84px; margin-top: -72px; position: absolute; border: 1px solid #CFCFCF; border-radius: 5px 5px 5px 5px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);" src="/template/frontend/agency/img/no_photo.png">'; } $rs.='<br> <div id="flashContent">
  13. Подскажите а как сделать если не выполняется запрос т.е. email первого запроса нету во втором запросе (в таблице) , то выводит другой код. Типа этого if(empty($img)){ $rs ='<img width="50" border="0" style=" margin-left: 84px; margin-top: -72px; position: absolute; border: 1px solid #CFCFCF; border-radius: 5px 5px 5px 5px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);" src="/template/frontend/agency/img/no_photo.png">';}else{$rs ='<img width="50" border="0" style=" margin-left: 84px; margin-top: -72px; position: absolute; border: 1px solid #CFCFCF; border-radius: 5px 5px 5px 5px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);" src="/img/data/user/'.$img.'">';}
  14. А я убрал точки после rs на строках 95 и 157 и заработало
  15. Undefined variable: rs нас строке 95 Undefined variable: rs нас строке 157 Undefined variable: em нас строке 31 <?php/** * contactus form * @author Kondin Dmitriy <kondin@etown.ru> http://www.sitebill.ru */class contactus_Form extends Object_Manager { /** * Constructor */ function __construct() { $this->SiteBill(); $this->table_name = 'contactus'; $this->action = 'contactus'; $this->primary_key = 'contactus_id'; $this->data_model = $this->get_contactus_model(); } /** * Main * @param void * @return string */ function main () { require_once(SITEBILL_DOCUMENT_ROOT.'/apps/system/lib/model/model.php'); $data_model = new Data_Model(); $form_data = $this->data_model; $rs = $this->getTopMenu(); $rs .= $this->getImage(); $rs .= $this->getAccountValue($em); switch( $this->getRequestValue('do') ){ case 'new_done' : { $form_data[$this->table_name] = $data_model->init_model_data_from_request($form_data[$this->table_name]); //echo '<pre>'; //print_r($form_data['data']); if ( !$this->check_data( $form_data[$this->table_name] ) ) { $rs .= $this->get_form($form_data[$this->table_name], 'new', 0, Multilanguage::_('L_TEXT_SEND')); } else { $order_table = $this->add_data($form_data[$this->table_name]); require_once (SITEBILL_DOCUMENT_ROOT.'/apps/system/lib/system/mailer/mailer.php'); $mailer = new Mailer(); $subject = $_SERVER['SERVER_NAME'].': '.Multilanguage::_('NEW_MESSAGE_FROM_SITE','system'); $to = $this->getConfigValue('order_email_acceptor'); $from = $this->getConfigValue('order_email_acceptor'); if ( $this->getConfigValue('use_smtp') ) { $mailer->send_smtp($to, $from, $subject, $order_table, 1); } else { $mailer->send_simple($to, $from, $subject, $order_table, 1); } $rs = '<h1>'.Multilanguage::_('MESSAGE_SENT','system').'</h1>'; $rs .= $order_table; } break; } default : { } } return $rs; } /** * Get top menu * @param void * @return string */ function getTopMenu () { $query = "select * from results_score order by yscore, mscore LIMIT 1"; mysql_query ('SET CHARSET cp1251'); $this->db->exec($query); $this->db->fetch_assoc(); $rs .= '<p style="text-align:center;">Победитель текущего месяца</p> <table id="searchtb" style="text-align:center; font-size:16px;" width="100%"> <tr> <td style="font-size:16px;"> '.$this->db->row['name'].' </td> <td style="font-size:16px;">'.$this->db->row['yscore'].' г. '.$this->db->row['mscore'].' м. </td> </tr> </table> '; return $rs; } function getAccountValue($em) {$query = "select * from ".DB_PREFIX."_user where email='savvvv_sd@mail.ru' LIMIT 1"; $this->db->exec($query); $this->db->fetch_assoc(); return $this->db->row['imgfile'];} function getImage() { $query = "select * from results_score order by yscore, mscore LIMIT 1"; $this->db->exec($query); $this->db->fetch_assoc(); $em = $this->db->row['email']; $img = $this->getAccountValue($em); $rs .=''.$img.'<br> <div id="flashContent"> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="480" id="sion_impossible2" align="middle"> <param name="movie" value="sion_impossible2.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <param name="play" value="true" /> <param name="loop" value="true" /> <param name="wmode" value="window" /> <param name="scale" value="showall" /> <param name="menu" value="true" /> <param name="devicefont" value="false" /> <param name="salign" value="" /> <param name="allowScriptAccess" value="sameDomain" /> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="/game/sion_impossible2.swf" width="640" height="480"> <param name="movie" value="sion_impossible2.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <param name="play" value="true" /> <param name="loop" value="true" /> <param name="wmode" value="window" /> <param name="scale" value="showall" /> <param name="menu" value="true" /> <param name="devicefont" value="false" /> <param name="salign" value="" /> <param name="allowScriptAccess" value="sameDomain" /> <!--<![endif]--> <a href="http://www.adobe.com/go/getflash"> <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Загрузить Adobe Flash Player" /> </a> <!--[if !IE]>--> </object> <!--<![endif]--> </object> </div>'; return $rs; } /** * Add data * @param array $form_data form data * @return boolean */ function add_data ( $form_data ) { require_once(SITEBILL_DOCUMENT_ROOT.'/apps/system/lib/model/model.php'); $data_model = new Data_Model(); require_once(SITEBILL_DOCUMENT_ROOT.'/apps/system/lib/system/view/view.php'); $table_view = new Table_View(); $rs .= '<table border="1" cellpadding="2" cellspacing="2" style="border: 1px solid gray;">'; $rs .= $table_view->compile_view($form_data); $rs .= '</table>'; /* $query = $data_model->get_insert_query(DB_PREFIX.'_'.$this->table_name, $form_data); //echo $query.'<br>'; $this->db->exec($query); $new_record_id = $this->db->last_insert_id(); //echo "new_record_id = $new_record_id<br>"; //echo $query; */ return $rs; } /** * Get contactus model * @param boolean $ajax mode * @return array */ function get_contactus_model ( $ajax = false ) { $form_data = array(); $form_data['contactus']['id']['name'] = 'id'; $form_data['contactus']['id']['title'] = Multilanguage::_('L_ID'); $form_data['contactus']['id']['value'] = 0; $form_data['contactus']['id']['length'] = 40; $form_data['contactus']['id']['type'] = 'primary_key'; $form_data['contactus']['id']['required'] = 'off'; $form_data['contactus']['id']['unique'] = 'off'; $form_data['contactus']['fio']['name'] = 'fio'; $form_data['contactus']['fio']['title'] = Multilanguage::_('NAME_OR_COMPANY_NAME','system'); $form_data['contactus']['fio']['value'] = ''; $form_data['contactus']['fio']['length'] = 40; $form_data['contactus']['fio']['type'] = 'safe_string'; $form_data['contactus']['fio']['required'] = 'on'; $form_data['contactus']['fio']['unique'] = 'off'; $form_data['contactus']['phone']['name'] = 'phone'; $form_data['contactus']['phone']['title'] = Multilanguage::_('L_PHONE'); $form_data['contactus']['phone']['value'] = ''; $form_data['contactus']['phone']['length'] = 40; $form_data['contactus']['phone']['type'] = 'safe_string'; $form_data['contactus']['phone']['required'] = 'on'; $form_data['contactus']['phone']['unique'] = 'off'; $form_data['contactus']['email']['name'] = 'email'; $form_data['contactus']['email']['title'] = Multilanguage::_('L_EMAIL'); $form_data['contactus']['email']['value'] = ''; $form_data['contactus']['email']['length'] = 40; $form_data['contactus']['email']['type'] = 'safe_string'; $form_data['contactus']['email']['required'] = 'on'; $form_data['contactus']['email']['unique'] = 'off'; $form_data['contactus']['text']['name'] = 'text'; $form_data['contactus']['text']['title'] = Multilanguage::_('L_TEXT'); $form_data['contactus']['text']['value'] = ''; $form_data['contactus']['text']['length'] = 40; $form_data['contactus']['text']['type'] = 'textarea'; $form_data['contactus']['text']['required'] = 'on'; $form_data['contactus']['text']['unique'] = 'off'; $form_data['contactus']['text']['rows'] = '10'; $form_data['contactus']['text']['cols'] = '40'; $form_data['contactus']['captcha']['name'] = 'captcha'; $form_data['contactus']['captcha']['title'] = Multilanguage::_('L_CAPTCHA'); $form_data['contactus']['captcha']['value'] = ''; $form_data['contactus']['captcha']['length'] = 40; $form_data['contactus']['captcha']['type'] = 'captcha'; $form_data['contactus']['captcha']['required'] = 'on'; $form_data['contactus']['captcha']['unique'] = 'off'; //$item_array['action'], $item_array['table_name'], $item_array['primary_key'], $item_array['primary_key_value']; return $form_data; }}?>
  16. Проверил поле есть и оно не пустое. Я даже пробавал конкретные значенния вводить тоже не получается
  17. Мне не принципиально чтобы это работало через функции. Главное чтобы была страница с выводом двух запросов
  18. Вот полный код страницы ну все равно не получается вывести значение <?php/** * contactus form * @author Kondin Dmitriy <kondin@etown.ru> http://www.sitebill.ru */class contactus_Form extends Object_Manager { /** * Constructor */ function __construct() { $this->SiteBill(); $this->table_name = 'contactus'; $this->action = 'contactus'; $this->primary_key = 'contactus_id'; $this->data_model = $this->get_contactus_model(); } /** * Main * @param void * @return string */ function main () { require_once(SITEBILL_DOCUMENT_ROOT.'/apps/system/lib/model/model.php'); $data_model = new Data_Model(); $form_data = $this->data_model; $rs = $this->getTopMenu(); $rs .= $this->getImage(); $rs .= $this->getAccountValue($em); switch( $this->getRequestValue('do') ){ case 'new_done' : { $form_data[$this->table_name] = $data_model->init_model_data_from_request($form_data[$this->table_name]); //echo '<pre>'; //print_r($form_data['data']); if ( !$this->check_data( $form_data[$this->table_name] ) ) { $rs .= $this->get_form($form_data[$this->table_name], 'new', 0, Multilanguage::_('L_TEXT_SEND')); } else { $order_table = $this->add_data($form_data[$this->table_name]); require_once (SITEBILL_DOCUMENT_ROOT.'/apps/system/lib/system/mailer/mailer.php'); $mailer = new Mailer(); $subject = $_SERVER['SERVER_NAME'].': '.Multilanguage::_('NEW_MESSAGE_FROM_SITE','system'); $to = $this->getConfigValue('order_email_acceptor'); $from = $this->getConfigValue('order_email_acceptor'); if ( $this->getConfigValue('use_smtp') ) { $mailer->send_smtp($to, $from, $subject, $order_table, 1); } else { $mailer->send_simple($to, $from, $subject, $order_table, 1); } $rs = '<h1>'.Multilanguage::_('MESSAGE_SENT','system').'</h1>'; $rs .= $order_table; } break; } default : { } } return $rs; } /** * Get top menu * @param void * @return string */ function getTopMenu () { $query = "select * from results_score order by yscore, mscore LIMIT 1"; mysql_query ('SET CHARSET cp1251'); $this->db->exec($query); $this->db->fetch_assoc(); $em = $this->db->row['email']; $rs .= '<p style="text-align:center;">Победитель текущего месяца</p> <table id="searchtb" style="text-align:center; font-size:16px;" width="100%"> <tr> <td style="font-size:16px;"> '.$this->db->row['name'].' </td> <td style="font-size:16px;">'.$this->db->row['yscore'].' г. '.$this->db->row['mscore'].' м. </td> </tr> </table> '; return $rs; } function getAccountValue($em) { $rs=''; if($em==''){ return $rs; } $DBC=DBC::getInstance(); $query = "select * from ".DB_PREFIX."_user where email='$em' LIMIT 1"; $stmt=$DBC->query($query, array($em)); if($stmt){ $ar=$DBC->fetch($stmt); if($ar['imgfile']!=''){ $rs=$ar['imgfile']; } } return $rs;} function getImage() { $query = "select * from results_score order by yscore, mscore LIMIT 1"; $this->db->exec($query); $this->db->fetch_assoc(); $em = $this->db->row['email']; $img = $this->getAccountValue($em); $rs .=''.$img.'<br> <div id="flashContent"> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="480" id="sion_impossible2" align="middle"> <param name="movie" value="sion_impossible2.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <param name="play" value="true" /> <param name="loop" value="true" /> <param name="wmode" value="window" /> <param name="scale" value="showall" /> <param name="menu" value="true" /> <param name="devicefont" value="false" /> <param name="salign" value="" /> <param name="allowScriptAccess" value="sameDomain" /> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="/game/sion_impossible2.swf" width="640" height="480"> <param name="movie" value="sion_impossible2.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <param name="play" value="true" /> <param name="loop" value="true" /> <param name="wmode" value="window" /> <param name="scale" value="showall" /> <param name="menu" value="true" /> <param name="devicefont" value="false" /> <param name="salign" value="" /> <param name="allowScriptAccess" value="sameDomain" /> <!--<![endif]--> <a href="http://www.adobe.com/go/getflash"> <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Загрузить Adobe Flash Player" /> </a> <!--[if !IE]>--> </object> <!--<![endif]--> </object> </div>'; return $rs; } /** * Add data * @param array $form_data form data * @return boolean */ function add_data ( $form_data ) { require_once(SITEBILL_DOCUMENT_ROOT.'/apps/system/lib/model/model.php'); $data_model = new Data_Model(); require_once(SITEBILL_DOCUMENT_ROOT.'/apps/system/lib/system/view/view.php'); $table_view = new Table_View(); $rs .= '<table border="1" cellpadding="2" cellspacing="2" style="border: 1px solid gray;">'; $rs .= $table_view->compile_view($form_data); $rs .= '</table>'; /* $query = $data_model->get_insert_query(DB_PREFIX.'_'.$this->table_name, $form_data); //echo $query.'<br>'; $this->db->exec($query); $new_record_id = $this->db->last_insert_id(); //echo "new_record_id = $new_record_id<br>"; //echo $query; */ return $rs; } /** * Get contactus model * @param boolean $ajax mode * @return array */ function get_contactus_model ( $ajax = false ) { $form_data = array(); $form_data['contactus']['id']['name'] = 'id'; $form_data['contactus']['id']['title'] = Multilanguage::_('L_ID'); $form_data['contactus']['id']['value'] = 0; $form_data['contactus']['id']['length'] = 40; $form_data['contactus']['id']['type'] = 'primary_key'; $form_data['contactus']['id']['required'] = 'off'; $form_data['contactus']['id']['unique'] = 'off'; $form_data['contactus']['fio']['name'] = 'fio'; $form_data['contactus']['fio']['title'] = Multilanguage::_('NAME_OR_COMPANY_NAME','system'); $form_data['contactus']['fio']['value'] = ''; $form_data['contactus']['fio']['length'] = 40; $form_data['contactus']['fio']['type'] = 'safe_string'; $form_data['contactus']['fio']['required'] = 'on'; $form_data['contactus']['fio']['unique'] = 'off'; $form_data['contactus']['phone']['name'] = 'phone'; $form_data['contactus']['phone']['title'] = Multilanguage::_('L_PHONE'); $form_data['contactus']['phone']['value'] = ''; $form_data['contactus']['phone']['length'] = 40; $form_data['contactus']['phone']['type'] = 'safe_string'; $form_data['contactus']['phone']['required'] = 'on'; $form_data['contactus']['phone']['unique'] = 'off'; $form_data['contactus']['email']['name'] = 'email'; $form_data['contactus']['email']['title'] = Multilanguage::_('L_EMAIL'); $form_data['contactus']['email']['value'] = ''; $form_data['contactus']['email']['length'] = 40; $form_data['contactus']['email']['type'] = 'safe_string'; $form_data['contactus']['email']['required'] = 'on'; $form_data['contactus']['email']['unique'] = 'off'; $form_data['contactus']['text']['name'] = 'text'; $form_data['contactus']['text']['title'] = Multilanguage::_('L_TEXT'); $form_data['contactus']['text']['value'] = ''; $form_data['contactus']['text']['length'] = 40; $form_data['contactus']['text']['type'] = 'textarea'; $form_data['contactus']['text']['required'] = 'on'; $form_data['contactus']['text']['unique'] = 'off'; $form_data['contactus']['text']['rows'] = '10'; $form_data['contactus']['text']['cols'] = '40'; $form_data['contactus']['captcha']['name'] = 'captcha'; $form_data['contactus']['captcha']['title'] = Multilanguage::_('L_CAPTCHA'); $form_data['contactus']['captcha']['value'] = ''; $form_data['contactus']['captcha']['length'] = 40; $form_data['contactus']['captcha']['type'] = 'captcha'; $form_data['contactus']['captcha']['required'] = 'on'; $form_data['contactus']['captcha']['unique'] = 'off'; //$item_array['action'], $item_array['table_name'], $item_array['primary_key'], $item_array['primary_key_value']; return $form_data; }}?>
  19. Например за основу взял один из файлов например contactus.php и хочу выполнить в нем два запроса, первый выполняется, а второй не выполняется в функции function getAccountValue($em) <?php/** * contactus form * @author Kondin Dmitriy <kondin@etown.ru> http://www.sitebill.ru */class contactus_Form extends Object_Manager { /** * Constructor */ function __construct() { $this->SiteBill(); $this->table_name = 'contactus'; $this->action = 'contactus'; $this->primary_key = 'contactus_id'; $this->data_model = $this->get_contactus_model(); } /** * Main * @param void * @return string */ function main () { require_once(SITEBILL_DOCUMENT_ROOT.'/apps/system/lib/model/model.php'); $data_model = new Data_Model(); $form_data = $this->data_model; $rs = $this->getTopMenu();$rs .= $this->getImage();$rs .= $this->getAccountValue($em);switch( $this->getRequestValue('do') ){case 'new_done' : { $form_data[$this->table_name] = $data_model->init_model_data_from_request($form_data[$this->table_name]); //echo '<pre>'; //print_r($form_data['data']); if ( !$this->check_data( $form_data[$this->table_name] ) ) { $rs .= $this->get_form($form_data[$this->table_name], 'new', 0, Multilanguage::_('L_TEXT_SEND')); } else { $order_table = $this->add_data($form_data[$this->table_name]); require_once (SITEBILL_DOCUMENT_ROOT.'/apps/system/lib/system/mailer/mailer.php'); $mailer = new Mailer(); $subject = $_SERVER['SERVER_NAME'].': '.Multilanguage::_('NEW_MESSAGE_FROM_SITE','system'); $to = $this->getConfigValue('order_email_acceptor'); $from = $this->getConfigValue('order_email_acceptor'); if ( $this->getConfigValue('use_smtp') ) { $mailer->send_smtp($to, $from, $subject, $order_table, 1); } else { $mailer->send_simple($to, $from, $subject, $order_table, 1); } $rs = '<h1>'.Multilanguage::_('MESSAGE_SENT','system').'</h1>'; $rs .= $order_table; }break;}default : { }}return $rs;}/*** Get top menu* @param void * @return string*/function getTopMenu () { $query = "select * from results_score order by yscore, mscore LIMIT 1"; mysql_query ('SET CHARSET cp1251'); $this->db->exec($query); $this->db->fetch_assoc();$img = $row2['imgfile']; $rs .= '<p style="text-align:center;">Победитель текущего месяца</p><table id="searchtb" style="text-align:center; font-size:16px;" width="100%"><tr><td style="font-size:16px;">'.$img.' '.$this->db->row['name'].'</td><td style="font-size:16px;">'.$this->db->row['yscore'].' г. '.$this->db->row['mscore'].' м. </td></tr></table>'; return $rs;} function getAccountValue($em) { $query = "select * from re_user where email='$em'"; $this->db->exec($query); $this->db->fetch_assoc();$rs = $this->db->row['imgfile']; return $rs; } function getImage() {$img = $this->getAccountValue($em); $rs .=''.$img.'<br><div id="flashContent"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="480" id="sion_impossible2" align="middle"><param name="movie" value="sion_impossible2.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="play" value="true" /><param name="loop" value="true" /><param name="wmode" value="window" /><param name="scale" value="showall" /><param name="menu" value="true" /><param name="devicefont" value="false" /><param name="salign" value="" /><param name="allowScriptAccess" value="sameDomain" /><!--[if !IE]>--><object type="application/x-shockwave-flash" data="/game/sion_impossible2.swf" width="640" height="480"><param name="movie" value="sion_impossible2.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="play" value="true" /><param name="loop" value="true" /><param name="wmode" value="window" /><param name="scale" value="showall" /><param name="menu" value="true" /><param name="devicefont" value="false" /><param name="salign" value="" /><param name="allowScriptAccess" value="sameDomain" /><!--<![endif]--><a href="http://www.adobe.com/go/getflash"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Загрузить Adobe Flash Player" /></a><!--[if !IE]>--></object><!--<![endif]--></object></div>';return $rs; }/*** Add data* @param array $form_data form data* @return boolean*/function add_data ( $form_data ) { require_once(SITEBILL_DOCUMENT_ROOT.'/apps/system/lib/model/model.php'); $data_model = new Data_Model(); require_once(SITEBILL_DOCUMENT_ROOT.'/apps/system/lib/system/view/view.php'); $table_view = new Table_View(); $rs .= '<table border="1" cellpadding="2" cellspacing="2" style="border: 1px solid gray;">'; $rs .= $table_view->compile_view($form_data); $rs .= '</table>'; /* $query = $data_model->get_insert_query(DB_PREFIX.'_'.$this->table_name, $form_data); //echo $query.'<br>'; $this->db->exec($query); $new_record_id = $this->db->last_insert_id(); //echo "new_record_id = $new_record_id<br>"; //echo $query; */ return $rs;} /** * Get contactus model * @param boolean $ajax mode * @return array */ function get_contactus_model ( $ajax = false ) {$form_data = array();$form_data['contactus']['id']['name'] = 'id';$form_data['contactus']['id']['title'] = Multilanguage::_('L_ID');$form_data['contactus']['id']['value'] = 0;$form_data['contactus']['id']['length'] = 40;$form_data['contactus']['id']['type'] = 'primary_key';$form_data['contactus']['id']['required'] = 'off';$form_data['contactus']['id']['unique'] = 'off';$form_data['contactus']['fio']['name'] = 'fio';$form_data['contactus']['fio']['title'] = Multilanguage::_('NAME_OR_COMPANY_NAME','system');$form_data['contactus']['fio']['value'] = '';$form_data['contactus']['fio']['length'] = 40;$form_data['contactus']['fio']['type'] = 'safe_string';$form_data['contactus']['fio']['required'] = 'on';$form_data['contactus']['fio']['unique'] = 'off';$form_data['contactus']['phone']['name'] = 'phone';$form_data['contactus']['phone']['title'] = Multilanguage::_('L_PHONE');$form_data['contactus']['phone']['value'] = '';$form_data['contactus']['phone']['length'] = 40;$form_data['contactus']['phone']['type'] = 'safe_string';$form_data['contactus']['phone']['required'] = 'on';$form_data['contactus']['phone']['unique'] = 'off';$form_data['contactus']['email']['name'] = 'email';$form_data['contactus']['email']['title'] = Multilanguage::_('L_EMAIL');$form_data['contactus']['email']['value'] = '';$form_data['contactus']['email']['length'] = 40;$form_data['contactus']['email']['type'] = 'safe_string';$form_data['contactus']['email']['required'] = 'on';$form_data['contactus']['email']['unique'] = 'off';$form_data['contactus']['text']['name'] = 'text';$form_data['contactus']['text']['title'] = Multilanguage::_('L_TEXT');$form_data['contactus']['text']['value'] = '';$form_data['contactus']['text']['length'] = 40;$form_data['contactus']['text']['type'] = 'textarea';$form_data['contactus']['text']['required'] = 'on';$form_data['contactus']['text']['unique'] = 'off';$form_data['contactus']['text']['rows'] = '10';$form_data['contactus']['text']['cols'] = '40';$form_data['contactus']['captcha']['name'] = 'captcha';$form_data['contactus']['captcha']['title'] = Multilanguage::_('L_CAPTCHA');$form_data['contactus']['captcha']['value'] = '';$form_data['contactus']['captcha']['length'] = 40;$form_data['contactus']['captcha']['type'] = 'captcha';$form_data['contactus']['captcha']['required'] = 'on';$form_data['contactus']['captcha']['unique'] = 'off'; //$item_array['action'], $item_array['table_name'], $item_array['primary_key'], $item_array['primary_key_value'];return $form_data; }}?>
  20. Подскажите, есть ли в админ панели возможность добавить динамической страницы с php, если нет то как это возможно?
  21. А где здесь код отвечающий за логику при просмотре обьявления