示例#1
0
function showTable($row, $count)
{
    $article = file_get_contents("tableArticles.html");
    $article = str_replace("{{TITLE}}", $row["title"], $article);
    $article = str_replace("{{DATE}}", showDate($row["publishdate"], 1), $article);
    $article = str_replace("{{COUNT}}", $row["id"], $article);
    return $article;
}
示例#2
0
 public function getTag()
 {
     $tags = Tag::all();
     return Datatables::of($tags)->edit_column('status', function ($row) {
         return showSelectStatus($row->id, $row->status, 'Kacana.product.tag.setStatusTag(' . $row->id . ', 1)', 'Kacana.product.tag.setStatusTag(' . $row->id . ', 0)');
     })->edit_column('created', function ($row) {
         return showDate($row->created);
     })->edit_column('updated', function ($row) {
         return showDate($row->updated);
     })->add_column('action', function ($row) {
         return showActionButton('Kacana.product.tag.showEditTagForm(' . $row->id . ')', 'Kacana.product.tag.removeTag(' . $row->id . ')', true);
     })->make(true);
 }
示例#3
0
文件: DBCon.php 项目: frsd1/bth
 public function GetHighScoreList()
 {
     $output = "<ul>\n";
     $query = "SELECT * FROM dicegame ORDER BY score DESC limit 5";
     $result = mysqli_query($this->dbc, $query);
     while ($row = mysqli_fetch_array($result)) {
         $name = $row['name'];
         $score = $row['score'];
         $date = $row['date'];
         $output .= "<li>{$name} - {$score} - " . showDate($date) . "</li>\n";
     }
     $output .= "</ul>\n";
     return $output;
     $this->Disconnect();
 }
示例#4
0
 public function getBranch()
 {
     $branches = Branch::all();
     return Datatables::of($branches)->edit_column('image', function ($row) {
         if (!empty($row->image)) {
             return showImage($row->image, BRANCH_IMAGE . showDate($row->created, 1));
         }
     })->edit_column('status', function ($row) {
         return showSelectStatus($row->id, $row->status, 'Kacana.product.branch.setStatusBranch(' . $row->id . ', 1)', 'Kacana.product.branch.setStatusBranch(' . $row->id . ', 0)');
     })->edit_column('created', function ($row) {
         return showDate($row->created);
     })->edit_column('updated', function ($row) {
         return showDate($row->updated);
     })->add_column('action', function ($row) {
         return showActionButton('Kacana.product.branch.showEditBranchForm(' . $row->id . ')', 'Kacana.product.branch.removeBranch(' . $row->id . ')', true);
     })->make(true);
 }
示例#5
0
 /**
  * get products
  *
  * @return Response
  */
 public function getProduct()
 {
     $products = Product::all();
     return Datatables::of($products)->edit_column('image', function ($row) {
         if (!empty($row->image)) {
             return showImage($row->image, PRODUCT_IMAGE . $row->id);
         }
     })->edit_column('status', function ($row) {
         return showSelectStatus($row->id, $row->status, 'Kacana.product.setStatus(' . $row->id . ', 1)', 'Kacana.product.setStatus(' . $row->id . ', 0)');
     })->edit_column('created', function ($row) {
         return showDate($row->created);
     })->edit_column('updated', function ($row) {
         return showDate($row->updated);
     })->add_column('action', function ($row) {
         return showActionButton("/product/editProduct/" . $row->id, 'Kacana.product.removeProduct(' . $row->id . ')', false, false);
     })->make(true);
 }
示例#6
0
 public function getUser()
 {
     $users = User::all();
     return Datatables::of($users)->edit_column('image', function ($row) {
         if (!empty($row->image)) {
             return showImage($row->image, PRODUCT_IMAGE . $row->id);
         }
     })->edit_column('status', function ($row) {
         return showSelectStatus($row->id, $row->status, 'Kacana.user.setStatus(' . $row->id . ', 1)', 'Kacana.user.setStatus(' . $row->id . ', 0)');
     })->edit_column('created', function ($row) {
         return showDate($row->created);
     })->edit_column('updated', function ($row) {
         return showDate($row->updated);
     })->add_column('action', function ($row) {
         return showActionButton('Kacana.user.show(' . $row->id . ')', 'Kacana.product.branch.removeBranch(' . $row->id . ')', true);
     })->make(true);
 }
