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 | |
| defined('BASEPATH') OR exit('No direct script access allowed'); | |
| define('DS', DIRECTORY_SEPARATOR, TRUE); | |
| class Template { | |
| public $template_dir; | |
| public $template_cache; | |
| public $template_expiry; |
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
| // Error | |
| // ----- | |
| Parse error: syntax error, unexpected T_STRING, expecting ']' in /home/localhost/www/application/cache/106a6c241b8797f52e1e77317b96a201.tpl on line 3 | |
| // Php: home.php | |
| // ------------- | |
| $home = $this->template->load('home'); | |
| $home->assign('name', 'FOOBAR'); | |
| $home->assign('me', array('good'=>'LAKA')); | |
| $home->render(); |
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
| <?=lang('album', 'album')?> | |
| <select name="album_id"> | |
| <?php foreach($user_albums as $user_album): ?> | |
| <option value="<?=$user_album->id?>"><?=$user_album->title?></option> | |
| <?php endforeach ?> |
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
| http://uploads.makevoid.com/jquery_dom_highlighter.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
| <form action="<?=$_SERVER['PHP_SELF'];?>" method="post" enctype="multipart/form-data"> | |
| <? | |
| $num_files = 5; | |
| while($num_files){ | |
| echo '<input type="file" name="file[]" /> <br>'; | |
| $num_files --; | |
| } | |
| ?> | |
| <input type="submit" name="upload" /> |
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
| /* page.php?xxxx */ | |
| $next = $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING']; | |
| printf('<a href="login.php?next=%s">login</a>', $next); | |
| /* login.php */ | |
| $next = $_GET['next']; | |
| /* ... */ | |
| // حول المتسخدم الى الرابط الذي جاء منه |
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
| /* page.php?xxxx */ | |
| $next = $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING']; | |
| session_start(); | |
| $_SESSION['next'] = $next; | |
| printf('<a href="login.php">login</a>', $next); | |
| /* login.php */ | |
| session_start(); | |
| $next = $_SESSION['next']; | |
| /* ... */ |
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
| Options -Indexes | |
| Options +FollowSymLinks | |
| # Set the default file for indexes | |
| DirectoryIndex index.php | |
| <IfModule mod_rewrite.c> | |
| # mod_rewrite rules | |
| RewriteEngine on |
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
| #!/usr/bin/env python | |
| from time import strftime, strptime, mktime | |
| file_name = 'names.lst' | |
| trash_file_name = 'old_names.lst' | |
| filter_date = strftime('%d-%m-%Y') #'01-01-2012' | |
| def timestamp(strtime, format = '%d-%m-%Y'): | |
| return mktime(strptime(strtime, format)) |
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
| <IfModule mod_rewrite.c> | |
| RewriteEngine on | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteRule ^(\w+)\.php\?id=([0-9]+)$ page-router.php?name=$1&id=$2 [QSA,L] | |
| </IfModule> |