db = new DbConnector(); $this->pager2 = new PagedResults2(); $this->pager4 = new PagedResults4(); $this->news = new newsPage(); $this->education = new educationPage(); $this->estetic = new esteticPage(); $this->antiage = new antiagePage(); $this->antiagetwo = new antiagetwoPage(); $this->parters = new partersPage(); $this->our_cv = new our_cvPage(); $this->tim = new timPage(); $this->contact = new contactPage(); } function parent_menu($sectionid){ $result3 = @mysqli_query($this->db->link, 'SELECT parentid FROM menu WHERE id="'.$sectionid.'" limit 1'); $ret = @mysqli_fetch_array($result3); return $ret['parentid']; } function parent_menu2(){ $result4 = @mysqli_query($this->db->link, 'SELECT parentid FROM menu WHERE id="'.$this->parent_menu((integer)$_GET['sectionid']).'" limit 1'); $ret4 = @mysqli_fetch_array($result4); return $ret4['parentid']; } function parent_menu3($sectionid){ $result3 = @mysqli_query($this->db->link, 'SELECT id FROM menu WHERE info_id="'.$sectionid.'" limit 1'); $ret = @mysqli_fetch_array($result3); return $ret['id']; } function parent_menu4($sectionid){ $result4 = @mysqli_query($this->db->link, 'SELECT parentid FROM menu WHERE parentid="'.$sectionid.'" limit 1'); $ret4 = @mysqli_fetch_array($result4); return $ret4['parentid']; } //Begin Bolme function lang() { $dil_0000=$_GET["lang"]; $deyis=array("<",">","*","!","/",".","-",")","(","}","{","+","-",":",",","?","|","^","%","'","="); $dil_l=str_replace($deyis,"",$dil_0000); if(($dil_l=='az') OR ($dil_l=='en') OR ($dil_l=='ru') OR ($dil_l=='tr')){ $about .= $dil_l; }elseif((isset($_SESSION['lang'])=='az') OR (isset($_SESSION['lang'])=='en') OR (isset($_SESSION['lang'])=='ru') OR (isset($_SESSION['lang'])=='tr')){ $about .= $_SESSION['lang']; }else{ $about .= 'az'; } return $about; } function lang2($value) { $dil_0000=$value; $deyis=array("<",">","*","!","/",".",")","(","}","{","+",":",",","?","|","^","%","'","="); $about = str_replace($deyis,"",$dil_0000); return $about; } function convert2($trashstr) { $ru = array("й","ц","у","к","е","н","г","ш","щ","з","х","ъ","ф","ы","в","а","п","р","о","л","д","ж","э","я","ч","с","м","и","т","ь","б","ю","Й","Ц","У","К","Е","Н","Г","Ш","Щ","З","Х","Ъ","Ф","Ы","В","А","П","Р","О","Л","Д","Ж","Э","Я","Ч","С","М","И","Т","Ь","Б","Ю", "ə", "ı", "ş", "ç", "ğ", "ö", "ü"); $trash = array("й","ц","у","к","е","н","г","ш","щ","з","х","ъ","ф","ы","в","а","п","р","о","л","д","ж","э","я","ч","с","м","и","т","ь","б","ю","Й","Ц","У","К","Е","Н","Г","Ш","Щ","З","Х","Ъ","Ф","Ы","В","А","П","Р","О","Л","Д","Ж","Э","Я","Ч","С","М","И","Т","Ь","Б","Ю", "ə", "ı", "ş", "ç", "ğ", "ö", "ü"); $about = str_replace($trash, $ru, $trashstr); return $about; } function utf8($trashstr) { $az = array(); $trash = array(); return str_replace($az, $trash, $trashstr); } function utf82($trashstr) { $az = array("

", "

"); $trash = array("