示例#7
0
function printHTMLStory2($story)
{
    //get domain
    $pattern = "^([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6}^";
    preg_match($pattern, $story->link, $matches);
    //var_dump($matches);
    echo "<div class=\"news-summary\" about=\"" . $story->href . "\">";
    echo "<div class=\"news-body\"><h3><a href=\"" . $story->link . "\">" . $story->title . "</a></h3>";
    echo "<p><em class=\"source\">" . $matches[0] . " &mdash; </em>";
    echo "<span>" . $story->description;
    echo "<a href=\"" . $story->href . "\" class=\"more\">More &hellip; </a></span>";
    echo "<span class=\"topic\">(<a href=\"http://www.digg.com/" . $story->topic_short_name . "\">" . $story->topic_name . "</a>)</span></p>";
    echo "<div class=\"news-details\">";
    echo " <a href=\"" . $story->href . "\" class=\"comments\">" . $story->comments . " Comments</a>";
    echo "<span class=\"user-info\">";
    echo "<a href=\"http://www.digg.com/users/" . $story->user_name . "\"><img src=\"" . $story->user_icon . "\" alt=\"" . $story->user_name . "\" class=\"user-photo\" height=\"16\" width=\"16\">" . $story->user_name . "</a> ";
    showDate($story->status, $story->submit_date, $story->promote_date);
    echo " </span></div></div>";
    echo "<ul class=\"news-digg\"><li class=\"digg-count\">";
    echo "<a href=\"" . $story->href . "\" >" . $story->diggs . " diggs</a></li></ul></div>\n";
}
示例#8
0
                        <div class="grayBtn" onclick="libraly.del(\'' . $name . '\')">Удалить</div>
                    </div>
                    <div class="clear"></div>
                </div>
            </li>';
        }
        print '<ul class="ul tableList projectList">' . $prj . '</ul>';
    }
} elseif ($action == 'sLcat') {
    $read = my_fileBuld(ROOT_DIR . '/data/' . $is_logged . '/' . $idName . '/');
    if (count($read['file']) > 0) {
        foreach ($read['file'] as $name) {
            $p++;
            $p = $p > 2 ? 1 : $p;
            $size = FSize(ROOT_DIR . '/data/' . $is_logged . '/' . $idName . '/' . $name);
            $date = showDate(ROOT_DIR . '/data/' . $is_logged . '/' . $idName . '/' . $name);
            $name = str_replace(".data", '', $name);
            $prj .= '<li class="li_prj_' . $name . ' p_' . $p . '">
                <div class="lineB">
                    <img src="lib/images/lib_ico.png" class="left" />
                    <div class="left textPad" style="min-width: 100px; font-weight: bold">' . $name . '</div>
                    <div class="left grayColor textPad" style="min-width: 200px">' . $date . '</div>
                    <div class="left grayColor textPad">' . $size . '</div>
                    <div class="right">
                        <div class="grayBtn" style="margin-right: 10px" onclick="libraly.editCat(\'' . $name . '\',\'' . $idName . '\')">Редактировать</div>
                        <div class="grayBtn" onclick="libraly.delCat(\'' . $name . '\',\'' . $idName . '\')">Удалить</div>
                    </div>
                    <div class="clear"></div>
                </div>
            </li>';
        }
示例#9
0
}
?>
</h2>
		<div id="image">
		  <a href="http://i.imgush.ru/<?php 
echo $this->img['image'] . '.' . $this->img['ext'];
?>
">
		   <img src="http://i.imgush.ru/<?php 
echo $this->img['image'] . '.' . $this->img['ext'];
?>
" />
		  </a>
	    </div>
	    <div id="under-image">
		  <span>Загружена <?php 
echo showDate(strtotime($this->img['date']));
?>
</span> |
		  <a href="http://imgush.ru/statis.php?add=gallery&name=<?php 
echo $this->img['image'];
?>
">Добавить</a>
		</div>
	
	  </div>
	
	  <div id="footer">
	  </div>
 </body>
</html>
示例#10
0
}
-->
</style></head>

<body>
<table width="1100" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="860" style="padding-bottom:10px;"><small>Print : <?php 
echo date('d M y, H:i:s');
?>
</small><br />
      <div style="font-size:22px; font-weight:bold;" align="center">REKAP DETAIL PENJUALA ITEM (<?php 
echo showDate($startdate);
?>
 s/d <?php 
echo showDate($enddate);
?>
)</div></td>
  </tr>
  
  <tr>
    <td><table width="1100" border="0" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
      <tr>
        <td width="37" align="center" bgcolor="#EEEEEE">No.</td>
        <td width="79" align="center" bgcolor="#EEEEEE">Kode</td>
        <td width="120" align="center" bgcolor="#EEEEEE">Kategori</td>
        <td width="208" align="center" bgcolor="#EEEEEE">Nama Produk</td>
        <td width="173" align="center" bgcolor="#EEEEEE">Pilihan</td>
        <td width="89" align="center" bgcolor="#EEEEEE">Satuan</td>
        <td width="126" align="center" bgcolor="#EEEEEE">Harga</td>
        <td width="91" align="center" bgcolor="#EEEEEE">Diskon</td>
