コード例 #1
0
ファイル: Date.php プロジェクト: johntaa/ar-php
 * @link      http://www.ar-php.org
 */
error_reporting(E_STRICT);
$time_start = microtime(true);
date_default_timezone_set('GMT');
$time = time();
echo date('l dS F Y h:i:s A', $time);
echo '<br /><br />';
require '../../Arabic.php';
$Arabic = new I18N_Arabic('Date');
$correction = $Arabic->dateCorrection($time);
echo $Arabic->date('l dS F Y h:i:s A', $time, $correction);
$day = $Arabic->date('j', $time, $correction);
echo ' [<a href="Moon.php?day=' . $day . '" target=_blank>القمر الليلة</a>]';
echo '<br /><br />';
$Arabic->setMode(2);
echo $Arabic->date('l dS F Y h:i:s A', $time);
echo '<br /><br />';
$Arabic->setMode(3);
echo $Arabic->date('l dS F Y h:i:s A', $time);
echo '<br /><br />';
$Arabic->setMode(4);
echo $Arabic->date('l dS F Y h:i:s A', $time);
echo '<br /><br />';
$Arabic->setMode(5);
echo $Arabic->date('l dS F Y h:i:s A', $time);
echo '<br /><br />';
$Arabic->setMode(6);
echo $Arabic->date('l dS F Y h:i:s A', $time);
echo '<br /><br />';
$Arabic->setMode(7);
コード例 #2
0
ファイル: core.php プロジェクト: hasanhalabi/jDMS
 static function convert_date_to_arabic_string($datetime = null)
 {
     global $arabic_date;
     if (!isset($arabic_date)) {
         $arabic_date = new I18N_Arabic('Date');
         $arabic_date->setMode(2);
     }
     if ($datetime == null) {
         $datetime = time();
     }
     return $arabic_date->date('l dS F Y', $datetime);
 }
コード例 #3
0
ファイル: Query.php プロジェクト: m-gamal/crm
 include '../../Arabic.php';
 $Arabic = new I18N_Arabic('Query');
 echo $Arabic->allForms('فلسطينيون');
 $dbuser = '******';
 $dbpwd = '';
 $dbname = 'test';
 try {
     $dbh = new PDO('mysql:host=localhost;dbname=' . $dbname, $dbuser, $dbpwd);
     // Set the error reporting attribute
     $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
     $dbh->exec("SET NAMES 'utf8'");
     if ($_GET['keyword'] != '') {
         $keyword = @$_GET['keyword'];
         $keyword = str_replace('\\"', '"', $keyword);
         $Arabic->setStrFields('headline');
         $Arabic->setMode($_GET['mode']);
         $strCondition = $Arabic->getWhereCondition($keyword);
         $strOrderBy = $Arabic->getOrderBy($keyword);
     } else {
         $strCondition = '1';
     }
     $StrSQL = "SELECT `headline` FROM `aljazeera` WHERE {$strCondition} ORDER BY {$strOrderBy}";
     $i = 0;
     foreach ($dbh->query($StrSQL) as $row) {
         $headline = $row['headline'];
         $i++;
         if ($i % 2 == 0) {
             $bg = "#f0f0f0";
         } else {
             $bg = "#ffffff";
         }
コード例 #4
0
			<img  src="images/logo.png">
		</div>
		<div id="head-text">
				<p id="header"><small>مؤسسة </small> الكوثر <small>الثقافية</small></p><br>
			<p id="subHeader">Stichting Alcauther</p>
		</div>
			<div id="date" >
				<!-- The date  -->
				<?php 
date_default_timezone_set('UTC');
$time = time();
// TO control the data cahnge this variable
include "../../includes/connect2db.php";
// configration - connection and selection  \\
include "../../includes/functions.php";
$date = retrieve_data("alcDateTable", 1);
$t = (int) htmlentities(trim($date[0][0]));
//	if($numOfDays < 7){
$time = $time + 60 * 60 * 24 * $date[0][0];
//		}
require 'I18N/Arabic.php';
$obj = new I18N_Arabic('Date');
$fix = $obj->dateCorrection($time);
echo '<span style="color:#fff; padding: 0 0 4px 4px; " class="hidden-sm hidden-xs">';
echo $obj->date('dS F Y ', $time) . ' - ';
$fix = $obj->dateCorrection($time);
$obj->setMode(3);
echo $obj->date('l dS F Y ', $time, $fix) . '</span>';
?>
			</div>
</header>