", "
"); return str_replace($az, $trash, $trashstr); } function data_str($trashstr, $getLang) { $trash = array("12", "11", "10", "9", "8", "7", "6", "5", "4", "3", "2", "1" ); $az = array("DEKABR", "NOYABR", "OKTYABR", "SENTYABR", "AVQUST", "İYUL", "İYUN", "MAY", "APREL", "MART", "FEVRAL", "YANVAR"); return str_replace($trash, $az, $trashstr); } function bolme($info_id, $getLang) { $result = @mysqli_query($this->db->link, 'SELECT '.$getLang.' FROM menu WHERE info_id='.$info_id.' limit 1'); $row = @mysqli_fetch_array($result); $about = $row[$getLang]; return $about; } function bolme2($info_id, $getLang) { $result = @mysqli_query($this->db->link, 'SELECT '.$getLang.' FROM menu WHERE id='.$info_id.' limit 1'); $row = @mysqli_fetch_array($result); $about = $row[$getLang]; return $about; } function bolme_id($info_id) { $result = @mysqli_query($this->db->link, 'SELECT id FROM menu WHERE info_id='.$info_id.' limit 1'); $row = @mysqli_fetch_array($result); $about = $row['id']; return $about; } //End Bolme //Begin Menu function getMainMenu($getLang){ $parentid = 0; foreach($_GET as $key => $value){ if($key == 'lang') $paramString2 .= $key.'='.$value.'&'; } $result = @mysqli_query($this->db->link, 'SELECT parentid, link, '.$getLang.', txt_type, id, url FROM menu WHERE parentid='.$parentid.' ORDER BY parentid, position limit 12'); while($row = @mysqli_fetch_array($result)){ $sayi++; $link = $this->utf82($row['link']); $name = stripslashes($row[$getLang]); $txt_type = $row['txt_type']; $id = $row['id']; $result2 = @mysqli_query($this->db->link, 'SELECT parentid, link, '.$getLang.', txt_type, url, id FROM menu WHERE parentid='.$id.' ORDER BY parentid, position'); if(($row['id']==$this->lang2($_GET['sectionid'])) OR ($row['id']==$this->parent_menu($this->lang2($_GET['sectionid'])))){ $mainMenu .= '
  • utf82($row['url']).'/'; }else{ $mainMenu .= '#'; } }else{ $mainMenu .= str_replace('az', $getLang, $link); } $mainMenu .= '">'.$this->utf82($name).''; if(@mysqli_num_rows($result2) > 0){ $mainMenu .= '
      '; } while($row2 = @mysqli_fetch_array($result2)){ $id2 = $row2['id']; $link2 = $this->utf82($row2['link']); $name2 = stripslashes($row2[$getLang]); $txt_type2 = $row2['txt_type']; $result_under = @mysqli_query($this->db->link, 'SELECT parentid, link, '.$getLang.', txt_type, url, id FROM menu WHERE parentid='.$id2.' ORDER BY parentid, position'); $num_under = @mysqli_num_rows($result_under); $mainMenu .= '
    • '.$this->utf82(str_replace(' ', ' ', $name2)).''; $result3 = @mysqli_query($this->db->link, 'SELECT parentid, link, '.$getLang.', txt_type, url, id FROM menu WHERE parentid='.$id2.' ORDER BY parentid, position'); if(@mysqli_num_rows($result3) > 0){ $mainMenu .= '
        '; } while($row3 = @mysqli_fetch_array($result3)){ $id3 = $row3['id']; $link3 = $this->utf82($row3['link']); $name3 = stripslashes($row3[$getLang]); $txt_type3 = $row3['txt_type']; $mainMenu .= '
      • '.$this->utf82(str_replace(' ', ' ', $name3)).'
      • '; } if(@mysqli_num_rows($result3) > 0){ $mainMenu .= '
      '; } $mainMenu .= '
    • '; } if(@mysqli_num_rows($result2) > 0){ $mainMenu .= '
    '; } $mainMenu .= '
  • '; if(@mysqli_num_rows($result) != $sayi){ //$mainMenu .= ''; } } return $mainMenu; } //End Menu //Begin Type function parent($sectionid, $type){ $parent = ''; $result_parent = @mysqli_query($this->db->link, 'SELECT info_id, txt_type FROM menu WHERE url="'.$sectionid.'" limit 1'); $ret_parent = @mysqli_fetch_array($result_parent); $info_id = $ret_parent['info_id']; $txt_type = $ret_parent['txt_type']; if ($type == '2'){ $parent .= $info_id; }if ($type == '3'){ $parent .= $txt_type; } return $parent; } //End Type function index($sectionid, $getLang) { $txt_type = $this->parent($sectionid, 3); if($txt_type == 'text'){ $about .= $this->text($sectionid, $getLang); }elseif($txt_type == 'text2'){ $about .= $this->text2($sectionid, $getLang); }elseif($txt_type == 'news'){ $about .= $this->news->news($sectionid, $getLang); }elseif($txt_type == 'education'){ $about .= $this->education->education($sectionid, $getLang); }elseif($txt_type == 'estetic'){ $about .= $this->estetic->estetic($sectionid, $getLang); }elseif($txt_type == 'antiage'){ $about .= $this->antiage->antiage($sectionid, $getLang); }elseif($txt_type == 'antiagetwo'){ $about .= $this->antiagetwo->antiagetwo($sectionid, $getLang); }elseif($txt_type == 'parters'){ $about .= $this->parters->parters($sectionid, $getLang); }elseif($txt_type == 'our_cv'){ $about .= $this->our_cv->our_cv($sectionid, $getLang); }elseif($txt_type == 'tim'){ $about .= $this->tim->tim($sectionid, $getLang); }elseif($txt_type == 'contact'){ $about .= $this->contact->contact($sectionid, $getLang); }elseif($txt_type == 'get_mail'){ $about .= $this->get_mail('5', $getLang); }elseif($txt_type == 'submit'){ $about .= $this->submit($sectionid, $getLang); }elseif($txt_type == 'about'){ $about .= $this->about($getLang); }elseif($txt_type == 'video'){ $about .= $this->video($sectionid, $getLang); }elseif($txt_type == 'foto'){ $about .= $this->foto($sectionid, $getLang); } return $about; } //Begin function meta($getLang) { $txt_type = $this->parent($this->lang2($_GET['sectionid']), 3); $sect=(int)$_GET['id']; $result = @mysqli_query($this->db->link, 'SELECT bashliq_'.$getLang.', '.$getLang.'_text_min, tarix_j, tarix_m, tarix_y, saat, foto, type_id FROM vb_post WHERE bashliq_'.$getLang.' != "" AND aktive="yes" AND id="'.(int)$_GET['id'].'" limit 1'); $row = @mysqli_fetch_array($result); $result_full = @mysqli_query($this->db->link, 'SELECT id, '.$getLang.' FROM menu WHERE (txt_type="news" OR txt_type="news2" OR txt_type="news3" OR txt_type="news4" OR txt_type="text2" OR txt_type="education" OR txt_type="estetic" OR txt_type="antiage" OR txt_type="antiagetwo") AND id="'.$this->fereach_cat((int)$_GET['id'], $getLang, 3).'" ORDER BY position limit 1'); $row_full = @mysqli_fetch_array($result_full); if($getLang=='az'){ $lang_face = 'az_AZ'; }elseif($getLang=='en'){ $lang_face = 'en_US'; }elseif($getLang=='ru'){ $lang_face = 'ru_RU'; }else{ $lang_face = 'az_AZ'; } if((int)$_GET['id']!=''){ $bashliq_az22=str_replace('"', '"', stripslashes($row['bashliq_'.$getLang.''])); $meta_title = $this->utf82($bashliq_az22); $meta_description = $this->utf82($bashliq_az22); $link_image_src = "".URL_SITE."/uploads/".$txt_type."/".$row['foto'].""; if($txt_type=='news'){ $link_alternate = "".URL_SITE."/".$getLang."/news/id-".$sect.""; }else{ $link_alternate = "".URL_SITE."/".$getLang."/".$this->lang2($_GET['sectionid'])."/id-".$sect.""; } $about = ' '.$meta_title.' '.GetFromLang('default', 'title', 'title').' '; }else{ $about .= ' KEPRO Esthetic & Antiage Clinic | Эстетическая и антивозрастная клиника КЕПРО '; } $about .= ' '; return $about; } //End meta //Begin about function about($getLang) { $about .= '
    '; $result1 = @mysqli_query($this->db->link, 'SELECT '.$getLang.', name_'.$getLang.' FROM about WHERE id="1"'); while($row1 = @mysqli_fetch_array( $result1 )) { $about .= '

    '.$this->utf82(stripslashes($row1['name_'.$getLang])).'

    '.$this->utf82(stripslashes(nl2br($row1[$getLang]))).'

    '; } $about .= '
    '; $result2 = @mysqli_query($this->db->link, 'SELECT '.$getLang.', name_'.$getLang.' FROM about WHERE id="2"'); while($row2 = @mysqli_fetch_array( $result2 )) { $about .= '

    '.$this->utf82(stripslashes($row2['name_'.$getLang])).'

    '.$this->utf82(stripslashes(nl2br($row2[$getLang]))).'

    '; } $about .= '
    '; $result3 = @mysqli_query($this->db->link, 'SELECT foto, title_'.$getLang.', name_'.$getLang.', mob, tel, email FROM about WHERE id="3"'); while($row3 = @mysqli_fetch_array( $result3 )) { $about .= '

    '.$this->utf82(stripslashes($row3['name_'.$getLang])).'


      '.$this->utf82(stripslashes(nl2br($row3['title_'.$getLang]))).'

      '; } $result4 = @mysqli_query($this->db->link, 'SELECT foto, title_'.$getLang.', mob, tel, email FROM about WHERE id="4"'); while($row4 = @mysqli_fetch_array( $result4 )) { $about .= '

      '.$this->utf82(stripslashes(nl2br($row4['title_'.$getLang]))).'

      '; } $about .= '
    '; return $about; } //End about //Begin Text function text($sectionid, $getLang) { $result = @mysqli_query($this->db->link, 'SELECT '.$getLang.' FROM text WHERE info_id="'.$this->parent($sectionid, 2).'"'); $about =''; while($row = @mysqli_fetch_array( $result )) { $about .='

    '.$this->utf82(stripslashes($row[$getLang])).'
    '; } $about .=''; return $about; } //End Text //Begin Text function text2($sectionid, $getLang) { foreach($_GET as $key => $value){ if($key == 'lang') $paramString2 .= $key.'='.$value.'&'; } if(($this->lang2($_GET['sectionid']!='')) AND ((int)$_GET['id']!='')) { $result = @mysqli_query($this->db->link, 'SELECT '.$getLang.', '.$getLang.'2 FROM text2 WHERE id="'.(int)$_GET['id'].'" LIMIT 1'); while($row = @mysqli_fetch_array( $result )) { $about .= '

    '.$this->utf82(stripslashes($row[$getLang])).'


    '.$this->utf82(stripslashes($row[$getLang.'2'])).'
    '; } }else{ $result = @mysqli_query($this->db->link, 'SELECT id, '.$getLang.', '.$getLang.'1, '.$getLang.'2 FROM text2 WHERE info_id="'.$sectionid.'"'); $about .='
    '; while($row = @mysqli_fetch_array( $result )) { $about .= '

    '.$this->utf82(stripslashes($row[$getLang])).'

    '.$this->utf82(nl2br(stripslashes($row[$getLang.'1']))).'

    '.GetFromLang('default', 'news', 'next').'
    '; } $about .='
    '; } $about .='
    '; return $about; } //End Text function fereach_cat($id, $getLang, $type){ $result = @mysqli_query($this->db->link, "SELECT category FROM vb_post WHERE id='".$id."'"); $row = @mysqli_fetch_array( $result ); $id_cat = implode(",", array($row['category'])); $sql_menu2 = @mysqli_query($this->db->link, "SELECT ".$getLang.", info_id, id FROM menu WHERE info_id IN (".$id_cat.") ORDER BY RAND() LIMIT 1"); while($row_menu2 = @mysqli_fetch_array($sql_menu2)){ if ($type == '2'){ $About .= $row_menu2['info_id']; }elseif($type == '3'){ $About .= $row_menu2['id']; }elseif($type == '4'){ $About .= $row_menu2[$getLang]; } } return $About; } function fereach_cat2($id, $getLang, $type){ $sql_menu2 = @mysqli_query($this->db->link, "SELECT info_id, id, parentid FROM menu WHERE id = '$id' LIMIT 1"); while($row_menu2 = @mysqli_fetch_array($sql_menu2)){ if ($type == '2'){ $About .= $row_menu2['info_id']; }elseif($type == '3'){ $About .= $row_menu2['id']; }elseif($type == '4'){ $About .= $row_menu2['parentid']; } } return $About; } function fereach_cat3($id, $getLang, $type){ $sql_menu2 = @mysqli_query($this->db->link, "SELECT info_id, id, parentid FROM menu WHERE parentid = '$id'"); $res_say= @mysqli_num_rows($sql_menu2); while($row_menu2 = @mysqli_fetch_array($sql_menu2)){ $sayi++; if ($type == '2'){ if($res_say<=1){ $About .= 'category REGEXP "[[:<:]]('.$row_menu2['info_id'].')[[:>:]]" '; }else{ if($sayi==$res_say){ $About .= 'category REGEXP "[[:<:]]('.$row_menu2['info_id'].')[[:>:]]" '; }else{ $About .= 'category REGEXP "[[:<:]]('.$row_menu2['info_id'].')[[:>:]]" OR '; } } }elseif($type == '3'){ $About .= $row_menu2['id']; } } return $About; } function fereach_autor($id, $getLang){ foreach($_GET as $key => $value){ if($key == 'lang') $paramString2 .= $key.'='.$value.'&'; } $result = @mysqli_query($this->db->link, "SELECT autor FROM vb_post WHERE id='".$id."'"); $row = @mysqli_fetch_array( $result ); $id_autor = implode(",", array($row['autor'])); $sql_menu2 = @mysqli_query($this->db->link, "SELECT id, name_".$getLang.", icon, blog FROM vb_autor WHERE id IN ($id_autor)"); while($row_menu2 = @mysqli_fetch_array($sql_menu2)){ //$About .= ' '.$row_menu2['name_'.$getLang].''; $About .= ' '.$row_menu2['name_'.$getLang].''; } return $About; } //Begin banner_center function banner_center($center, $getLang) { foreach($_GET as $key => $value){ if($key == 'lang') $paramString2 .= $key.'='.$value.'&'; } $res = @mysqli_query($this->db->link, 'SELECT id, file_'.$getLang.', url, width, height, file_'.$getLang.'_2, end_time, insert_time FROM banner WHERE where_b="center'.$center.'" AND akdiv="yes" ORDER BY get_id DESC'); $res_say= @mysqli_num_rows($res); while($ret = @mysqli_fetch_array($res)) { $file_foto = $ret['file_'.$getLang]; $file_2 = $ret['file_'.$getLang.'_2']; $about .=' '; if($file_2=='jpg' || $file_2=='gif' || $file_2=='jpeg' || $file_2=='png' || $file_2=='bmp' || $file_2=='JPG' || $file_2=='GIF' || $file_2=='JPEG' || $file_2=='PNG' || $file_2=='BMP'){ $about .=''; }elseif($file_2=='swf' || $file_2=='SWF'){ $about .=' '; } $about .=' '; $end_time=$ret['end_time']; $insert_time=$ret['insert_time']; $time_now = time(); $insert_t = ($time_now - $insert_time); $insert_2 = ($end_time - $insert_t); $bitme_vaxtdi = ceil($insert_2/60); if($bitme_vaxtdi<0){ @mysqli_query($this->db->link, "UPDATE banner SET akdiv='no' WHERE id=".$ret['id']."");} } return $about; } //End banner_center //Begin son_xeberler function son_xeberler($getLang) { foreach($_GET as $key => $value){ if($key == 'lang') $paramString2 .= $key.'='.$value.'&'; } $result_news3 = @mysqli_query($this->db->link, 'SELECT id, bashliq_'.$getLang.', '.$getLang.'_text_min, tarix_y, tarix_j, tarix_m, saat, foto, category, time FROM vb_post WHERE aktive="yes" AND type_id="news" AND bashliq_'.$getLang.' != "" ORDER BY tarix_y desc, tarix_m desc, tarix_j desc, saat desc LIMIT 10'); while($row_news3 = @mysqli_fetch_array($result_news3)) { $bashliq_az22_row_news3=str_replace('"', '"', stripslashes($row_news3['bashliq_'.$getLang.''])); $bashliq_az23_row_news3 = explode("||--||", $bashliq_az22_row_news3); $bashliq_az1_row_news3 = $bashliq_az23_row_news3[0]; $bashliq_az2_row_news3 = $bashliq_az23_row_news3[1]; $sayi_news3++; $about .='
    '.$row_news3['tarix_y'].'.'.$this->data_str($row_news3['tarix_m'] ,$getLang).'.'.$row_news3['tarix_j'].'

    '; $about .= mb_substr(stripslashes($this->utf82(stripslashes(str_replace('"', ' ', $bashliq_az1_row_news3.' '.$bashliq_az2_row_news3.'')))),0,90,'UTF-8'); $about .='

    '; } return $about; } //End son_xeberler //Begin foto_index function foto_index($sectionid, $getLang) { foreach($_GET as $key => $value){ if($key == 'lang') $paramString2 .= $key.'='.$value.'&'; } foreach($_GET as $key => $value){ if($key != 'lang') $paramString .= '&'.$key.'='.$value; } if(($this->lang2($_GET['sectionid'])!='') AND ($this->lang2($_GET['sectionid'])!='news')){ $cat = "category REGEXP '[[:<:]](".$this->fereach_cat2($sectionid, $getLang, 2) .")[[:>:]]' AND "; }elseif(($this->lang2($_GET['sectionid'])=='news') AND ((int)$_GET['id']!='')){ $cat = "category REGEXP '[[:<:]](".$this->fereach_cat($sectionid, $getLang, 2).")[[:>:]]' AND "; }elseif($this->lang2($_GET['sectionid'])=='news'){ $cat = " "; } $about .='
      '; $result2 = @mysqli_query($this->db->link, 'SELECT id, bashliq_'.$getLang.', foto, baxilib FROM vb_post WHERE type_id="news" AND bashliq_'.$getLang.' != "" AND '.$cat.'aktive="yes" ORDER BY tarix_y desc, tarix_m desc, tarix_j desc, saat desc LIMIT 7'); while($row2 = @mysqli_fetch_array( $result2 )) { $bashliq_az22_row2=str_replace('"', '"', stripslashes($row2['bashliq_'.$getLang.''])); $bashliq_az23_row2 = explode("||--||", $bashliq_az22_row2); $bashliq_az1_row2 = $bashliq_az23_row2[0]; $bashliq_az2_row2 = $bashliq_az23_row2[1]; $id2 = $row2['id']; $about .='
    • '.$this->utf82(stripslashes(str_replace(''.$bashliq_az2_row2.''))).'" />
    • '; } $about .='
      '; $result = @mysqli_query($this->db->link, 'SELECT id, bashliq_'.$getLang.', foto, baxilib FROM vb_post WHERE type_id="news" AND bashliq_'.$getLang.' != "" AND '.$cat.'aktive="yes" ORDER BY tarix_y desc, tarix_m desc, tarix_j desc, saat desc LIMIT 7'); while($row = @mysqli_fetch_array( $result )) { $bashliq_az22_row=str_replace('"', '"', stripslashes($row['bashliq_'.$getLang.''])); $bashliq_az23_row = explode("||--||", $bashliq_az22_row); $bashliq_az1_row = $bashliq_az23_row[0]; $bashliq_az2_row = $bashliq_az23_row[1]; $about .='
    • '.$this->utf82(stripslashes(str_replace(''.$bashliq_az2_row.''))).'" />
    • '; } $about .='
    '; return $about; } //End foto_index //Begin merkez function merkez($getLang) { foreach($_GET as $key => $value){ if($key == 'lang') $paramString2 .= $key.'='.$value.'&'; } $about .='
    '; $result3 = @mysqli_query($this->db->link, 'SELECT id, '.$getLang.'_text_min, bashliq_'.$getLang.', foto, tarix_j, tarix_m, tarix_y, saat FROM vb_post WHERE type_id="news" AND merkez="1" AND aktive="yes" AND bashliq_'.$getLang.' != "" ORDER BY tarix_y desc, tarix_m desc, tarix_j desc, saat desc limit 30'); while($row3 = @mysqli_fetch_array($result3)) { $bashliq_az22_row3=str_replace('"', '"', stripslashes($row3['bashliq_'.$getLang.''])); $bashliq_az23_row3 = explode("||--||", $bashliq_az22_row3); $bashliq_az1_row3 = $bashliq_az23_row3[0]; $bashliq_az2_row3 = $bashliq_az23_row3[1]; $sayi++; $about .='
    '.$row3['tarix_j'].' '.$this->data_str($row3['tarix_m'] ,$getLang).' '.$row3['tarix_y'].'
    '; $about .= mb_substr($this->utf82(stripslashes($this->utf82(stripslashes(str_replace('"', ' ', $bashliq_az1_row3.' '.$bashliq_az2_row3.''))))),0,200,'UTF-8'); $about .='
    '; } return $about; } //End merkez //Begin fotogaleri function fotogaleri($sectionid, $getLang) { foreach($_GET as $key => $value){ if($key == 'lang') $paramString2 .= $key.'='.$value.'&'; } $about .='
      '; $result3 = @mysqli_query($this->db->link, 'SELECT id, '.$getLang.'_text_min, bashliq_'.$getLang.', foto FROM vb_post WHERE category REGEXP "[[:<:]]('.$this->fereach_cat2($sectionid, $getLang, 2) .')[[:>:]]" AND bashliq_'.$getLang.' != "" AND aktive="yes" ORDER BY tarix_y desc, tarix_m desc, tarix_j desc, saat desc LIMIT 12'); while($row3 = @mysqli_fetch_array($result3)) { $bashliq_az22=str_replace('"', '"', stripslashes($row3['bashliq_'.$getLang])); $bashliq_az23 = explode("||--||", $bashliq_az22); $bashliq_az1 = $bashliq_az23[0]; $bashliq_az2 = $bashliq_az23[1]; $about .='
    • '.stripslashes($this->utf82($bashliq_az1).' '.$this->utf82($bashliq_az2).'').'
    • '; } $about .='
    '; return $about; } //End fotogaleri //Begin videogaleri function videogaleri($sectionid, $getLang) { foreach($_GET as $key => $value){ if($key == 'lang') $paramString2 .= $key.'='.$value.'&'; } $about .='
      '; $result3 = @mysqli_query($this->db->link, 'SELECT id, '.$getLang.'_text_min, bashliq_'.$getLang.', foto FROM vb_post WHERE category REGEXP "[[:<:]]('.$this->fereach_cat2($sectionid, $getLang, 2) .')[[:>:]]" AND bashliq_'.$getLang.' != "" AND aktive="yes" ORDER BY tarix_y desc, tarix_m desc, tarix_j desc, saat desc LIMIT 12'); while($row3 = @mysqli_fetch_array($result3)) { $bashliq_az22=str_replace('"', '"', stripslashes($row3['bashliq_'.$getLang])); $bashliq_az23 = explode("||--||", $bashliq_az22); $bashliq_az1 = $bashliq_az23[0]; $bashliq_az2 = $bashliq_az23[1]; $about .='
    • '.stripslashes($this->utf82($bashliq_az1).' '.$this->utf82($bashliq_az2).'').'
    • '; } $about .='
    '; return $about; } //End videogaleri //Begin video function video($sectionid, $getLang) { $infoArray = $this->pager->InfoArray(); foreach($_GET as $key => $value){ if($key == 'lang') $paramString2 .= $key.'='.$this->lang($value).'&'; } $about .='
    '; if($this->lang2((int)$_GET['id'])!='0'){ $result8 = @mysqli_query($this->db->link, 'SELECT id, bashliq_'.$getLang.' FROM vb_video2 WHERE id="'.$this->lang2((int)$_GET['id']).'" ORDER BY id desc LIMIT 1'); $row8 = @mysqli_fetch_array($result8); $about .='

    '.stripslashes($row8['title_'.$getLang]).'

    '; $result = @mysqli_query($this->db->link, 'SELECT id, youtube, title_'.$getLang.' FROM vb_video3 WHERE youtube!="" AND video_id="'.$this->lang2((int)$_GET['id']).'" ORDER BY id desc'); while($row = @mysqli_fetch_array( $result )) { $url=stripslashes($row['youtube']); $pieces = explode("width=\"", $url); $pieces2 = explode("\"", $pieces[1]); $pieces3 = explode("height=\"", $url); $pieces4 = explode("\"", $pieces3[1]); $url2 = str_replace('width="'.$pieces2[0].'"', 'width="560"', $url); $url3 = str_replace('height="'.$pieces4[0].'"', 'height="315"', $url2); $about .='
    '.$url3.'

    '.stripslashes($row['title_'.$getLang]).'
    '; } $about .='
    '; }else{ $about .='

    '.$this->bolme($this->parent($sectionid, 2), $getLang).'

    '; $result_count = @mysqli_query($this->db->link, 'SELECT id, foto, bashliq_'.$getLang.' FROM vb_video2 WHERE bashliq_'.$getLang.'!="" ORDER BY id desc'); $result = @mysqli_query($this->db->link, 'SELECT id, foto, bashliq_'.$getLang.' FROM vb_video2 WHERE bashliq_'.$getLang.'!="" ORDER BY id desc LIMIT '.$infoArray['MYSQL_LIMIT1'].', '.$infoArray['MYSQL_LIMIT2']); $say= @mysqli_num_rows($result_count); while($row = @mysqli_fetch_array( $result )) { $id = $row['id']; $about .='

    '.stripslashes($row['bashliq_'.$getLang]).'

    '; } $about .='
    '; $about .='
      '; $this->pager -> TotalResults = $say; $about .= $this->pager -> GetCustomPaging(''); $about .='
    '; } $about .='
    '; return $about; } //End video //Begin foto function foto($sectionid, $getLang) { $infoArray = $this->pager->InfoArray(); foreach($_GET as $key => $value){ if($key == 'lang') $paramString2 .= $key.'='.$this->lang($value).'&'; } $about .='
    '; if($this->lang2((int)$_GET['id'])!='0'){ $result8 = @mysqli_query($this->db->link, 'SELECT id, bashliq_'.$getLang.' FROM text_min_text_full WHERE id="'.$this->lang2((int)$_GET['id']).'" ORDER BY id desc LIMIT 1'); $row8 = @mysqli_fetch_array($result8); $about .='

    '.stripslashes($row8['bashliq_'.$getLang]).'

    '; $result = @mysqli_query($this->db->link, 'SELECT id, foto FROM foto WHERE foto!="" AND info_id="'.$this->lang2((int)$_GET['id']).'" ORDER BY id desc'); while($row = @mysqli_fetch_array( $result )) { $about .=' '; } $about .='
    '; }else{ $about .='

    '.$this->bolme($this->parent($sectionid, 2), $getLang).'

    '; $result_count = @mysqli_query($this->db->link, 'SELECT id, foto, bashliq_'.$getLang.' FROM text_min_text_full WHERE bashliq_'.$getLang.'!="" ORDER BY id desc'); $result = @mysqli_query($this->db->link, 'SELECT id, foto, bashliq_'.$getLang.' FROM text_min_text_full WHERE bashliq_'.$getLang.'!="" ORDER BY id desc LIMIT '.$infoArray['MYSQL_LIMIT1'].', '.$infoArray['MYSQL_LIMIT2']); $say= @mysqli_num_rows($result_count); while($row = @mysqli_fetch_array( $result )) { $id = $row['id']; $about .='

    '.stripslashes($row['bashliq_'.$getLang]).'

    '; } $about .='
    '; $about .='
      '; $this->pager -> TotalResults = $say; $about .= $this->pager -> GetCustomPaging(''); $about .='
    '; } $about .='
    '; return $about; } //End foto //Begin video_index function video_index($getLang) { $about ='
    '.GetFromLang('default', 'video', 'video').'
    '; foreach($_GET as $key => $value){ if($key == 'lang') $paramString2 .= $key.'='.$this->lang($value).'&'; } $result1 = @mysqli_query($this->db->link, 'SELECT id, youtube, cat, title_'.$getLang.', text_'.$getLang.' FROM vb_video2 WHERE youtube!="" ORDER BY id desc LIMIT 3'); while($row1 = @mysqli_fetch_array( $result1 )) { $url1=stripslashes($row1['youtube']); $pieces1 = explode("width=\"", $url1); $pieces12 = explode("\"", $pieces1[1]); $pieces13 = explode("height=\"", $url1); $pieces14 = explode("\"", $pieces13[1]); $url12 = str_replace('width="'.$pieces12[0].'"', 'width="500"', $url1); $url13 = str_replace('height="'.$pieces14[0].'"', 'height="295"', $url12); $about .=' '.$url13.'
    '.stripslashes($row1['title_'.$getLang]).' '; } $about .=' '.GetFromLang('default', 'video', 'video2').' >>> '; return $about; } //End video_index //Begin axtar_index function axtar_index($getLang) { if(($this->db->deyish($_POST['ss'])!='') or ($this->db->deyish($_GET['text'])!='')){ if($this->db->deyish($_GET['text'])!=''){ $ss = substr($this->db->deyish($_GET['text']), 0, 64); }else{ $ss = substr($this->db->deyish($_POST['ss']), 0, 64); } $ss = preg_replace("/[^\w\x7F-\xFF\s]/", " ", $ss); $ss = trim(preg_replace("/\s(\S{1,2})\s/", " ", @preg_replace("/ +/", " "," $ss "))); $ss = $this->db->deyish($ss); $SS = $ss; }else{ $SS = ''; } $about ='
    ZƏNG EDİN BİZƏ YAZIN
    '; return $about; } //End axtar_index //Begin map function map($getLang){ $parentid = 0; $mainMenu .= '
    '; $result = @mysqli_query($this->db->link, 'SELECT parentid, link, '.$getLang.', txt_type, id FROM menu WHERE parentid='.$parentid.' OR yer="1" AND yer="2" ORDER BY parentid, position'); while($row = @mysqli_fetch_array($result)){ $sayi++; $link = $this->utf82($row['link']); $name = stripslashes($row[$getLang]); $txt_type = $row['txt_type']; $id = $row['id']; $result2 = @mysqli_query($this->db->link, 'SELECT * FROM menu WHERE parentid='.$id.' ORDER BY parentid, position'); $mainMenu .= '

    '.$this->utf82(stripslashes($row[$getLang])).'

    '; if(@mysqli_num_rows($result2) > 0){ $mainMenu .= '
      '; } while($row2 = @mysqli_fetch_array($result2)){ $id2 = $row2['id']; $link2 = $this->utf82($row2['link']); $name2 = stripslashes($row2[$getLang]); $txt_type2 = $row2['txt_type']; $result_under = @mysqli_query($this->db->link, 'SELECT * FROM menu WHERE parentid='.$id2.' ORDER BY parentid, position'); $num_under = @mysqli_num_rows($result_under); if($num_under != '0'){ $mainMenu .= '
    • '.$this->utf82(str_replace(' ', ' ', $name2)).''; $result3 = @mysqli_query($this->db->link, 'SELECT * FROM menu WHERE parentid='.$id2.' ORDER BY parentid, position'); if(@mysqli_num_rows($result3) > 0){ $mainMenu .= ''; } $mainMenu .= '
    • '; } if(@mysqli_num_rows($result2) > 0){ $mainMenu .= '
    '; } $mainMenu .= '
    '; } $mainMenu .= '
    '; return $mainMenu; } //End map } ?> otl = strlen( TPL_TAG_OPEN ); $this -> ctl = strlen( TPL_TAG_CLOSE ); $ctl = strlen( TPL_TAG_CLOSE ); $this -> dir = $dir.'/'; $this -> cache_dir = $cache_dir.'/'; } public function v( $name , $value ) { if( $value === NULL ) $value = false; $this -> v[ $name ] = $value; } public function bind_var( $name , $value ) { $this -> v( $name , $value ); } public function bind_param( $name , $value ) { $this -> v( $name , $value ); } public function arr_p( $data , $prefix ) { foreach( $data as $name => $value ) $this -> v( $prefix.$name , $value ); } public function bind_array_prefix( $data , $prefix ) { $this -> arr_p( $data , $prefix ); } public function arr( $data ) { foreach( $data as $name => $value ) $this -> v( $name , $value ); } public function bind_array( $data ) { $this -> arr( $data ); } public function l( $name , $data ) { $this -> l[ $name ] = $data; } public function loop( $name , $data ) { $this -> l( $name , $data ); } public function bind_loop( $name , $data ) { $this -> l( $name , $data ); } public function re_cache() { $this -> re_cache = true; } public function load( $name ) { $this -> load_all++; $this -> load[ $this -> load_all ] = $name; return( true ); } public function clear() { $this -> load_all = 0; $this -> load = NULL; return( true ); } private function load_data() { $all = $this -> load_all; $load = $this -> load; $dir = $this -> dir; $cache_dir = $this -> cache_dir; $data = NULL; $cache_name = NULL; if( $all >= 1 ) $cache_name = $load[1]; for( $i=2; $i<=$all ; $i++ ) { $cache_name .= '_'.$load[$i]; } $this -> cache_name = $cache_name; if( file_exists( $cache_dir.$cache_name.TPL_CACHE_FILE_TYPE ) ) { if( !$this->re_cache ) { $data = file_get_contents( $cache_dir.$cache_name.TPL_CACHE_FILE_TYPE ); $this -> cache_mode = true; return( $data ); }else{ unlink( $cache_dir.$cache_name.TPL_CACHE_FILE_TYPE ); } } for( $i=1; $i<=$all ; $i++ ) { $data .= file_get_contents( $dir.$load[$i].TPL_FILE_TYPE ); $this -> cache_mode = false; } return( $data ); } private function write_cache( $data ) { $all = $this -> load_all; $load = $this -> load; $cache_dir = $this -> cache_dir; $cache_name = $this -> cache_name; if( file_put_contents( $cache_dir.$cache_name.TPL_CACHE_FILE_TYPE , $data ) ) return( true ); else return( false ); } private function bind_all_vars() { global $tpl_var , $tpl_loop_var , $tpl_loop_size; $l = $this -> l; $tpl_var = $this -> v; foreach( $l as $loop_name => $loop_value ) { $tpl_loop_size[$loop_name] = count( $loop_value ); $all = $tpl_loop_size[$loop_name]; if( $loop_value[0] ) { $i = 0; $all--; } for( ; $i<=$all ; $i++ ) { foreach( $l[$loop_name][$i] as $var_name => $var_value ) { $tpl_loop_var[$loop_name][$i][$var_name] = $var_value; } } } } private function del_php( $data ) { $s_pos = 0; while( is_int( $s_pos = strpos( $data , '<'.'?' , $s_pos ) ) ) { if( is_int( $e_pos = strpos( $data , '?'.'>' , $s_pos + 2 ) ) ) { $length = $e_pos - $s_pos; $data = substr_replace( $data , '' , $s_pos , $length + 2 ); }else{ $data = substr_replace( $data , '' , $s_pos , 2 ); } } return( $data ); } private function load_data_inside( $data ) { $otl = $this -> otl; $ctl = $this -> ctl; $dir = $this -> dir; while( is_int( $s_pos = strpos( $data , TPL_TAG_OPEN.'load ' , 0 ) ) ) { $s_pos += 5+$otl; if( is_int( $e_pos = strpos( $data , TPL_TAG_CLOSE , $s_pos ) ) ) { $length = $e_pos - $s_pos; $name = substr( $data , $s_pos , $length ); if( $length = strlen( $name ) > 0 ) { $new_data = file_get_contents( $dir.$name.TPL_FILE_TYPE ); $new_data = $this -> load_data_inside( $new_data ); $data = str_replace( TPL_TAG_OPEN.'load '.$name.TPL_TAG_CLOSE , $new_data , $data ); } else { $data = substr_replace( $data , '' , ( $s_pos - 5 - $otl ) , 5 + $otl + $ctl ); } } else { $data = substr_replace( $data , '' , ( $s_pos - 5 - $otl ) , 5+$otl ); } } return( $data ); } private function save_loop_var( $loop_name , $v ) { $this -> save_var[ $loop_name ] = $this -> v; } private function set_loop_var( $loop_name , $i , $v ) { $loop_data = $this -> l[ $loop_name ]; if( $loop_data[0] ) $i--; foreach( $loop_data[$i] as $var_name => $var_value ) { $v[$var_name] = $var_value; } return( $v ); } private function unset_loop_var( $loop_name ) { return( $this -> save_var[ $loop_name ] ); } private function tag2loop( $loop_name ) { $this -> loop_list_all++; $this -> loop_list[ $this->loop_list_all ] = $loop_name; return( '$this->save_loop_var(\''.$loop_name.'\',$tpl_var);for( $tpl_loop_'.$loop_name.'=1 ; $tpl_loop_'.$loop_name.'<=$tpl_loop_size[\''.$loop_name.'\'] ; $tpl_loop_'.$loop_name.'++ ){$tpl_var=$this->set_loop_var(\''.$loop_name.'\',$tpl_loop_'.$loop_name.',$tpl_var);' ); } private function tag2var( $data ) { if( $data === '0' ) return( '0' ); if( $data == 'true' ) return( 'true' ); if( $data == 'false' ) return( 'false' ); if( is_null( $data ) ) return( 'NULL' ); if( is_numeric( $data ) ) return( $data ); return( '$tpl_var[\''.$data.'\']' ); } private function tag2exp( $data ) { if( substr( $data , 0 , 1 ) == '\'' && substr( $data , -1 ) == '\'' ) return( $data ); if( $data=='(' || $data==')' || $data=='!' || $data=='==' || $data=='!=' || $data=='>=' || $data=='<=' || $data=='>' || $data=='<' || $data=='||' || $data=='&&' || $data=='===' ) return( $data ); else return( false ); } private function parce_tag( $data ) { $to = '<'.'?'; $tc = '?'.'>'; $data = trim( $data ); $data = str_replace( array( '||' , '&&' , '"' , '{' , '}' , ';' , '$' , '(' , ')' , '!' , '=' , '>' , '<' ) , array( ' || ' , ' && ' , '' , '' , '' , '' , '' , ' ( ' , ' ) ' , ' ! ' , ' = ' , ' > ' , ' < ' ) , $data ); while( strstr( $data , ' ' ) ) $data = str_replace( ' ' , ' ' , $data ); $data = str_replace( array( '= = =' , '= =' , '! =' , '< =' , '> =' ) , array( '===' , '==' , '!=' , '<=' , '>=' ) , $data ); $done = false; $first_case = false; if( strstr( trim( $data ) , ' ' ) ) { $data = explode( ' ' , $data ); $all = count( $data ); if( $all < 2 ) $data = $data[0]; else { switch( strtolower( $data[0] ) ) { case 'if' : $r_data = NULL; for( $i=1 ; $i<$all ; $i++ ) { if( $this->tag2exp($data[$i]) ) { $r_data .= ' '.$data[$i]; }else{ $data[$i] = $this->tag2var( $data[$i] ); if( $data[$i] || $data[$i] === '0' ) { $r_data .= $data[$i]; }else{ if( trim( $data[$i] ) != '' ) $r_data .= '$tpl_var[\''.$data[$i].'\']'; } } } if( $r_data ) { $data = $to.'if('.$r_data.' ){'.$tc; $done = true; } break; case 'loop' : $r_data = NULL; if( $r_data = $this->tag2loop( $data[1] ) ) { $data = $to.$r_data.$tc; $done = true; } break; case 'switch' : $r_data = NULL; if( substr( $data[1] , 0 , 1 ) == '\'' && substr( $data[1] , -1 ) == '\'' ) { $data = $to.'switch('.$data[1].'){'; $done = true; }else{ if( $r_data = $this->tag2var( $data[1] ) ) { $data = $to.'switch('.$r_data.'){'; $done = true; } } break; case 'case' : $r_data = NULL; if( substr( $data[1] , 0 , 1 ) == '\'' && substr( $data[1] , -1 ) == '\'' ) { $data = 'case '.$data[1].' :'.$tc; $done = true; }else{ if( $r_data = $this->tag2var( $data[1] ) ) { $data = 'case '.$r_data.' :'.$tc; $done = true; } } break; default : $data = $data[0]; break; } } } if( !$done ) { switch( strtolower( $data ) ) { case '/' : $data = $to.'}'.$tc; break; case 'else' : $data = $to.'}else{'.$tc; break; case '/if' : $data = $to.'}'.$tc; break; case '/loop' : $last_loop_name = $this -> loop_list[ $this->loop_list_all ]; $this -> loop_list_all--; $data = $to.'}$tpl_var=$this->unset_loop_var(\''.$last_loop_name.'\');'.$tc; break; case '/switch' : $data = '}'.$tc; break; case '/case' : $data = $to.'break;'; break; case 'default' : $data = 'default :'.$tc; break; case '/default' : $data = $to.'break;'; break; default : $data = $this -> tag2var( $data ); if( $data ) $data = $to.'echo '.$data.';'.$tc; break; } } return( $data ); } private function parce_all_tags( $data ) { $otl = $this -> otl; $ctl = $this -> ctl; $s_pos = -$otl; while( $p = is_int( $s_pos = strpos( $data , TPL_TAG_OPEN , $s_pos+$otl ) ) ) { $pre = substr( $data , $s_pos-1 , 1 ); $pos = substr( $data , $s_pos+$otl , 1 ); if( $pos != ' ' && $pos != '\'' && $pos != '"' && $pos != '$' && $pre != '\\' ) { if( $s = is_int( $e_pos = strpos( $data , TPL_TAG_CLOSE , $s_pos+$otl ) ) ) { $length = $e_pos - $s_pos - $otl; $tag_first = substr( $data , $s_pos + $otl , $length ); $tag = $this -> parce_tag( $tag_first ); $data1 = substr( $data , 0 , $s_pos ); $data2 = substr( $data , $e_pos+1 ); $data = substr_replace( $data , $tag , $s_pos , $length + $otl + $ctl ); } }else $s_pos++; } $data = str_replace( array( '\\'.TPL_TAG_OPEN , '\\'.TPL_TAG_CLOSE ) , array( TPL_TAG_OPEN , TPL_TAG_CLOSE ) , $data ); return( $data ); } public function parse() { $data = $this -> load_data(); if( !$this -> cache_mode ) { $data = $this -> load_data_inside( $data ); $data = $this -> del_php( $data ); $data = $this -> parce_all_tags( $data ); $this -> write_cache( $data ); } $tpl_var = NULL; $tpl_loop_var = NULL; $tpl_loop_size = NULL; $l = $this -> l; $tpl_var = $this -> v; if( $l ) { foreach( $l as $loop_name => $loop_value ) { $tpl_loop_size[$loop_name] = count( $loop_value ); $all = $tpl_loop_size[$loop_name]; if( $loop_value[0] ) { $i = 0; $all--; } else $i = 1; for( ; $i<=$all ; $i++ ) { foreach( $l[$loop_name][$i] as $var_name => $var_value ) { $tpl_loop_var[$loop_name][$i][$var_name] = $var_value; } } } } include( $this->cache_dir.$this->cache_name.TPL_CACHE_FILE_TYPE ); } }### eof phparser ?>db = new DbConnector(); } //Begin head_foto function head_foto($getLang){ $result4 = @mysqli_query($this->db->link, 'SELECT id, foto, title1_'.$getLang.', title2_'.$getLang.', link FROM head_foto ORDER BY id DESC'); while($ret4 = @mysqli_fetch_array($result4)) { $sayi4++; $about .='
    '.stripslashes($ret4['title1_'.$getLang]).'
    '.stripslashes($ret4['title2_'.$getLang]).'
    '; } return $about; } //End head_foto } ?>db = new DbConnector(); } function what_clients($getLang){ $result4 = @mysqli_query($this->db->link, 'SELECT id, foto, title1_'.$getLang.', title2_'.$getLang.' FROM what_clients ORDER BY tarix_y desc, tarix_m desc, tarix_j desc, saat desc'); while($ret4 = @mysqli_fetch_array($result4)) { $sayi4++; $about .='
  • '.stripslashes($ret4['title2_'.$getLang]).'

    '.stripslashes($ret4['title1_'.$getLang]).'

  • '; } return $about; } } ?>db = new DbConnector(); $this->pager4 = new PagedResults4(); } function utf82($trashstr) { $az = array("

    ", "

    "); $trash = array("

    ", "
    "); return str_replace($az, $trash, $trashstr); } function data_str($trashstr, $getLang) { $trash = array("12", "11", "10", "9", "8", "7", "6", "5", "4", "3", "2", "1" ); $az = array("DEKABR", "NOYABR", "OKTYABR", "SENTYABR", "AVQUST", "İYUL", "İYUN", "MAY", "APREL", "MART", "FEVRAL", "YANVAR"); return str_replace($trash, $az, $trashstr); } function fereach_cat($id, $getLang, $type){ $result = @mysqli_query($this->db->link, "SELECT category FROM vb_post WHERE id='".$id."'"); $row = @mysqli_fetch_array( $result ); $id_cat = implode(",", array($row['category'])); $sql_menu2 = @mysqli_query($this->db->link, "SELECT ".$getLang.", info_id, id FROM menu WHERE info_id IN (".$id_cat.") ORDER BY RAND() LIMIT 1"); while($row_menu2 = @mysqli_fetch_array($sql_menu2)){ if ($type == '2'){ $About .= $row_menu2['info_id']; }elseif($type == '3'){ $About .= $row_menu2['id']; }elseif($type == '4'){ $About .= $row_menu2[$getLang]; } } return $About; } function fereach_cat2($id, $getLang, $type){ $sql_menu2 = @mysqli_query($this->db->link, "SELECT info_id, id, parentid FROM menu WHERE id = '$id' LIMIT 1"); while($row_menu2 = @mysqli_fetch_array($sql_menu2)){ if ($type == '2'){ $About .= $row_menu2['info_id']; }elseif($type == '3'){ $About .= $row_menu2['id']; }elseif($type == '4'){ $About .= $row_menu2['parentid']; } } return $About; } function fereach_cat3($id, $getLang, $type){ $sql_menu2 = @mysqli_query($this->db->link, "SELECT info_id, id, parentid FROM menu WHERE parentid = '$id'"); $res_say= @mysqli_num_rows($sql_menu2); while($row_menu2 = @mysqli_fetch_array($sql_menu2)){ $sayi++; if ($type == '2'){ if($res_say<=1){ $About .= 'category REGEXP "[[:<:]]('.$row_menu2['info_id'].')[[:>:]]" '; }else{ if($sayi==$res_say){ $About .= 'category REGEXP "[[:<:]]('.$row_menu2['info_id'].')[[:>:]]" '; }else{ $About .= 'category REGEXP "[[:<:]]('.$row_menu2['info_id'].')[[:>:]]" OR '; } } }elseif($type == '3'){ $About .= $row_menu2['id']; } } return $About; } //Begin news function news($sectionid, $getLang) { $result_full = @mysqli_query($this->db->link, 'SELECT id, '.$getLang.' FROM menu WHERE txt_type="news" AND id="'.$sectionid.'" ORDER BY position limit 1'); $row_full = @mysqli_fetch_array($result_full); $infoArray4 = $this->pager4->InfoArray(); if(((int)$_GET['sectionid']!='') AND ($_GET['sectionid']!='news')){ $cat = "category REGEXP '[[:<:]](".$this->fereach_cat2((int)$_GET['sectionid'], $getLang, 2) .")[[:>:]]' AND "; }elseif(($_GET['sectionid']=='news') AND ((int)$_GET['id']!='')){ $cat = "category REGEXP '[[:<:]](".$this->fereach_cat((int)$_GET['id'], $getLang, 2).")[[:>:]]' AND "; }elseif($_GET['sectionid']=='news'){ $cat = " "; } $about .= '
    '; if(($_GET['sectionid']=='news') AND ((int)$_GET['id']!='')) { $get_sect = (int)$_GET['id']; $result = @mysqli_query($this->db->link, 'SELECT id, '.$getLang.'_text_min, '.$getLang.'_text_full, bashliq_'.$getLang.', tarix_j, tarix_m, tarix_y, saat, foto, category, baxilib, time, autor FROM vb_post WHERE type_id="news" AND id="'.(int)$_GET['id'].'" AND aktive="yes"'); $row = @mysqli_fetch_array( $result ); @mysqli_query($this->db->link, "UPDATE vb_post SET baxilib=baxilib+1 WHERE type_id='news' AND aktive='yes' AND id=".(int)$_GET['id']); $bashliq_row1=str_replace('"', '"', stripslashes($row['bashliq_'.$getLang.''])); $bashliqmail = str_replace(':', '%3A', str_replace('/', '%2', str_replace(' ', '%20', stripslashes($this->utf82(str_replace('"', ' ', $bashliq_row1)))))); $bashliqmail2 = str_replace(':', '%3A', str_replace('/', '%2', str_replace(' ', '+-+', stripslashes($this->utf82(str_replace('"', ' ', $bashliq_row1)))))); $linksosial = 'http://keproclinic.az/'.$getLang.'/news/id-'.$get_sect.'/'; $about .= '
    '.$bashliq_row1.'
    '.$this->data_str($row['tarix_m'] ,$getLang).' '.$row['tarix_j'].', '.$row['tarix_y'].'
    '; //B foto $sql_foto2 = @mysqli_query($this->db->link, "SELECT id, foto, news_id FROM vb_foto WHERE news_id='".$row['id']."' ORDER BY id desc"); $say_foto2= @mysqli_num_rows($sql_foto2); if($say_foto2==0){ $about .= ' '.$bashliq_row1.''; }else{ $about .= '
    '.$bashliq_row1.''; while($row_foto2 = @mysqli_fetch_array( $sql_foto2 )) { $sayi_foto++; $about .=' '.$bashliq_row1.''; } $about .= '
    '; } //E foto $about .= '
    '.$this->utf82(stripslashes($row[$getLang.'_text_full'])).'
    '; //B video $result_video = @mysqli_query($this->db->link, "SELECT * FROM vb_video WHERE news_id=".$row['id']." ORDER BY id DESC"); while($row_video = @mysqli_fetch_array($result_video)){ $url=stripslashes($row_video['youtube']); $about .='
    '.$url.'
    '; } $about .='
    '; $about .= '
    '; $result_news_right = @mysqli_query($this->db->link, 'SELECT id, '.$getLang.'_text_min, bashliq_'.$getLang.', tarix_j, tarix_m, tarix_y, saat, foto, category, baxilib, time, autor FROM vb_post WHERE type_id="news" AND bashliq_'.$getLang.' != "" AND '.$cat.'aktive="yes" ORDER BY tarix_y desc, tarix_m desc, tarix_j desc, saat desc LIMIT 8'); while($row_news_right = @mysqli_fetch_array( $result_news_right )) { $bashliq_news_right = $this->utf82(str_replace('"', '"', stripslashes($row_news_right['bashliq_'.$getLang.'']))); $text_min_news_right = str_replace('"', '"', stripslashes($row_news_right[$getLang.'_text_min'])); $about .= '
    '.$row_news_right['tarix_j'].'
    '.$this->data_str($row_news_right['tarix_m'] ,$getLang).'
    '.$text_min_news_right.'
    '; } $about .='
    '; }else{ $about .='
    '; $result_count = @mysqli_query($this->db->link, 'SELECT id FROM vb_post WHERE type_id="news" AND bashliq_'.$getLang.' != "" AND '.$cat.'aktive="yes" ORDER BY tarix_y desc, tarix_m desc, tarix_j desc, saat desc'); $say= @mysqli_num_rows($result_count); $result = @mysqli_query($this->db->link, 'SELECT id, '.$getLang.'_text_min, bashliq_'.$getLang.', tarix_j, tarix_m, tarix_y, saat, foto, category, baxilib, time, autor FROM vb_post WHERE type_id="news" AND bashliq_'.$getLang.' != "" AND '.$cat.'aktive="yes" ORDER BY tarix_y desc, tarix_m desc, tarix_j desc, saat desc LIMIT '.$infoArray4['MYSQL_LIMIT1'].', '.$infoArray4['MYSQL_LIMIT2']); while($row = @mysqli_fetch_array( $result )) { $bashliq = $this->utf82(str_replace('"', '"', stripslashes($row['bashliq_'.$getLang.'']))); $text_min = str_replace('"', '"', stripslashes($row[$getLang.'_text_min'])); $sayi++; $about .='
    '.$row['tarix_j'].'
    '.$this->data_str($row['tarix_m'] ,$getLang).'
    '.$text_min.'
    '; } $about .='
      '; $this->pager4 -> TotalResults = $say; $about .= $this->pager4 -> GetCustomPaging($getLang, (int)$_GET['sectionid']); $about .='
    '; } $about .='
    '; return $about; } //End news //Begin news_index function news_index($getLang) { $about .= '
    '.GetFromLang('default', 'news', 'events_name').'
    '; $result = @mysqli_query($this->db->link, 'SELECT id, '.$getLang.'_text_min, bashliq_'.$getLang.', tarix_j, tarix_m, tarix_y, saat, foto, category, baxilib, time, autor FROM vb_post WHERE type_id="news" AND bashliq_'.$getLang.' != "" AND aktive="yes" AND merkez="1" ORDER BY tarix_y desc, tarix_m desc, tarix_j desc, saat desc LIMIT 4'); while($row = @mysqli_fetch_array( $result )) { $bashliq = $this->utf82(str_replace('"', '"', stripslashes($row['bashliq_'.$getLang.'']))); $text_min = str_replace('"', '"', stripslashes($row[$getLang.'_text_min'])); $about .='
    '.$row['tarix_j'].'
    '.$this->data_str($row['tarix_m'] ,$getLang).'
    '.$text_min.'
    '; } $about .='
    '; return $about; } //End news_index } ?>db = new DbConnector(); } function tim($sectionid, $getLang){ $sql_menu2 = @mysqli_query($this->db->link, "SELECT id, info_id, ".$getLang.", ".$getLang."1, parentid FROM menu WHERE txt_type='tim' AND url='".$sectionid."'"); $row_menu2 = @mysqli_fetch_array($sql_menu2); $about .='
    '; if(($this->db->deyish_url($_GET['sectionid'])!='') AND ($this->db->deyish_url((int)$_GET['id'])!='0')) { $result2 = @mysqli_query($this->db->link, 'SELECT '.$getLang.', '.$getLang.'_full, '.$getLang.'1, '.$getLang.'2, foto FROM tim WHERE aktive="yes" AND info_id="'.$row_menu2['id'].'" AND id="'.(int)$_GET['id'].'" ORDER BY tarix_y desc, tarix_m desc, tarix_j desc, saat desc LIMIT 1'); while($row2 = @mysqli_fetch_array( $result2 )) { $about .='
    '.stripslashes($row2[$getLang.'1']).'
    '.stripslashes($row2[$getLang.'2']).'
    '; if(stripslashes($row2[$getLang.'_full'])!=''){ $about .='
    '.stripslashes($row2[$getLang.'_full']).'
    '; }else{ $about .='
    '.stripslashes($row2[$getLang]).'
    '; } $about .='
    '; } }else{ $result2 = @mysqli_query($this->db->link, 'SELECT '.$getLang.', '.$getLang.'_full, '.$getLang.'1, '.$getLang.'2, foto FROM tim WHERE aktive="yes" AND info_id="'.$row_menu2['id'].'" ORDER BY tarix_y desc, tarix_m desc, tarix_j desc, saat desc LIMIT 1'); while($row2 = @mysqli_fetch_array( $result2 )) { $about .='
    KEPRO ESTHETIC & ANTIAGE CLINIC
    '.stripslashes($row2[$getLang.'1']).'
    '.stripslashes($row2[$getLang.'2']).'
    '.stripslashes($row2[$getLang]).'
    '; } } $about .='
    • '; $result = @mysqli_query($this->db->link, 'SELECT id, '.$getLang.', '.$getLang.'_full, '.$getLang.'1, '.$getLang.'2, foto FROM tim WHERE aktive="yes" AND info_id="'.$row_menu2['id'].'" ORDER BY tarix_y desc, tarix_m desc, tarix_j desc, saat desc LIMIT 1, 1000'); $res_say= @mysqli_num_rows($result); while($row = @mysqli_fetch_array( $result )) { $sayi++; $about .='
      '.stripslashes($row[$getLang.'1']).'
      '.stripslashes($row[$getLang.'2']).'
      '.stripslashes($row[$getLang]).'
      '; if($sayi%4){ }else{ if($sayi!=$res_say){ $about .='
    • '; }else{ } } } $about .='
    '; return $about; } function tim_index($getLang){ $about .='
    KEPRO ESTHETIC & ANTIAGE CLINIC
    '; $result = @mysqli_query($this->db->link, 'SELECT id, '.$getLang.', '.$getLang.'_full, '.$getLang.'1, '.$getLang.'2, foto FROM tim WHERE aktive="yes" ORDER BY tarix_y desc, tarix_m desc, tarix_j desc, saat desc LIMIT 1, 3'); while($row = @mysqli_fetch_array( $result )) { $sayi++; $about .= '
    '.stripslashes($row[$getLang.'1']).'
    '.stripslashes($row[$getLang.'2']).'
    '.stripslashes($row[$getLang]).'
    '; } return $about; } } ?>db = new DbConnector(); $this->pager3 = new PagedResults3(); } function utf82($trashstr) { $az = array("

    ", "

    "); $trash = array("

    ", "
    "); return str_replace($az, $trash, $trashstr); } //Begin axtar function axtar($getLang) { $about .= '
    '.GetFromLang('default', 'axtar', 'axtar').'
    '; $about .=''; $infoArray3 = $this->pager3->InfoArray(); foreach($_GET as $key => $value){ if($key == 'lang') $paramString2 .= $key.'='.$value.'&'; } if($this->db->deyish($_GET['sectionid'])=='axtar'){ if(($this->db->deyish($_POST['ss'])!='') or ($this->db->deyish($_GET['text'])!='')){ if($_POST['ss']==''){ $ss = substr($this->db->deyish($GET['text']), 0, 64); }else{ $ss = substr($this->db->deyish($_POST['ss']), 0, 64); } $ss = preg_replace("/[^\w\x7F-\xFF\s]/", " ", $ss); $ss = trim(preg_replace("/\s(\S{1,2})\s/", " ", @ereg_replace(" +", " "," $ss "))); $ss = @ereg_replace(" +", " ", $ss); $SS = $ss; }else{ $SS = ''; } if(($this->db->deyish($_POST['ss'])!='') or ($this->db->deyish($_GET['text'])!='')){ if($_POST['ss']==''){ $ss = substr($this->db->deyish($_GET['text']), 0, 64); }else{ $ss = substr($this->db->deyish($_POST['ss']), 0, 64); } // $ss = htmlentities($ss); $ss = preg_replace("/[^\w\x7F-\xFF\s]/", " ", $ss); $ss = trim(preg_replace("/\s(\S{1,2})\s/", " ", @ereg_replace(" +", " "," $ss "))); $ss = @ereg_replace(" +", " ", $ss); if(empty($ss)){ $about .='
    '.GetFromLang('default', 'axtar', 'text1').'
    '; }else{ $result_1_1 = @mysqli_query($this->db->link, 'SELECT '.$getLang.'_text_full, foto, bashliq_'.$getLang.', id, type_id FROM vb_post WHERE aktive="yes" AND (('.$getLang.'_text_full LIKE "%'.$ss. '%") or (bashliq_'.$getLang.' LIKE "%'. $ss. '%"))'); $result_1_2 = @mysqli_query($this->db->link, 'SELECT '.$getLang.'_text_full, foto, bashliq_'.$getLang.', id, type_id FROM vb_post WHERE aktive="yes" AND (('.$getLang.'_text_full LIKE "%'.$ss. '%") or (bashliq_'.$getLang.' LIKE "%'. $ss. '%")) ORDER BY tarix_y desc, tarix_m desc, tarix_j desc, saat desc LIMIT '.$infoArray3['MYSQL_LIMIT1'].', '.$infoArray3['MYSQL_LIMIT2']); $num_1_1 = @mysqli_num_rows($result_1_1); if ($num_1_1 == 0){ $about .='
    '.GetFromLang('default', 'axtar', 'text1').'
    '; }else{ if($num_1_1 > 0) { while($row_1_2 = @mysqli_fetch_array($result_1_2)){ $bashliq_az22q2 = str_replace('"', '"', stripslashes($row_1_2['bashliq_'.$getLang])); $bashliq_az23q2 = explode("||--||", $bashliq_az22q2); $bashliq_az1q2 = $bashliq_az23q2[0]; $bashliq_az2q2 = $bashliq_az23q2[1]; if($row_1_2['type_id']=='news'){ $type_id = 'news'; $type_name = 'news'; }else{ $sql_menu2 = $this->db->query("SELECT id, txt_type FROM menu WHERE id = '".$row_1_2['type_id']."'"); $row_menu2 = @mysqli_fetch_array($sql_menu2); $type_id = $row_menu2['id']; $type_name = $row_menu2['txt_type']; } $Text = stripslashes(nl2br($row_1_2[$getLang.'_text_full'])); $Text = strip_tags($Text); $ss_arr = explode(' ', $ss); foreach($ss_arr as $key=>$value){ $hstring = ''; $hstring .= $value; $hstring .= ''; $pos = stripos($Text, $value); if($pos > 200){ $start = $pos - 200; }else{ $start = 0; } $Text2 = '... '. substr($Text, $start, 350) .' ...'; $Text3 = str_ireplace($value, $hstring, $Text2); } $about .='
    '; if($row_1_2aa['foto']!=''){ $about .= '
    '; }else{ $about .= ''; } $about .= '
    '.$Text3.'
    '; }}} if($this->db->deyish($_GET['text'])!=''){ $ss_get=''.str_replace(' ', '+', str_replace(' ', ' ', $this->db->deyish($_GET['text']))).''; }else{ $ss_get=''.str_replace(' ', '+', str_replace(' ', ' ', $this->db->deyish($_POST['ss']))).''; } $about .=' '; }}} $about .= '
      '; $this->pager3 -> TotalResults = $num_1_1; $about .= $this->pager3 -> GetCustomPaging($getLang, 'axtar', $ss_get); $about .='
    '; return $about; } //End axtar } ?>