This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Selecting Data ### | |
###################### | |
// Runs the selection query and returns the result. Can be used by itself to retrieve all records from a table: | |
$query = $this->db->get("table_name"); // Produces: SELECT * FROM table_name | |
$result = $query->result(); // result(): returns the query result as an array of objects, or an empty array on failure | |
$query = $this->db->get("table_name", $limit, $offset); | |
$query = $this->db->get("table_name", 10, 20); // Produces: SELECT * FROM table_name LIMIT 20, 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compiled source (source: http://goo.gl/hVcp7b) # | |
################################################## | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Simple HTML Template</title> | |
</head> | |
<body> | |
<div>Content here..</div> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* make_slug | |
* @author @AmrMekkawy | |
* | |
* based on http://goo.gl/7WULfc & http://goo.gl/P6j345 | |
* and modified by @AmrMekkawy to be used with Arabic language | |
*/ | |
if (!function_exists("make_slug")) { | |
function make_slug($string = null, $separator = "-") { | |
if (is_null($string)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title></title> | |
<!-- Bootstrap core CSS --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<select name=""> | |
<option value="USD" selected="selected">United States Dollars</option> | |
<option value="EUR">Euro</option> | |
<option value="GBP">United Kingdom Pounds</option> | |
<option value="DZD">Algeria Dinars</option> | |
<option value="ARP">Argentina Pesos</option> | |
<option value="AUD">Australia Dollars</option> | |
<option value="ATS">Austria Schillings</option> | |
<option value="BSD">Bahamas Dollars</option> | |
<option value="BBD">Barbados Dollars</option> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<select name=""> | |
<option value='UTC' selected='selected'>توقيت جرينيتش</option> | |
<optgroup label='آسيا'> | |
<option value='Asia/Hebron'>Hebron</option> | |
<option value='Asia/Kathmandu'>Kathmandu</option> | |
<option value='Asia/Khandyga'>Khandyga</option> | |
<option value='Asia/Novokuznetsk'>Novokuznetsk</option> | |
<option value='Asia/Ust-Nera'>Ust-Nera</option> | |
<option value='Asia/Ashgabat'>أشكبات</option> | |
<option value='Asia/Aqtau'>أكتو</option> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* returns a specific number of words | |
* | |
* @param string $string the whole string | |
* @param integer $num_words number of words to return from the whole string | |
* @return string returned string | |
*/ | |
if (!function_exists("brief_text")) { | |
function brief_text($string, $num_words = 50) { | |
$string = trim(preg_replace('/\s+/', ' ', $string)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Country List in Arabic | source: https://github.com/umpirsky/country-list -- > | |
<select name="country"> | |
<option value="AW">آروبا</option> | |
<option value="AZ">أذربيجان</option> | |
<option value="AM">أرمينيا</option> | |
<option value="ES">أسبانيا</option> | |
<option value="AU">أستراليا</option> | |
<option value="AF">أفغانستان</option> | |
<option value="AL">ألبانيا</option> | |
<option value="DE">ألمانيا</option> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function arabic_date_format($timestamp) | |
{ | |
$periods = array( | |
"second" => "ثانية", | |
"seconds" => "ثواني", | |
"minute" => "دقيقة", | |
"minutes" => "دقائق", | |
"hour" => "ساعة", |
OlderNewer