%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
<?php class Titles_model extends CI_Model { public function __construct() { parent::__construct(); } public function setSeoPageTranslations($post) { $i = 0; foreach ($post['pages'] as $page) { foreach ($post['translations'] as $abbr) { $this->db->where('abbr', $abbr); $this->db->where('page_type', $page); $num_rows = $this->db->count_all_results('seo_pages_translations'); if ($num_rows == 0) { if (!$this->db->insert('seo_pages_translations', array( 'page_type' => $page, 'abbr' => $abbr, 'title' => $post['title'][$i], 'description' => $post['description'][$i] ))) { log_message('error', print_r($this->db->error(), true)); show_error(lang('database_error')); } } else { $this->db->where('abbr', $abbr); $this->db->where('page_type', $page); if (!$this->db->update('seo_pages_translations', array( 'title' => $post['title'][$i], 'description' => $post['description'][$i] ))) { log_message('error', print_r($this->db->error(), true)); show_error(lang('database_error')); } } $i++; } } } public function getSeoTranslations() { $result = $this->db->get('seo_pages_translations'); $arr = array(); foreach ($result->result_array() as $row) { $arr[$row['page_type']][$row['abbr']]['title'] = $row['title']; $arr[$row['page_type']][$row['abbr']]['description'] = $row['description']; } return $arr; } public function getSeoPages() { $result = $this->db->get('seo_pages'); return $result->result_array(); } }