| 1 |
<?php |
| 2 |
|
| 3 |
/* |
| 4 |
Author: Fakhri Alsadi |
| 5 |
Date: 16-7-2010 |
| 6 |
Contact: www.clogica.com info@clogica.com mobile: +972599322252 |
| 7 |
*/ |
| 8 |
|
| 9 |
|
| 10 |
///@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
| 11 |
|
| 12 |
///@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
| 13 |
|
| 14 |
//// class wherest @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
| 15 |
|
| 16 |
/* |
| 17 |
A simple class to create Drop down lists easily using PHP |
| 18 |
---------------------------------------------------------- |
| 19 |
|
| 20 |
example: |
| 21 |
|
| 22 |
---------------------------------------------------------- |
| 23 |
|
| 24 |
$wherest = new wherest(); |
| 25 |
|
| 26 |
$wherest->add_param("and", "binary tawajoh like '%$msn%' "); |
| 27 |
|
| 28 |
$wherest->add_text( "some text "); |
| 29 |
|
| 30 |
$wherest->get_statment(); |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
*/ |
| 35 |
|
| 36 |
////@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
| 37 |
|
| 38 |
if(!class_exists('wherest')){ |
| 39 |
class wherest{ |
| 40 |
|
| 41 |
var $where=''; |
| 42 |
|
| 43 |
function add_param($op , $value) |
| 44 |
|
| 45 |
{ |
| 46 |
if($this->where == '') |
| 47 |
|
| 48 |
$this->where=" where " . $value . " "; |
| 49 |
else |
| 50 |
|
| 51 |
$this->where= $this->where . " " . $op . " " . $value; |
| 52 |
|
| 53 |
|
| 54 |
} |
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
function add_text($value) |
| 61 |
{ |
| 62 |
$this->where=$this->where . $value ; |
| 63 |
} |
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
function get_statment() |
| 70 |
|
| 71 |
{ |
| 72 |
|
| 73 |
return $this->where; |
| 74 |
|
| 75 |
} |
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
}} |
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
?> |