public function select_option($c)
 {
     $url_controll = new url_controll();
     $lang = $url_controll->url("segment", 1);
     $query = $this->select_languages($c);
     $out = '<select name="one" class="dropdown-select">';
     foreach ($query as $rows) {
         if ($lang == $rows['langs']) {
             $selected = 'selected="selected"';
         } else {
             $selected = '';
         }
         $out .= '<option value="' . $rows['langs'] . '" ' . $selected . '>' . $rows['text'] . '</option>';
     }
     $out .= '</select>';
     return $out;
 }
예제 #2
0
    public function get_page_type($c)
    {
        $conn = $this->conn($c);
        $out = '';
        $url_controll = new url_controll();
        $slugs = $url_controll->slugs();
        //select mane pages
        $sql = 'SELECT `page_type` FROM `studio404_pages` WHERE `slug`=:slug AND `lang`=:lang AND `status`!=:status';
        $prepare = $conn->prepare($sql);
        $prepare->execute(array(":slug" => $slugs, ":lang" => LANG_ID, ":status" => 1));
        $nums = $prepare->rowCount();
        if ($nums) {
            $fetch = $prepare->fetch(PDO::FETCH_ASSOC);
            $out = $fetch["page_type"];
        } else {
            //select news
            $sql_module = 'SELECT 
			`studio404_module_attachment`.`page_type` AS module_pagetype
			FROM 
			`studio404_module_item`, `studio404_module`, `studio404_module_attachment`, `studio404_pages` 
			WHERE 
			`studio404_module_item`.`slug`=:slug AND 
			`studio404_module_item`.`lang`=:lang AND 
			`studio404_module_item`.`status`!=:status AND 
			`studio404_module_item`.`module_idx`=`studio404_module`.`idx` AND 
			`studio404_module`.`lang`=:lang AND 
			`studio404_module`.`status`!=:status AND 
			`studio404_module`.`idx`=`studio404_module_attachment`.`idx` AND 
			`studio404_module_attachment`.`lang`=:lang AND 
			`studio404_module_attachment`.`status`!=:status AND 
			`studio404_module_attachment`.`connect_idx`=`studio404_pages`.`idx` AND 
			`studio404_pages`.`lang`=:lang AND 
			`studio404_pages`.`status`!=:status
			';
            $prepare_module = $conn->prepare($sql_module);
            $prepare_module->execute(array(":slug" => $slugs, ":lang" => LANG_ID, ":status" => 1));
            $nums_module = $prepare_module->rowCount();
            if ($nums_module) {
                $fetch_module = $prepare_module->fetch(PDO::FETCH_ASSOC);
                $out = $fetch_module["module_pagetype"];
            }
        }
        return $out;
    }
예제 #3
0
 public function left($menu_array)
 {
     $get_slug_from_url = new get_slug_from_url();
     $slug = $get_slug_from_url->slug();
     $o = '';
     $obj = new url_controll();
     $third_segment = $obj->url("segment", 2) . "/" . $obj->url("segment", 3);
     if (is_array($menu_array)) {
         foreach ($menu_array as $val) {
             $active = $val->slug == $third_segment ? 'active' : '';
             if ($val->redirectlink != "false" && !empty($val->redirectlink)) {
                 $gotoUrl = $val->redirectlink;
             } else {
                 $gotoUrl = MAIN_DIR . $val->slug . "?v=" . $val->idx;
             }
             $o .= '<li class="' . $active . '"><a href="' . $gotoUrl . '">' . $val->title . '</a></li>';
         }
     }
     return $o;
 }