示例#11
0
// checks if the url has the module switch
if (isset($_GET['module'])) {
    if ($_GET['module'] != 'package' && $_GET['module'] != 'search' && $_GET['module'] != 'user') {
        $setmodule = "overview";
        // Default to overview
        $title = "<i class='icons8-calendar'></i><span id='date'>" . ($date = showDate() . "</span>");
    } else {
        $setmodule = $_GET['module'];
        // sets the module switch using the url
        $module = $_GET['module'];
        if ($module == 'search') {
            $title = "Lookup any package";
        }
    }
} else {
    if (!isset($_GET['module'])) {
        $setmodule = "overview";
        // Default to overview
        $title = "<i class='icons8-calendar'></i><span id='date'>" . ($date = showDate() . "</span>");
    }
}
if (isset($_GET['trackingnumber'])) {
    $title = "Viewing issue " . $_GET['trackingnumber'];
}
if ($_SERVER['REQUEST_URI'] == "/packagehero/includes/allpackages.php") {
    $title = "View a list of all current issues";
}
if ($_SERVER['REQUEST_URI'] == "/packagehero/includes/helpcenter.php") {
    $title = "Package Hero Help Center";
}
示例#12
0
if (isset($error)) {
    ?>
			<div class="alert alert-info" role="alert"><?php 
    echo $error;
    ?>
</div>
			<?php 
} else {
    ?>
	    <?php 
    $date = $monday;
    for ($i = 1; $i <= count($diary); $i++) {
        ?>
	<h4 class="sidebar-header"><?php 
        echo $days[$i - 1] . " ";
        echo showDate($date);
        $date = date('Y-m-d', strtotime($date . ' + 1 day'));
        ?>
	</h4>
	<div class="panel panel-default">
	    <div class="table-responsive">
  	        <table class="table table-striped table-hover table-bordered">
			    <thead>
	    			<tr>
			    		<th style="width: 20%;">Предмет</th>
						<th style="width: 25%;">Оценки</th>
						<th style="width: 15%;">Домашнее задание</th>
						<th style="width: 25%;">Замечания</th>
						<th style="width: 15%;">Статус урока</th>
					</tr>
				</thead>
示例#13
0
        echo $r['no_order'];
        ?>
</td>
      <td valign="top"><a target="_blank" href="?p=edMember&id=<?php 
        echo $r['member_id'];
        ?>
"><?php 
        echo $r['member'];
        ?>
</a></td>
      <td align="right" valign="top"><?php 
        echo number_format($r['total_order']);
        ?>
</td>
      <td align="center" valign="top"><?php 
        echo showDate($r['tgl_order']);
        ?>
</td>
      <td align="center" valign="top"><?php 
        echo $r['status'] == 2 ? 'COMPLETED' : ($r['status'] == 1 ? 'PENDING' : 'CANCELLED');
        ?>
</td>
      <td align="center" valign="top">
      <a class="bTools" href="?p=addOrder&id=<?php 
        echo $r['id'];
        ?>
" title="Edit">E</a> 
      <a class="bTools" href="?p=delOrder&id=<?php 
        echo $r['id'];
        ?>
" title="Delete" onclick="return confirm('Hapus record <?php 
示例#14
0
        echo modelLink($item->make, $item->model);
        ?>
" title="<?php 
        echo filterText($item->make);
        ?>
 <?php 
        echo filterText($item->model);
        ?>
"><?php 
        echo filterText($item->make);
        ?>
 <?php 
        echo filterText($item->model);
        ?>
</a> <span><?php 
        echo showDate($item->time);
        ?>
</span></p>
                                    </div>
                                </div>
                            </div>
                        </li>
                        <!-- search results loop end //-->
                        <?php 
        $row += 1;
        ?>
                        <?php 
    }
    ?>
                    </ul>
                    <!-- search results end //-->
示例#15
0
                ?>
",kg:"<?php 
                echo getValueForJs($r['masina']['kg']['VALUE']);
                ?>
",putere:"<?php 
                echo getValueForJs($r['masina']['putere']['VALUE']);
                ?>
",anfab:"<?php 
                echo getValueForJs($r['masina']['anfab']['VALUE']);
                ?>
"
,valoarenou:"<?php 
                echo getValueForJs($r['masina']['valoarenou']['VALUE']);
                ?>
",ITP:"<?php 
                echo getValueForJs(showDate($r['masina']['itp']['VALUE'], getLT('dateformat')));
                ?>
",ROVI:"<?php 
                echo getValueForJs(showDate($r['masina']['rovi']['VALUE'], getLT('dateformat')));
                ?>
"
,textbutton:"Salveaza datele"
					}</div>
				<div class="workstep"><div class="biglabel">Vehicul</div></div>
				<?php 
                include "extensions/info_vehicul.php";
            }
            return true;
        }
    }
}
示例#16
0
        // читаем все комментарии для данного изображения
        $captions = $comments->find(array('image' => $image_name))->sort(array('uploaded' => -1))->limit(10);
        // считаем количество комментариев
        $total_captions = $comments->find(array('image' => $image_name))->count();
        // увеличиваем кол-во просмотров
        $images->update(array('image' => $image_name), array('$inc' => array('views' => 1)));
        $cursor = $images->find(array('gallery' => 1, 'date' => new MongoRegex("/{$date}/"), 'image' => array('$ne' => $image_name)))->sort(array('date' => $rnd))->limit(6);
        $tpl->image = $image;
        $tpl->cursor = $cursor;
        $tpl->captions = $captions;
        $tpl->total_captions = $total_captions;
        $tpl->comments = TRUE;
        $tpl->display('tpl/lookimage.tpl.php');
    } else {
        $tpl->display('tpl/404.tpl.php');
    }
} elseif (isset($_POST['from']) && isset($_POST['gotimage'])) {
    $from = $_POST['from'];
    $more_captions = $comments->find(array('image' => $_POST['gotimage']))->skip($from)->limit(10)->sort(array('uploaded' => -1));
    $ind = $from;
    foreach ($more_captions as $caption) {
        $ind++;
        echo "<div id=\"{$ind}\" class=\"caption\">";
        echo '<div class="author">';
        echo "<span style=\"color:#4E76C9;\">{$caption['username']}</span>";
        echo '<span>' . showDate($caption['uploaded']) . '</span>';
        echo '</div>';
        echo htmlspecialchars($caption['caption']);
        echo '</div>';
    }
}
示例#17
0
        }
        ?>
								<td><input type="checkbox" name="messages[]" value="<?php 
        echo $message['USER_MESSAGE_ID'];
        ?>
"></td>
								<td class="col-md-5"><?php 
        echo $message['USER_NAME'];
        ?>
</td>
								<td class="col-md-5"><?php 
        echo $message['MESSAGE_TEXT'];
        ?>
</td>
								<td class="col-md-2"><?php 
        showDate($message['MESSAGE_DATE']);
        ?>
</td>
								</tr>
			<?php 
    }
}
?>
			            </tbody>
					</table>
				</div>
			</div>
			<?php 
echo $this->pagination->create_links();
?>
		</div>
