Esempio n. 1
0
<?php

defined('_JEXEC') or die('Restricted access');
$color = get_serialize($registry['main-article'][0]['color']);
$slide = get_serialize($registry['main-article'][0]['slide']);
if ($registry['deviceType'] == 'phone') {
    ?>
 <style>
 .main-image{ 
	border:17px solid <?php 
    echo $color['frame'];
    ?>
;
} 
</style>

 <?php 
}
?>
   
<div class="main-article" style="border:3px solid <?php 
echo $color['frame'];
?>
;">
    <ul>
        <li  style="border:17px solid <?php 
echo $color['frame'];
?>
">
            <div class="main-image">
                <a href="http://<?php 
Esempio n. 2
0
        <ul>
            <?php 
    $i = 0;
    foreach ($registry['search'] as $item) {
        $i++;
        $title_length = string_length($item['title']);
        if (!empty($item['title_short'])) {
            $short_length = string_length($item['title_short']);
            $short_text = $item['title_short'];
        } else {
            $short_length = string_length($item['text_short']);
            $short_text = $item['text_short'];
        }
        $content_length = $title_length + $short_length;
        $short_length = 135 - $title_length;
        $this['slide'] = get_serialize($item['slide']);
        ?>
            <li data-last_id="<?php 
        echo $item['id'];
        ?>
">
                <a href="http://<?php 
        echo $_SERVER['SERVER_NAME'];
        ?>
/<?php 
        echo $item['cat_chpu'];
        ?>
/"><h3 style="<?php 
        if (count($this['slide']['img']) > 1) {
            ?>
background-image:url('/<?php 
Esempio n. 3
0
             $time_mm = 0;
         }
         $date = mktime($time_hh, $time_mm, 0, $date_mm, $date_dd, $date_yy);
         $type = intval($_POST['type']);
         if ($DB->execute("INSERT INTO #__tests (title,lid,img,question,answer,point,result,type,date) VALUES ('{$title}','{$lid}','{$img}','{$question}','{$answer}','{$point}','{$result}','{$type}','{$date}') ")) {
             header('location:/apanel/index.php?component=test&success=add');
         }
     }
 }
 if ($_GET['section'] == 'edit' && $_GET['edit'] > 0) {
     $value = intval($_GET['edit']);
     $registry['test'] = $DB->getAll("SELECT #__tests.* FROM #__tests WHERE #__tests.id = {$value} order by id desc");
     $registry['question'] = get_serialize($registry['test'][0]['question']);
     $registry['answer'] = get_serialize($registry['test'][0]['answer']);
     $registry['point'] = get_serialize($registry['test'][0]['point']);
     $registry['result'] = get_serialize($registry['test'][0]['result']);
     if ($registry['answer']) {
         $registry['answer_keys'] = array_keys($registry['answer']);
     }
     if ($registry['result']) {
         $registry['result_keys'] = array_keys($registry['result']);
     }
     if ($_POST) {
         $title = PHP_slashes(htmlspecialchars(strip_tags($_POST['title'])));
         $lid = PHP_slashes(htmlspecialchars(strip_tags($_POST['lid'])));
         $img = PHP_slashes(htmlspecialchars(strip_tags($_POST['img'])));
         $question = base64_encode(serialize($_POST['question']));
         $answer = base64_encode(serialize($_POST['answer']));
         $point = base64_encode(serialize($_POST['point']));
         $result = base64_encode(serialize($_POST['result']));
         $date_dd = intval($_POST['date_dd']);
Esempio n. 4
0
    ?>
         <th>წაშლა</th>
    </thead>
    <tbody>
         <?php 
    if (count($registry['tests']) > 0) {
        ?>
             <?php 
        foreach ($registry['tests'] as $item) {
            $csum = 0;
            ?>
                 <tr>
                 <?php 
            $qnum = get_serialize($item['question']);
            $qnum = count($qnum);
            $sum = get_serialize($item['point']);
            foreach ($sum as $su) {
                $csum = $csum + max($su);
            }
            ?>
                 <td align="center"><?php 
            echo $item['id'];
            ?>
</td><td><a href="/com/test/view/<?php 
            echo $item['id'];
            ?>
" target="_blank"><?php 
            echo $item['title'];
            ?>
</a></td><td><?php 
            echo $item['type'] == 1 ? "ვიქტორინა" : "ტესტი";
Esempio n. 5
0
        <div style="clear:both"></div>
    <?php 
    if (!empty($registry['post'][0]['youtube']) && $registry['post'][0]['style'] != 12) {
        ?>
        <br><br>
        <iframe id="ytplayer" type="text/html" width="100%"  src="https://www.youtube.com/embed/<?php 
        echo $registry['post'][0]['youtube'];
        ?>
?theme=light" frameborder="0" allowfullscreen></iframe>
    <?php 
    }
    ?>

    <?php 
    if (!empty($registry['post'][0]['slide'])) {
        $registry['slider'] = get_serialize($registry['post'][0]['slide']);
        ?>
        <?php 
        if (count($registry['slider']['img']) > 1) {
            ?>

            <ul class="mobile-slider gallery">
                <?php 
            $image_url = array();
            for ($i = 0; $i < count($registry['slider']['img']); $i++) {
                $image_url[$i] = str_replace('http://funtime.ge:80/', '', $registry['slider']['img'][$i]);
                ?>
                    <li>
                        <span><?php 
                echo $registry['slider']['name'][$i];
                ?>
Esempio n. 6
0
 function loadMore($args = array())
 {
     global $theme;
     $time = time();
     $last_id = intval($args['last_id']);
     $num = intval($args['num']);
     $out = '';
     $last = $this->DB->getOne("SELECT {$this->p}news.id FROM {$this->p}news WHERE {$this->p}news.moderate=1 and {$this->p}news.date <= {$time} order by {$this->p}news.date ASC");
     if ($last == $last_id) {
         echo $last_id;
     } else {
         if ($last_id > 0) {
             $registry['more_articles'] = $this->DB->getAll('SELECT osr_news.*,osr_users.realname,osr_category.name,osr_category.cat_chpu FROM osr_news
                                      LEFT JOIN osr_users ON osr_users.id = osr_news.user
                                      LEFT JOIN osr_category ON osr_category.id = osr_news.cat
                                      WHERE osr_news.moderate = 1 and osr_category.test = 0 and osr_category.section = "post" and osr_news.date <= ' . $time . ' ORDER BY osr_news.date DESC LIMIT ' . $num . ',5');
             if (count($registry['more_articles']) > 0) {
                 $out .= '<ul>';
                 foreach ($registry['more_articles'] as $item) {
                     $th['slide'] = get_serialize($item['slide']);
                     $out .= '<li class="web" data-id="' . $item['id'] . '"><div class="five-rubric">';
                     $out .= '<a href="http://' . $_SERVER['SERVER_NAME'] . '/' . $item['cat_chpu'] . '/">' . $item['name'] . '</a><br>';
                     $out .= '<div class="five-time">' . gedate('d.m.Y', $item['date']) . '</div><br><br>';
                     $out .= '<div class="fb-like" data-href="http://' . $_SERVER['SERVER_NAME'] . '/' . $item['cat_chpu'] . '/' . $item['chpu'] . '/" data-layout="button_count" data-action="like" data-show-faces="false" data-share="true"></div></div>';
                     $out .= '<div class="five-title"><a href="http://' . $_SERVER['SERVER_NAME'] . '/' . $item['cat_chpu'] . '/' . $item['chpu'] . '/">' . $item['title'] . '</a><br><br>';
                     if (strlen($item['text_short']) > 160) {
                         $out .= mb_substr(strip_tags($item['text_short']), 0, 160, "utf-8") . " ...";
                     } else {
                         $out .= strip_tags($item['text_short']);
                     }
                     $out .= '<div class="fix"></div></div>';
                     $out .= '<div class="five-image">';
                     $out .= '<a href="http://' . $_SERVER['SERVER_NAME'] . '/' . $item['cat_chpu'] . '/"><h3 style="';
                     if (count($th['slide']['img']) > 1) {
                         $out .= "background-image:url('/" . $theme . "images/main_icon.png');background-repeat:no-repeat;background-size:30px 30px;background-position:right 10px center;padding:10px 50px 7px 10px;";
                     } elseif ($item['style'] == 12) {
                         $out .= "background-image:url('/" . $theme . "images/vcam.png');background-repeat:no-repeat;background-size:30px 26px;background-position:right 10px center;padding:10px 50px 7px 10px;";
                     } else {
                         $out .= "padding:10px 10px 7px 10px;";
                     }
                     $out .= '">' . $item['name'] . '</h3></a>';
                     $out .= '<a href="http://' . $_SERVER['SERVER_NAME'] . '/' . $item['cat_chpu'] . '/' . $item['chpu'] . '/"><img src="' . substr($item['thumbs'], 2) . '" width="400"></a></div></li>';
                 }
                 $out .= '</ul>';
                 echo $out;
             } else {
                 echo 0;
             }
         }
     }
     die;
 }