예제 #4
0
    public function type_page($c)
    {
        $conn = $this->conn($c);
        //get slug
        $url_controll = new url_controll();
        $slug = $url_controll->slugs();
        try {
            $sql = 'SELECT `page_type` FROM `studio404_pages` WHERE `slug`=:slug AND `status`!=:status';
            $prepare = $conn->prepare($sql);
            $prepare->execute(array(":slug" => $slug, ":status" => 1));
            $fetch = $prepare->fetch(PDO::FETCH_ASSOC);
            $out = $fetch['page_type'];
        } catch (Exception $e) {
            $out = "";
        }
        if (empty($out)) {
            $explode = explode("/", $slug);
            if (is_array($explode)) {
                switch ($explode[0]) {
                    case $c["product.view.pre.slug"]:
                        $out = "product";
                        break;
                    case $c["gallery.view.pre.slug"]:
                        $out = "galleryfolder";
                        break;
                    default:
                        try {
                            $sql = 'SELECT 
						`studio404_module_attachment`.`page_type` AS pgtype 
						FROM 
						`studio404_module_item`, `studio404_module`, `studio404_module_attachment` 
						WHERE 
						studio404_module_item.`slug`=:slug AND 
						`studio404_module_item`.`lang`=:lang AND 
						`studio404_module_item`.`visibility`!=:visibility AND 
						`studio404_module_item`.`status`!=:status AND 
						`studio404_module_item`.`module_idx`=`studio404_module`.`idx` AND 
						`studio404_module`.`lang`=:lang AND 
						`studio404_module`.`status`!=:status AND 
						`studio404_module`.`idx`=`studio404_module_attachment`.`idx` AND 
						`studio404_module_attachment`.`lang`=:lang AND 
						`studio404_module_attachment`.`status`!=:status 
						';
                            $prepare = $conn->prepare($sql);
                            $prepare->execute(array(":slug" => $slug, ":lang" => LANG_ID, ":visibility" => 1, ":status" => 1));
                            if ($slug != "" && $prepare->rowCount() <= 0) {
                                redirect::url(WEBSITE . LANG . "/page404");
                            } else {
                                $fetch = $prepare->fetch(PDO::FETCH_ASSOC);
                                $pgtype = $fetch['pgtype'];
                                if ($pgtype == "newspage") {
                                    $out = "newsinside";
                                } else {
                                    if ($pgtype == "eventpage") {
                                        $out = "eventsinside";
                                    }
                                }
                            }
                        } catch (Exception $e) {
                            redirect::url(WEBSITE . LANG . "/page404");
                        }
                        break;
                }
            } else {
                redirect::url(WEBSITE . LANG . "/page404");
            }
        }
        return $out;
    }
예제 #5
0
 public function edit($c)
 {
     if (isset($_POST["startdate"], $_POST["enddate"], $_POST["description"], $_POST["paystatus"], $_GET["id"])) {
         $conn = $this->conn($c);
         $startdate = strtotime($_POST["startdate"]);
         $enddate = strtotime($_POST["enddate"]);
         $description = $_POST["description"];
         $paystatus = $_POST["paystatus"];
         $id = $_GET["id"];
         $sql = 'UPDATE `studio404_invoices` SET `start_date`=:startdate, `end_date`=:enddate, `paystatus`=:paystatus WHERE `uid`=:id';
         $prepare = $conn->prepare($sql);
         $prepare->execute(array(":startdate" => $startdate, ":enddate" => $enddate, ":paystatus" => $paystatus, ":id" => $id));
         //description only current language
         $sql2 = 'UPDATE `studio404_invoices` SET `description`=:description WHERE `uid`=:id AND `lang`=:lang';
         $prepare2 = $conn->prepare($sql2);
         $prepare2->execute(array(":description" => $description, ":lang" => LANG_ID, ":id" => $id));
         $obj = new url_controll();
         $lg = $obj->url("segment", 1);
         $file = INVOICE . strtolower($lg) . $_GET["id"] . ".pdf";
         if (file_exists($file)) {
             @unlink($file);
         }
         $this->outMessage = 1;
     }
 }
예제 #6
0
          <form action="#" method="get" class="sidebar-form">
            <div class="input-group">
              <input type="text" name="q" class="form-control" placeholder="<?php 
echo $data["language_data"]["val3"];
?>
...">
              <span class="input-group-btn">
                <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i></button>
              </span>
            </div>
          </form>

          <!-- Sidebar Menu -->
          <?php 
$obj = new url_controll();
// url controlls
$slug_second = $obj->url("segment", 2);
$slug_third = $obj->url("segment", 2) . "/" . $obj->url("segment", 3);
?>
          <ul class="sidebar-menu">
            <!-- Optionally, you can add icons to the links -->
            <li class="<?php 