示例#18
0
    while ($r = mysql_fetch_array($results)) {
        ?>
    <tr class="<?php 
        echo $i % 2 == 0 ? 'odd' : '';
        ?>
">
      <td align="center"><?php 
        echo $i;
        ?>
</td>
      <td><?php 
        echo $r['nama_lengkap'];
        ?>
</td>
      <td align="center"><?php 
        echo showDate($r['tgl_lahir']);
        ?>
</td>
      <td><?php 
        echo $r['email'];
        ?>
</td>
      <td><?php 
        echo $r['telepon'];
        ?>
</td>
      <td align="center"><?php 
        echo $r['status'] == 1 ? 'Aktif' : 'Non Aktif';
        ?>
</td>
      <td align="center"><a class="bTools" href="?p=edMember&id=<?php 
示例#19
0
/**
 * @param $date
 * @param string $format
 * @return string
 */
function showDateText($date, $format = 'text')
{
    return showDate($date, $format);
}
示例#20
0
    list($gps_lat, $gps_lon) = explode(',', $_GET['gps']);
    if ($mysqli->connect_errno) {
        printf("Не удалось подключиться: %s\n", $mysqli->connect_error);
        exit;
    }
    //if ($_GET['netgps'] == 0)
    $mysqli->query("insert into yii2_rawdata (deviceid,latitude,longitude,bat,speed,alt,acc) values ('{$_GET['deviceid']}',{$gps_lat},{$gps_lon},{$_GET['bat']},{$_GET['speed']},{$_GET['alt']},{$_GET['acc']})");
}
if (isset($_GET['deviceid'], $_GET['getlastpoint'])) {
    $result = $mysqli->query("select * from yii2_rawdata where deviceid='{$_GET['deviceid']}' and alt <> 0 order by 'time' desc limit 1");
    $obj = $result->fetch_assoc();
    $result->close();
    $obj['latitude'] = floatval($obj['latitude']);
    $obj['longitude'] = floatval($obj['longitude']);
    $obj['speed'] = $obj['speed'] * 3.6;
    $obj['time'] = showDate(strtotime($obj['time']));
    //$obj['acc']=floatval($obj['acc']);
    echo json_encode($obj);
}
function showDate($date)
{
    $stf = 0;
    $cur_time = time();
    $diff = $cur_time - $date;
    $seconds = array('секунда', 'секунды', 'секунд');
    $minutes = array('минута', 'минуты', 'минут');
    $hours = array('час', 'часа', 'часов');
    $days = array('день', 'дня', 'дней');
    $weeks = array('неделя', 'недели', 'недель');
    $months = array('месяц', 'месяца', 'месяцев');
    $years = array('год', 'года', 'лет');
示例#21
0
    $mounth = date('m', strtotime($date));
    $year = date('Y', strtotime($date));
    $data = array('01' => 'Январь', '02' => 'Февраль', '03' => 'Март', '04' => 'Апрель', '05' => 'Май', '06' => 'Июнь', '07' => 'Июль', '08' => 'Август', '09' => 'Сентябрь', '10' => 'Октябрь', '11' => 'Ноябрь', '12' => 'Декабрь');
    foreach ($data as $key => $value) {
        if ($key == $mounth) {
            echo "{$value} " . ltrim($day, '0') . ", {$year}";
        }
    }
}
?>

<div class="container">
	<div class="row">
		<div class="col-md-4">
			<h3 class="sidebar-header"><i class="fa fa-clock-o"></i> <?php 
showDate(date('Y-m-d'));
?>
</h3>
			<div class="panel panel-default">
			    <div class="table-responsive">
					<table name="timetable" class="table table-striped">
						<thead>
							<tr>
								<th>Время</th>
								<th>Предмет</th>
								<th>Каб.</th>
						    </tr>
						</thead>
						<tbody>
							<?php 
