Subversion-Projekte lars-tiefland.ci

Revision

Revision 2286 | Revision 2288 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 2286 Revision 2287
Zeile 3... Zeile 3...
3
/**
3
/**
4
 *
4
 *
5
 * @package WebanOS CI
5
 * @package WebanOS CI
6
 * @author Lars Tiefland <ltiefland@gmail.com> 
6
 * @author Lars Tiefland <ltiefland@gmail.com> 
7
 * @copyright 2016
7
 * @copyright 2016
8
 * @version $Rev: 2286 $
8
 * @version $Rev: 2287 $
9
 */
9
 */
Zeile 10... Zeile 10...
10
 
10
 
11
class Logistiker_model extends CI_Model
11
class Logistiker_model extends CI_Model
12
{
12
{
Zeile 154... Zeile 154...
154
	}
154
	}
Zeile 155... Zeile 155...
155
 
155
 
156
	public function tracking($id)
156
	public function tracking($id)
157
	{
157
	{
158
		$sWhere = "";
158
		$sWhere = "";
159
		if ($GET['sSearch'] != "") {
159
		if ($this->input->get('sSearch') != "") {
160
			$sWhere = "WHERE (";
160
			$sWhere = "WHERE (";
161
			for ($i = 0; $i < count($aColumns); $i++) {
161
			for ($i = 0; $i < count($aColumns); $i++) {
162
				if ($aColumns[$i] == "datum") {
162
				if ($aColumns[$i] == "datum") {
163
					$a = " from_unixtime(datum) ";
163
					$a = " from_unixtime(datum) ";
164
					$sWhere .= $a . " LIKE '%" . mysql_real_escape_string($GET['sSearch']) .
164
					$sWhere .= $a . " LIKE '%" . $this->order_db->escape($this->input->get('sSearch')) .
165
						"%' OR ";
165
						"%' OR ";
166
				} else {
166
				} else {
167
					$sWhere .= $aColumns[$i] . " LIKE '%" . mysql_real_escape_string($GET['sSearch']) .
167
					$sWhere .= $aColumns[$i] . " LIKE '%" . $this->order_db->escape($this->input->
168
						"%' OR ";
168
						get('sSearch')) . "%' OR ";
Zeile 169... Zeile 169...
169
				}
169
				}
170
 
170
 
171
			}
171
			}
172
			$sWhere = substr_replace($sWhere, "", -3);
172
			$sWhere = substr_replace($sWhere, "", -3);
Zeile 173... Zeile 173...
173
			$sWhere .= ')';
173
			$sWhere .= ')';
174
		}
174
		}
175
 
175
 
-
 
176
		/* Individual column filtering */
176
		/* Individual column filtering */
177
		for ($i = 0; $i < count($aColumns); $i++) {
177
		for ($i = 0; $i < count($aColumns); $i++) {
178
			if ($this->input->get('bSearchable_' . $i) == "true" && $this->input->get('sSearch_' .
178
			if ($GET['bSearchable_' . $i] == "true" && $GET['sSearch_' . $i] != '') {
179
				$i) != '') {
179
				if ($sWhere == "") {
180
				if ($sWhere == "") {
180
					$sWhere = "WHERE ";
181
					$sWhere = "WHERE ";
181
				} else {
182
				} else {
182
					$sWhere .= " AND ";
183
					$sWhere .= " AND ";
183
				}
184
				}
184
				if ($aColumns[$i] == "datum") {
185
				if ($aColumns[$i] == "datum") {
185
					$r = " from_unixtime(datum) ";
186
					$r = " from_unixtime(datum) ";
186
					$sWhere .= $r . " LIKE '%" . mysql_real_escape_string($GET['sSearch_' . $i]) .
187
					$sWhere .= $r . " LIKE '%" . $this->order_db->escape($this->input->get('sSearch_' .
187
						"%' ";
188
						$i)) . "%' ";
188
				} else {
189
				} else {
Zeile 189... Zeile 190...
189
					$sWhere .= $r . " LIKE '%" . mysql_real_escape_string($GET['sSearch_' . $i]) .
190
					$sWhere .= $r . " LIKE '%" . $this->order_db->escape($this->input->get('sSearch_' .
190
						"%' ";
191
						$i)) . "%' ";
Zeile 211... Zeile 212...
211
 
212
 
212
                    $sOrder
213
                    $sOrder
213
                        $sLimit
214
                        $sLimit
214
                ";
215
                ";
215
		//echo $sQuery;
216
		//echo $sQuery;
Zeile 216... Zeile 217...
216
		$rResult = mysql_query($sQuery);
217
		$rResult = $this->order_db->query($sQuery);
217
 
218
 
218
		/* Data set length after filtering */
219
		/* Data set length after filtering */
219
		$sQuery = "
220
		$sQuery = "