echo $slug_second == "welcome-system" ? 'active' : '';
?>
"><a href="<?php 
echo WEBSITE . LANG;
?>
/<?php 
echo $c["welcome.page.class"];
?>
예제 #7
0
파일: open.php 프로젝트: studio-404/geda
         $class_load = true;
     }
     if (!$class_load) {
         echo "Class: <b>" . $class_name . "</b> can't load..";
         exit;
     }
 }
 $actual_link = "{$_SERVER['REQUEST_URI']}";
 $findme = array('\'', '~', '!', '@', '$', '^', '*', '(', ')', '{', '}', '[', ']', '|', ';', '<', '>', '\\', '..');
 foreach ($findme as $f) {
     $pos = strpos($actual_link, $f);
     if ($pos !== false) {
         redirect::url(WEBSITE);
     }
 }
 $obj = new url_controll();
 $LANG = $obj->url("segment", 1);
 $get_ip = new get_ip();
 $ip = $get_ip->ip;
 if (empty($LANG)) {
     // just domain name
     $LANG = $c['main.language'];
 } else {
     if (!in_array($LANG, $c['languages.array']) && $LANG != "image" && $LANG != $c['admin.slug']) {
         $welcome_class = $c["welcome.page.slug"];
         $main_language = $c['main.language'];
         $redirect = new redirect();
         $redirect->go(WEBSITE . $main_language . "/" . $welcome_class);
     } else {
         if ($LANG == $c['admin.slug']) {
             $redirect = new redirect();
예제 #8
0
파일: events.php 프로젝트: studio-404/trade
		</div>
	</div>
	<div class="col-sm-9" id="content">
		<?php 
if (!empty($first[0]["title"])) {
    ?>
		<div class="page_title_3">
			<?php 
    echo $first[0]["title"];
    ?>
			<div class="icons">
				<div id="u" data-lang="<?php 
    echo LANG;
    ?>
" style="position:absolute; top:-1000px; text-indent:-9999px"><?php 
    echo url_controll::current_link();
    ?>
</div>
				<div class="share"></div>
				<div class="print"></div>
			</div>
		</div>	
		
		<div class="row" id="event_div">
			<div class="col-sm-4" id="event_image">
				<img src="<?php 
    echo WEBSITE;
    ?>
image?f=<?php 
    echo WEBSITE . $first[0]["pic"];
    ?>
예제 #9
0
파일: text.php 프로젝트: studio-404/geda
<?php 
}
echo $data["text_general"][0]["text"];
?>
<div style="clear:both"></div>
<div id="leftSideText">
<?php 
echo $data["text_general"][0]["leftside"];
?>
</div>
<div id="rightSideText" style="display:none"><?php 
echo $data["text_general"][0]["rightside"];
?>
</div>
<?php 
$obj = new url_controll();
$slugii = $obj->url("segment", 3);
if ($slugii == "mikro-da-mcire-biznesis-xelSewyoba") {
    echo georgianMap::map($data["components"]);
}
?>
</div>
<div style="clear:both"></div>
<?php 
if (count($data["text_documents"]) > 0) {
    ?>
<hr class="line_effect" />
<div class="page_title_4">
<?php 
    echo $data["language_data"]["attachedfiles"];
    ?>
예제 #10
0
    }
}
$actual_link = "{$_SERVER['REQUEST_URI']}";
$findme = array('\'', '~', '!', '@', '$', '^', '*', '(', ')', '{', '}', '|', ';', '<', '>', '\\', '..');
foreach ($findme as $f) {
    $pos = strpos($actual_link, $f);
    if ($pos !== false) {
        $redirect = new redirect();
        $redirect->go(WEBSITE);
        die;
    }
}
/*
** call main classes
*/
$obj = new url_controll();
// url controlls
/*
** important variables if more language edit this line 
*/
$LANG = $obj->url("segment", $c['site.language.slash.position']);
// if($LANG==$c['admin.slug']){
// 	redirect::url(WEBSITE.$c['main.language']."/".$c['admin.slug']);
// }
if (empty($LANG)) {
    // just domain name
    $redirect = new redirect();
    $redirect->go(WEBSITE . $c['main.language'] . "/" . $c["welcome.page.slug"]);
} else {
    if (!in_array($LANG, $c['languages.array']) && $LANG != "image" && $LANG != $c['admin.slug']) {
        $welcome_class = $c["welcome.page.slug"];
예제 #11
0
파일: header.php 프로젝트: studio-404/geda
$logo = LANG == "ge" ? 'logo2.svg' : 'logo1.svg';
?>
<img src="<?php 
echo TEMPLATE;
?>
img/<?php 
echo $logo;
?>
" alt="logo" /><!---->
</a>
</div>
<div class="col-sm-8 head_contact padding_0"  style="text-align:right;">
<div class="language">
<?php 
$actual_link = "http://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";
$obj = new url_controll();
$slug = $obj->url("segment", 2);
foreach ($data['languages'] as $val) {
    $replaced = str_replace("/" . LANG . "/", "/" . $val->langs . "/", $actual_link);
    if (!$slug) {
        $replaced = WEBSITE . $val->langs . "/home";
    }
    echo '<a href="' . $replaced . '"><img src="' . WEBSITE . $val->lang_img . '" alt="" /></a>';
}
?>
</div>	
<div id="live_chat_div">
<li id="chatstatus" style="font-family:roboto">Zopim Chat</li>
<li><span><a href="javascript:;" class="callZopim"><?php 
echo $data["language_data"]["livechatvalue"];
?>