for ($k = 0; $k < count($timetable); $k++) {
示例#22
0
    foreach ($news as $row) {
        ?>
			<div class="blog_grid">
				<h2 class="post_title"><a href="<?php 
        echo base_url();
        ?>
pupil/post/<?php 
        echo $row['NEWS_ID'];
        ?>
"><?php 
        echo $row['NEWS_THEME'];
        ?>
</a></h2>
				<ul class="links">
					<li><i class="fa fa-calendar"></i> <?php 
        echo showDate($row['NEWS_TIME']);
        ?>
</li>
					<li><i class="fa fa-user"></i> <?php 
        echo $row['TEACHER_NAME'];
        ?>
</li>
			    </ul>
			    <p><?php 
        $str = crop_str($row['NEWS_TEXT'], 1000);
        if ($str != $row['NEWS_TEXT']) {
            echo $str . " ...";
        } else {
            echo $str;
        }
        ?>
示例#23
0
		<div class="col-md-8">
			<div class="blog_grid">
				<h2 class="post_title"><?php 
if (isset($theme)) {
    echo $theme;
}
?>
</h2>
				<ul class="links">
					<li><i class="fa fa-calendar"></i> <?php 
echo showDate($time);
?>
</li>
					<li><i class="fa fa-user"></i> <?php 
echo $teacher;
?>
</li>
			    </ul>
			    <p><?php 
echo $text;
?>
</p>
			</div>
	    </div>
    </div>
</div>
示例#24
0
</div></div>

<div class="workstep sumeasiguratefac"><div class=worklabel>Accidente:</div><div class=workfields><input type="number" name="sa_acc" value="" size=6 style="width:100px;"> &euro;
</div></div>

<div class="workstep sumeasiguratefac"><div class=worklabel>Fenomene Electrice:</div><div class=workfields><input type="number" name="sa_fe" value="" size=6 style="width:100px;"> &euro;
</div></div>

<div class="workstep sumeasiguratefac"><div class=worklabel>Nr rate</div><div class=workfields><select name="nrrate"><option value="1">1</option><option value="2">2</option><option value="4">4</option></select>
</div></div>

<div class="workstep sumeasiguratefac"><div class=worklabel>Nr ani</div><div class=workfields><select name="nrani"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option></select>
</div></div>

<div class="workstep"><div class=worklabel>Valabil din</div><div class=workfields><input class="validated" validators="change" validate="revalidate.p_per~required.date" type=text name="datavalabilitate" id="datavalabilitate" size="9" value="<?php 
echo showDate(date("Y-m-d", time() + 24 * 60 * 60));
?>
">
	<a class="cdateselect" id="datavalabilitate_sel" name="datavalabilitate_sel" onclick="global_cal.select(document.forms['work'].datavalabilitate,'datavalabilitate_sel','dd.MM.yyyy'); return false;" href="#"><img src="images/calendar.png" border="0" alt="Calendar"></a>
</div></div>

</div><div class="work_col2">
<div class="workstep"><div class="biglabel"><img src="images/individ.png" border=0> DATE PROPRIETAR</div></div>

<div class="workstep"><div class=worklabel>Proprietar</div><div class=workfields><select name="tipproprietar" class="validated validateundo " validators="change" validate="for.pf.show.id.tarifarofertapf~for.pj.show.id.tarifarofertapj~required.yes">
	<option class="option0" value="">--Selectati--</option>
	<option class="option0" value="pf">Persoana Fizica</option>
	<option class="option0" value="pj">Persoana Juridica</option>
</select>
</div></div>
示例#25
0
文件: utils.php 项目: jawedkhan/rorca
function parseAndReplaceAll($text, $slotback = '')
{
    global $directdump;
    $directdump = false;
    //[sql.s1.field1.type]
    //[var.name.type]
    //[para.name]
    $newstring = "";
    $oldpos = 0;
    $pos = strpos($text, "[", $oldpos);
    $ifs = array();
    $cif = 0;
    $ifs[$cif] = false;
    while ($pos !== false) {
        //search for close
        $pos2 = strpos($text, "]", $pos);
        if ($pos2 !== false) {
            if ($ifs[$cif]) {
                //ignore only for an [endif]  [fi]
                $token = substr($text, $pos + 1, $pos2 - $pos - 1);
                $arr = explode(".", $token);
                if ($arr[0] == 'if' || $arr[0] == '!if' || $arr[0] == 'nif') {
                    $cif++;
                    $ifs[$cif] = true;
                }
                if ($arr[0] == "endif" || $arr[0] == "fi") {
                    $ifs[$cif] = false;
                    $cif--;
                }
                $oldpos = $pos2 + 1;
            } else {
                if ($directdump) {
                    echo substr($text, $oldpos, $pos - $oldpos);
                } else {
                    $newstring .= substr($text, $oldpos, $pos - $oldpos);
                }
                $oldpos = $pos;
                //we have a token.. anallys
                $token = substr($text, $pos + 1, $pos2 - $pos - 1);
                if (strlen($token)) {
                    $displaytype = "";
                    $displaypara = "";
                    $displayvalue = "";
                    $arr = explode(".", $token);
                    $iftest = false;
                    $ifnegative = false;
                    if (isset($arr[0]) && ($arr[0] == 'if' || $arr[0] == '!if' || $arr[0] == 'nif')) {
                        $iftest = true;
                        if ($arr[0] == '!if' || $arr[0] == 'nif') {
                            $ifnegative = true;
                        }
                        $iftestvalue = "";
                        if (isset($arr[1])) {
                            $iftestvalue = $arr[1];
                        }
                        for ($i = 2; $i < count($arr); $i++) {
                            $arr[$i - 2] = $arr[$i];
                        }
                        if (count($arr)) {
                            unset($arr[count($arr) - 1]);
                        }
                        if (count($arr)) {
                            unset($arr[count($arr) - 1]);
                        }
                    }
                    if (isset($arr[1]) || $token == "fi" || $token == "endif") {
                        switch ($arr[0]) {
                            case 'endif':
                            case 'fi':
                                $oldpos = $pos2 + 1;
                                $ifs[$cif] = false;
                                $cif--;
                                break;
                            case 'sql':
                                //valid
                                $oldpos = $pos2 + 1;
                                if (isset($arr[3])) {
                                    $displaytype = $arr[3];
                                }
                                if (isset($arr[4])) {
                                    $displaypara = $arr[4];
                                }
                                //get value
                                if (isset($arr[1]) && isset($GLOBALS[$arr[1] . '_sql_conn'])) {
                                    if (isset($arr[2])) {
                                        $displayvalue = $GLOBALS[$arr[1] . '_sql_conn']->getvalue($arr[2]);
                                    }
                                    if ($displaytype == "fast" && isset($arr[2])) {
                                        $displayvalue = $GLOBALS[$arr[1] . '_sql_conn']->getvaluefast($arr[2]);
                                        if (isset($arr[4])) {
                                            $displaytype = $arr[4];
                                        }
                                        if (isset($arr[5])) {
                                            $displaypara = $arr[5];
                                        }
                                    }
                                    if ($displaytype == "mins") {
                                        $displaypara = $GLOBALS[$arr[1] . '_sql_conn']->getvalue($arr[2] . "_panala");
                                        require_once "config/dateutils.php";
                                        $diff = timediff($displayvalue, $displaypara, getLT("dateformat"));
                                        $secs = intval(timediffsecs($diff) / 60);
                                        $displayvalue = $secs;
                                        $displaypara = $arr[5];
                                    }
                                } else {
                                    if ($arr[1] == "conn") {
                                        if (isset($arr[2])) {
                                            $displayvalue = $GLOBALS[$arr[1]]->getvalue($arr[2]);
                                        }
                                        if ($displaytype == "fast" && isset($arr[2])) {
                                            $displayvalue = $GLOBALS[$arr[1]]->getvaluefast($arr[2]);
                                            if (isset($arr[4])) {
                                                $displaytype = $arr[4];
                                            }
                                            if (isset($arr[5])) {
                                                $displaypara = $arr[5];
                                            }
                                        }
                                        if ($displaytype == "mins") {
                                            $displaypara = $GLOBALS[$arr[1]]->getvalue($arr[2] . "_panala");
                                            require_once "config/dateutils.php";
                                            $diff = timediff($displayvalue, $displaypara, getLT("dateformat"));
                                            $secs = intval(timediffsecs($diff) / 60);
                                            $displayvalue = $secs;
                                            $displaypara = $arr[5];
                                        }
                                    }
                                }
                                break;
                            case 'var':
                            case 'g':
                                //valid
                                $oldpos = $pos2 + 1;
                                if (isset($arr[1])) {
                                    $displayvalue = $GLOBALS[$arr[1]];
                                }
                                if (isset($arr[2])) {
                                    $displaytype = $arr[2];
                                }
                                if (isset($arr[3])) {
                                    $displaypara = $arr[3];
                                }
                                //get value
                                break;
                            case 'cache':
                                $oldpos = $pos2 + 1;
                                if (isset($arr[1])) {
                                    $displayvalue = cache_getvalue($arr[1]);
                                }
                                if (isset($arr[2])) {
                                    $displaytype = $arr[2];
                                }
                                if (isset($arr[3])) {
                                    $displaypara = $arr[3];
                                }
                                //get value
                                break;
                            case 'para':
                                //valid
                                $oldpos = $pos2 + 1;
                                global $_control_replace_sql;
                                if (isset($arr[1])) {
                                    $displayvalue = $_control_replace_sql('@' . $arr[1]);
                                }
                                if (isset($arr[2])) {
                                    $displaytype = $arr[2];
                                }
                                if (isset($arr[3])) {
                                    $displaypara = $arr[3];
                                }
                                break;
                            case 'post':
                                //valid
                                $oldpos = $pos2 + 1;
                                global $_POST;
                                if (isset($arr[1]) && $_POST[$arr[1]] != "") {
                                    $displayvalue = '' . correctPostValue($_POST[$arr[1]]);
                                }
                                if (isset($arr[2])) {
                                    $displaytype = $arr[2];
                                }
                                if (isset($arr[3])) {
                                    $displaypara = $arr[3];
                                }
                                break;
                            case 'posttags':
                                //valid
                                $oldpos = $pos2 + 1;
                                global $_POST;
                                if (isset($arr[1]) && $_POST[$arr[1]] != "") {
                                    $displayvalue = '' . correctPostValue(implode(",", $_POST[$arr[1]]));
                                }
                                if (isset($arr[2])) {
                                    $displaytype = $arr[2];
                                }
                                if (isset($arr[3])) {
                                    $displaypara = $arr[3];
                                }
                                break;
                            case 'get':
                                //valid
                                $oldpos = $pos2 + 1;
                                global $_GET;
                                if (isset($arr[1]) && $_GET[$arr[1]] != "") {
                                    $displayvalue = '' . correctPostValue($_GET[$arr[1]]);
                                }
                                if (isset($arr[2])) {
                                    $displaytype = $arr[2];
                                }
                                if (isset($arr[3])) {
                                    $displaypara = $arr[3];
                                }
                                break;
                            case 'config':
                            case 'c':
                                //valid
                                $oldpos = $pos2 + 1;
                                if (isset($arr[1])) {
                                    $displayvalue = getUserConfig($arr[1]);
                                }
                                if (isset($arr[2])) {
                                    $displaytype = $arr[2];
                                }
                                if (isset($arr[3])) {
                                    $displaypara = $arr[3];
                                }
                                break;
                            case 'cookie':
                                $oldpos = $pos2 + 1;
                                if (isset($arr[1]) && isset($arr[2])) {
                                    $displayvalue = cookie_getvalue($arr[1], $arr[2]);
                                }
                                if (isset($arr[3])) {
                                    $displaytype = $arr[3];
                                }
                                if (isset($arr[4])) {
                                    $displaypara = $arr[4];
                                }
                                break;
                            case 'session':
                            case 's':
                                //valid
                                $oldpos = $pos2 + 1;
                                if (isset($arr[1])) {
                                    $displayvalue = session_getvalue($arr[1]);
                                }
                                if (isset($arr[2])) {
                                    $displaytype = $arr[2];
                                }
                                if (isset($arr[3])) {
                                    $displaypara = $arr[3];
                                }
                                break;
                            case 'utils':
                                //valid
                                $oldpos = $pos2 + 1;
                                if (isset($arr[1])) {
                                    $displayvalue = $arr[1];
                                }
                                if (isset($arr[2])) {
                                    $displaytype = $arr[2];
                                }
                                if (isset($arr[3])) {
                                    $displaypara = $arr[3];
                                }
                                break;
                            case 'slot':
                                //we have a callback
                                $oldpos = $pos2 + 1;
                                if (isset($arr[1])) {
                                    $displayvalue = $arr[1];
                                }
                                if (isset($arr[2])) {
                                    $displaytype = $arr[2];
                                }
                                if (isset($arr[3])) {
                                    $displaypara = $arr[3];
                                }
                                if ($slotback != '') {
                                    $displayvalue = $slotback($displayvalue, $displaytype, $displaypara);
                                    $displaytype = '';
                                    $displaypara = '';
                                }
                                break;
                            case 'call':
                                //we have a callback
                                $oldpos = $pos2 + 1;
                                if (isset($arr[1])) {
                                    $displayvalue = $arr[1];
                                }
                                if (isset($arr[2])) {
                                    $displaytype = $arr[2];
                                }
                                if (isset($arr[3])) {
                                    $displaypara = $arr[3];
                                }
                                $fn = $displayvalue;
                                if (function_exists($fn)) {
                                    $displayvalue = $fn($displaytype, $displaypara);
                                } else {
                                    $displayvalue = '';
                                }
                                break;
                        }
                    }
                    $displaypara = str_replace('^', '.', $displaypara);
                    if ($iftest) {
                        //we have an ok
                        $cif++;
                        $iftestvalue = str_replace('^', '.', $iftestvalue);
                        if ($ifnegative) {
                            if ($displayvalue != $iftestvalue) {
                                $ifs[$cif] = false;
                            } else {
                                $ifs[$cif] = true;
                            }
                        } else {
                            if ($displayvalue == $iftestvalue) {
                                $ifs[$cif] = false;
                            } else {
                                $ifs[$cif] = true;
                            }
                        }
                    } else {
                        $oldnewstring = $newstring;
                        if ($directdump) {
                            $newstring = '';
                        }
                        switch ($displaytype) {
                            case 'lb':
                                $newstring .= '[';
                                break;
                            case 'rb':
                                $newstring .= ']';
                                break;
                            case 'now':
                                require_once "config/dateutils.php";
                                if ($displayvalue != "") {
                                    $newstring .= date($displayvalue);
                                } else {
                                    $newstring .= showDate(date("Y-m-d"), getLT("dateformat"));
                                }
                                break;
                            case 'date':
                                require_once "config/dateutils.php";
                                if ($displaypara != "") {
                                    if ($displayvalue != "0000-00-00") {
                                        $newstring .= date(str_replace("~", ".", $displaypara), showDate($displayvalue, "time"));
                                    }
                                } else {
                                    $newstring .= showDate($displayvalue, getLT("dateformat"));
                                }
                                break;
                            case 'sqldate':
                                require_once "config/dateutils.php";
                                $newstring .= getDateForMysql($displayvalue, getLT("dateformat"));
                                break;
                            case 'time':
                                require_once "config/dateutils.php";
                                $newstring .= showTime($displayvalue);
                                break;
                            case 'intval':
                                if ($displaypara != "") {
                                    $newstring .= bcadd($displayvalue, '0');
                                } else {
                                    $newstring .= intval($displayvalue);
                                }
                                break;
                            case 'number':
                                $newstring .= showNumber($displayvalue, $displaypara);
                                break;
                            case 'exnumber':
                                $newstring .= number_format(floatval($displayvalue), $displaypara, '.', '');
                                break;
                            case 'zeronumber':
                                if (abs(round($displayvalue) - $displayvalue) <= 0.01) {
                                    $newstring .= showNumber(round($displayvalue), $displaypara);
                                } else {
                                    $newstring .= showNumber($displayvalue, $displaypara);
                                }
                                break;
                            case 'zeros':
                                $newstring .= str_pad($displayvalue, $displaypara, "0", STR_PAD_LEFT);
                                break;
                            case 'spell':
                                require_once "extern/numberspell.php";
                                if (isset($GLOBALS[$displaypara])) {
                                    $newstring .= spellNumber($displayvalue, $GLOBALS[$displaypara]);
                                } else {
                                    $newstring .= spellNumber($displayvalue, getCurrentLang());
                                }
                                break;
                            case 'sqlescape':
                                global $conn;
                                if ($displaypara != "") {
                                    $newstring .= $conn->escape(substr($displayvalue, 0, intval($displaypara)));
                                } else {
                                    $newstring .= $conn->escape($displayvalue);
                                }
                                break;
                            case 'sqlvalues':
                                global $conn;
                                $myvalues = '';
                                $myarr = explode(",", $displayvalue);
                                foreach ($myarr as $kkmk => $kkmv) {
                                    if ($myvalues != "") {
                                        $myvalues .= ",";
                                    }
                                    $myvalues .= "'" . $conn->escape($kkmv) . "'";
                                }
                                if ($myvalues == "") {
                                    $myvalues = "''";
                                }
                                $newstring .= $myvalues;
                                break;
                            case 'split':
                                $sparr = explode(".", trim($displayvalue));
                                $newstring .= $sparr[intval($displaypara)];
                                break;
                            case 'explode':
                                $sparr = explode(" ", trim($displayvalue));
                                $newstring .= $sparr[intval($displaypara)];
                                break;
                            case 'substr':
                                if (intval($displaypara) < 0) {
                                    $newstring .= substr($displayvalue, intval($displaypara));
                                } else {
                                    $newstring .= substr($displayvalue, 0, intval($displaypara));
                                }
                                break;
                            case 'trim':
                                $displayvalue = str_replace(" ", "", trim($displayvalue));
                                $displayvalue = str_replace(".", "", $displayvalue);
                                $displayvalue = str_replace("-", "", $displayvalue);
                                $displayvalue = str_replace("=", "", $displayvalue);
                                $newstring .= $displayvalue;
                                break;
                            case 'html':
                                $newstring .= str_replace("\n", "<br>", $displayvalue);
                                break;
                            case 'nohtml':
                                $newstring .= strip_tags(html_entity_decode2($displayvalue));
                                break;
                            case 'pin':
                                $newstring .= substr(md5($displayvalue), intval($displaypara));
                                break;
                            case 'lang':
                                $newstring .= getLT($displayvalue);
                                break;
                            case 'upper':
                                $newstring .= strtoupper($displayvalue);
                                break;
                            case 'caps':
                                $newstring .= strtoupper(substr(getLT($displayvalue), 0, 1)) . strtolower(substr(getLT($displayvalue), 1));
                                break;
                            case 'lower':
                                $newstring .= strtolower($displayvalue);
                                break;
                            case 'adresa':
                                $newstring .= strtoupper(str_ireplace("zip", "cod postal", $displayvalue));
                                break;
                            case 'full':
                                $newstring .= parseAndReplaceAll($displayvalue, $slotback);
                                break;
                            case 'easyread':
                                $newstring .= strrev(join(str_split(strrev($displayvalue), 3), "."));
                                break;
                            case 'phone':
                                $displayvalue = str_replace("-", "", $displayvalue);
                                $displayvalue = str_replace("/", "", $displayvalue);
                                $displayvalue = str_replace(" ", "", $displayvalue);
                                $displayvalue = str_replace(".", "", $displayvalue);
                                $displayvalue = str_replace(",", "", $displayvalue);
                                $displayvalue = str_replace(",", "", $displayvalue);
                                $displayvalue = substr($displayvalue, 0, 10);
                                $newstring .= $displayvalue;
                                break;
                            case 'seo':
                                $newstring .= buildSeoLink($displayvalue);
                                break;
                            default:
                                $newstring .= $displayvalue;
                                break;
                        }
                        if ($directdump) {
                            echo $newstring;
                            $newstring = $oldnewstring;
                        }
                    }
                }
            }
        }
        $pos = strpos($text, "[", $pos + 1);
    }
    $newstring .= substr($text, $oldpos);
    return $newstring;
}
示例#26
0
print $de['willkommen'];
?>
                <?php 
include 'inc/prompter.inc.php';
?>
            </h1>
        </div>
    </div>
</div>

<!-- Monate -->
<div id="monate" class="container container-monate inview">
    <div class="col-md-12 nopad">
        <div class="well well-months">
            <?php 
showDate('UTC', 'now');
?>
        </div>
    </div>
</div>

<!-- Help -->
<!-- #################################### -->
<div id="help-container" class="container container-help">
    <div class="row">
        <div id="help" class="col-md-12">
            <div class="alert alert-dismissable">
                <section class="intro-block">
                    <p id="helptext">Lorem ipsum dolor sit amet... This is just a default text</p>
                </section>
            </div>
示例#27
0
    $image_title = substr(trim($_POST['title']), 0, 100);
    $image_name = $_POST['name'];
    if (strlen($image_title) > 7) {
        $images->update(array('image' => $image_name), array('$set' => array('title' => $image_title)));
        echo htmlspecialchars($image_title);
    }
}
// Смена фото
if (isset($_GET['index']) && isset($_GET['names']) && isset($_SESSION['image_name'])) {
    // массив имен изображений
    $image_names = $_GET['names'];
    // номер изображения
    $index = $_GET['index'];
    $image = $images->findOne(array('image' => $image_names[$index]));
    // определение времени добавления
    $uploaded = showDate(strtotime($image['date']));
    // возвращаем имя изображения и расширение
    echo json_encode(array('title' => $image['title'], 'name' => $image['image'] . '.' . $image['ext'], 'when_upl' => $uploaded));
    // echo $image['image'].'.'.$image['ext'];
} elseif (isset($_GET['names']) && isset($_SESSION['image_name'])) {
    // массив имен изображений
    $image_names = $_GET['names'];
    // выбираем первое фото из списка
    $image = $images->findOne(array('image' => $image_names[0]));
    if ($image) {
        // определяем кол-во фоток в массиве 1,2 или 3
        $number_of_images = count($image_names);
        $tpl->image = $image;
        $tpl->session_image = trim($_SESSION['image_name']);
        $tpl->number = $number_of_images;
        $tpl->url = $url[1];
示例#28
0
        echo $r['member_id'];
        ?>
"><?php 
        echo $r['member'];
        ?>
</a></td>
      <td align="left"><?php 
        echo $r['bank'];
        ?>
</td>
      <td align="right" valign="top"><?php 
        echo number_format($r['nominal']);
        ?>
</td>
      <td align="center" valign="top"><?php 
        echo showDate($r['tgl_transfer']);
        ?>
</td>
      <td align="center" valign="top"><?php 
        echo $r['status'] == 2 ? 'COMPLETED' : ($r['status'] == 1 ? 'PENDING' : 'CANCELLED');
        ?>
</td>
      <td align="center" valign="top"><a class="bTools" href="?p=edConfirm&id=<?php 
        echo $r['id'];
        ?>
" title="Edit">E</a> <a class="bTools" href="?p=delConfirm&id=<?php 
        echo $r['id'];
        ?>
" title="Delete" onclick="return confirm('Hapus record <?php 
        echo $r['no_order'];
        ?>
<h3>Konfirmasi Pembayaran</h3>
<div class="inner">
<form action="" method="post" enctype="multipart/form-data" name="formConfirm" id="formConfirm" onsubmit="return validateForm('formConfirm');">
<table width="510" border="0" cellspacing="3" cellpadding="5">
	<tr>
    	<td colspan="3"><strong>Data Invoice</strong></td>
        </tr>
    <tr>
    	<td width="154">No. Invoice Order<br /></td>
        <td width="12">:</td>
        <td width="314"><select name="order_id" id="order_id" class="input required">
        	<option value="">No. Invoice yg dibayar</option>
            <?php 
    $q = mysql_query("SELECT * FROM `order` WHERE member_id='" . $_SESSION['id'] . "' AND `status`=1");
    while ($r = mysql_fetch_array($q)) {
        echo '<option value="' . $r['id'] . '">' . $r['no_order'] . ' - ' . showDate($r['tgl_order']) . '</option>';
    }
    ?>
        </select>
</td>
	</tr>
    <tr>
    	<td>Bank Tujuan</td>
        <td>:</td>
        <td><select name="bank_id" id="bank_id" class="input required">
        	<option value="">Rekening Tujuan Transfer</option>
            <?php 
    $q = mysql_query("SELECT * FROM bank WHERE 0=0");
    while ($r = mysql_fetch_array($q)) {
        echo '<option value="' . $r['id'] . '">' . $r['nama_bank'] . ' | ' . $r['no_rekening'] . '</option>';
    }
示例#30
0
     echo '<div class="headerbox">';
     echo '<div class="left">';
     echo '<h2>Загрузки ' . showDate(strtotime($date)) . '</h2>';
     echo '</div>';
     echo '<div class="clear"></div>';
     echo '</div>';
     echo '<div class="posts">';
     echo '<h2>Нет</h2>';
     echo '</div>';
     echo '<div id="imagelist-loader" class="textbox">';
     echo '<img src="/img/album_loader.gif">';
     echo '</div>';
 } else {
     echo '<div class="headerbox">';
     echo '<div class="left">';
     echo '<h2>Загрузки ' . showDate(strtotime($date)) . '</h2>';
     echo '</div>';
     echo '<div class="right">' . $chislo_fotok . '</div>';
     echo '<div class="clear"></div>';
     echo '</div>';
     echo '<div class="posts">';
     foreach ($cursor1 as $image_cand) {
         echo "<div id=\"{$image_cand['image']}\" class=\"post\">";
         echo "<a href=\"http://imgush.ru/statis.php?img={$image_cand['image']}\"><img src=\"http://i.imgush.ru/{$image_cand['image']}s.{$image_cand['ext']}\"></a>";
         echo '</div>';
     }
     echo '<div class="clear"></div>';
     echo '</div>';
     echo '<div id="imagelist-loader" class="textbox">';
     echo '<img src="/img/album_loader.gif">';
     echo '</div>';