Subversion-Projekte lars-tiefland.ci

Revision

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

Revision 1432 Revision 1437
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: 1432 $
8
 * @version $Rev: 1437 $
9
 */
9
 */
Zeile 10... Zeile 10...
10
 
10
 
11
class Order_model extends CI_Model
11
class Order_model extends CI_Model
12
{
12
{
Zeile 18... Zeile 18...
18
		$this->load->model('dokumente_model', 'dokumente');
18
		$this->load->model('dokumente_model', 'dokumente');
19
	}
19
	}
Zeile 20... Zeile 20...
20
 
20
 
21
	public function get_list($start = 0)
21
	public function get_list($start = 0)
-
 
22
	{
22
	{
23
		$update = $this->input->post('update');
23
		$filter = $this->session->filter;
24
		$filter = $this->session->filter;
24
		switch ($filter['versandstatus'])
25
		switch ($filter['versandstatus'])
25
		{
26
		{
26
			case 1:
27
			case 1:
Zeile 502... Zeile 503...
502
		//$order = "Bestellung DESC";
503
		//$order = "Bestellung DESC";
503
		if ($filter["fremd_ID"] || $filter["bestellung_ID"])
504
		if ($filter["fremd_ID"] || $filter["bestellung_ID"])
504
		{
505
		{
505
			$limit = "";
506
			$limit = "";
506
		}
507
		}
-
 
508
		elseif($update["next"]||$update["prev"])
-
 
509
		{
-
 
510
			$limit = "LIMIT 1";
-
 
511
		}
507
		else
512
		else
508
		{
513
		{
509
			$limit = "LIMIT ".$start.", 100";
514
			$limit = "LIMIT ".$start.", 100";
510
		}
515
		}
Zeile 573... Zeile 578...
573
				ba.id=b.bestellart_id
578
				ba.id=b.bestellart_id
574
			WHERE
579
			WHERE
575
				".implode(" AND ", $sql_filter)."
580
				".implode(" AND ", $sql_filter)."
576
			ORDER BY
581
			ORDER BY
577
				b.id DESC
582
				b.id DESC
578
			LIMIT
583
			".$limit."
579
				100
-
 
580
		";
584
		";
581
		$res = $GLOBALS['order_db']->query($sql);
585
		$res = $GLOBALS['order_db']->query($sql);
582
		echo $sql;
586
		echo $sql;
583
		$sql_anz = "SELECT
587
		$sql_anz = "SELECT
584
				FOUND_ROWS() AS total
588
				FOUND_ROWS() AS total