Permalink
Browse files

-

  • Loading branch information...
project29k committed May 12, 2012
1 parent be629ac commit fb1e0a1578bea2fe9a0096a493d4e4d2f7e3c60f
Showing with 767 additions and 1,068 deletions.
  1. +34 −33 application/controllers/axipi_dynamic/components.php
  2. +52 −51 application/controllers/axipi_dynamic/groups.php
  3. +27 −30 application/controllers/axipi_dynamic/hosts.php
  4. +90 −42 application/controllers/axipi_dynamic/items.php
  5. +44 −47 application/controllers/axipi_dynamic/items_relations.php
  6. +42 −45 application/controllers/axipi_dynamic/items_zones.php
  7. +48 −47 application/controllers/axipi_dynamic/languages.php
  8. +34 −34 application/controllers/axipi_dynamic/layouts.php
  9. +45 −44 application/controllers/axipi_dynamic/permissions.php
  10. +41 −40 application/controllers/axipi_dynamic/sections.php
  11. +38 −38 application/controllers/axipi_dynamic/users.php
  12. +41 −40 application/controllers/axipi_dynamic/zones.php
  13. +1 −0 application/hooks/axipi_hook.php
  14. +3 −1 application/models/axipi_dynamic/items_model.php
  15. +1 −1 application/views/axipi.php
  16. +3 −15 application/views/axipi_dynamic/components/components_delete.php
  17. +3 −3 application/views/axipi_dynamic/components/components_index.php
  18. +3 −13 application/views/axipi_dynamic/components/components_read.php
  19. +2 −14 application/views/axipi_dynamic/components/components_update.php
  20. +3 −15 application/views/axipi_dynamic/groups/groups_delete.php
  21. +3 −3 application/views/axipi_dynamic/groups/groups_index.php
  22. +7 −17 application/views/axipi_dynamic/groups/groups_read.php
  23. +2 −14 application/views/axipi_dynamic/groups/groups_update.php
  24. +4 −16 application/views/axipi_dynamic/hosts/hosts_delete.php
  25. +3 −3 application/views/axipi_dynamic/hosts/hosts_index.php
  26. +6 −18 application/views/axipi_dynamic/hosts/hosts_read.php
  27. +4 −16 application/views/axipi_dynamic/hosts/hosts_update.php
  28. +5 −1 application/views/axipi_dynamic/items/items_create.php
  29. +3 −15 application/views/axipi_dynamic/items/items_delete.php
  30. +3 −3 application/views/axipi_dynamic/items/items_index.php
  31. +10 −14 application/views/axipi_dynamic/items/items_read.php
  32. +9 −14 application/views/axipi_dynamic/items/items_update.php
  33. +1 −1 application/views/axipi_dynamic/items_relations/items_relations_create.php
  34. +3 −15 application/views/axipi_dynamic/items_relations/items_relations_delete.php
  35. +4 −4 application/views/axipi_dynamic/items_relations/items_relations_index.php
  36. +1 −13 application/views/axipi_dynamic/items_relations/items_relations_read.php
  37. +2 −14 application/views/axipi_dynamic/items_relations/items_relations_update.php
  38. +1 −1 application/views/axipi_dynamic/items_zones/items_zones_create.php
  39. +3 −15 application/views/axipi_dynamic/items_zones/items_zones_delete.php
  40. +4 −4 application/views/axipi_dynamic/items_zones/items_zones_index.php
  41. +1 −13 application/views/axipi_dynamic/items_zones/items_zones_read.php
  42. +2 −14 application/views/axipi_dynamic/items_zones/items_zones_update.php
  43. +3 −15 application/views/axipi_dynamic/languages/languages_delete.php
  44. +3 −3 application/views/axipi_dynamic/languages/languages_index.php
  45. +3 −13 application/views/axipi_dynamic/languages/languages_read.php
  46. +2 −14 application/views/axipi_dynamic/languages/languages_update.php
  47. +3 −15 application/views/axipi_dynamic/layouts/layouts_delete.php
  48. +3 −3 application/views/axipi_dynamic/layouts/layouts_index.php
  49. +3 −13 application/views/axipi_dynamic/layouts/layouts_read.php
  50. +2 −14 application/views/axipi_dynamic/layouts/layouts_update.php
  51. +3 −15 application/views/axipi_dynamic/permissions/permissions_delete.php
  52. +3 −3 application/views/axipi_dynamic/permissions/permissions_index.php
  53. +7 −17 application/views/axipi_dynamic/permissions/permissions_read.php
  54. +2 −14 application/views/axipi_dynamic/permissions/permissions_update.php
  55. +3 −15 application/views/axipi_dynamic/sections/sections_delete.php
  56. +3 −3 application/views/axipi_dynamic/sections/sections_index.php
  57. +9 −19 application/views/axipi_dynamic/sections/sections_read.php
  58. +2 −14 application/views/axipi_dynamic/sections/sections_update.php
  59. +3 −15 application/views/axipi_dynamic/users/users_delete.php
  60. +3 −3 application/views/axipi_dynamic/users/users_index.php
  61. +1 −13 application/views/axipi_dynamic/users/users_read.php
  62. +2 −14 application/views/axipi_dynamic/users/users_update.php
  63. +3 −15 application/views/axipi_dynamic/zones/zones_delete.php
  64. +3 −3 application/views/axipi_dynamic/zones/zones_index.php
  65. +7 −17 application/views/axipi_dynamic/zones/zones_read.php
  66. +2 −14 application/views/axipi_dynamic/zones/zones_update.php
  67. +1 −1 application/views/site.php
  68. +10 −0 storage/items/index.html
  69. +10 −0 storage/items/itm_file/index.html
  70. +10 −0 storage/items/itm_medialarge/index.html
  71. +10 −0 storage/items/itm_mediamedium/index.html
  72. +10 −0 storage/items/itm_mediasmall/index.html
  73. +2 −2 system/libraries/Upload.php
@@ -6,12 +6,6 @@ function __construct() {
$this->load->language('axipi_dynamic');
$this->load->model('axipi_dynamic/components_model', '', true);
if($this->input->get('cmp_id')) {
$this->cmp_id = $this->input->get('cmp_id');
} else {
$this->cmp_id = 0;
}
}
public function index() {
$this->load->helper(array('form'));
@@ -80,19 +74,21 @@ public function create() {
$this->index();
}
}
public function read() {
if($this->cmp_id != 0) {
$data = array();
$data['cmp'] = $this->components_model->get_component($this->cmp_id);
public function read($cmp_id) {
$data = array();
$data['cmp'] = $this->components_model->get_component($cmp_id);
if($data['cmp']) {
$this->zones['content'] = $this->load->view('axipi_dynamic/components/components_read', $data, true);
} else {
$this->index();
}
}
public function update() {
if($this->cmp_id != 0) {
$this->load->helper(array('form'));
$this->load->library('form_validation');
$data = array();
$data['cmp'] = $this->components_model->get_component($this->cmp_id);
public function update($cmp_id) {
$this->load->helper(array('form'));
$this->load->library('form_validation');
$data = array();
$data['cmp'] = $this->components_model->get_component($cmp_id);
if($data['cmp']) {
$data['select_layout'] = $this->items_model->select_layout();
$this->form_validation->set_rules('cmp_code', 'lang:cmp_code', 'required|max_length[100]|callback_rule_cmp_code['.$data['cmp']->cmp_code.']');
@@ -110,32 +106,37 @@ public function update() {
$this->db->set('cmp_isrelation', checkbox2database($this->input->post('cmp_isrelation')));
$this->db->set('cmp_modifiedby', $this->usr->usr_id);
$this->db->set('cmp_datemodified', date('Y-m-d H:i:s'));
$this->db->where('cmp_id', $this->cmp_id);
$this->db->where('cmp_id', $cmp_id);
$this->db->update('cmp');
$this->msg[] = $this->lang->line('updated');
$this->index();
}
} else {
$this->index();
}
}
public function delete() {
if($this->cmp_id != 0) {
$this->load->helper(array('form'));
$this->load->library('form_validation');
$data = array();
$data['cmp'] = $this->components_model->get_component($this->cmp_id);
public function delete($cmp_id) {
$this->load->helper(array('form'));
$this->load->library('form_validation');
$data = array();
$data['cmp'] = $this->components_model->get_component($cmp_id);
if($data['cmp']) {
if($data['cmp']->cmp_islocked == 0) {
$this->form_validation->set_rules('confirm', 'lang:confirm', 'required');
$this->form_validation->set_rules('confirm', 'lang:confirm', 'required');
if($this->form_validation->run() == FALSE) {
$this->zones['content'] = $this->load->view('axipi_dynamic/components/components_delete', $data, true);
} else {
$this->db->where('cmp_id', $cmp_id);
$this->db->delete('cmp_stg');
if($this->form_validation->run() == FALSE) {
$this->zones['content'] = $this->load->view('axipi_dynamic/components/components_delete', $data, true);
$this->db->where('cmp_id', $cmp_id);
$this->db->where('cmp_islocked', 0);
$this->db->delete('cmp');
$this->msg[] = $this->lang->line('deleted');
$this->index();
}
} else {
$this->db->where('cmp_id', $this->cmp_id);
$this->db->delete('cmp_stg');
$this->db->where('cmp_id', $this->cmp_id);
$this->db->where('cmp_islocked', 0);
$this->db->delete('cmp');
$this->msg[] = $this->lang->line('deleted');
$this->index();
}
}
@@ -6,12 +6,6 @@ function __construct() {
$this->load->language('axipi_dynamic');
$this->load->model('axipi_dynamic/groups_model', '', true);
if($this->input->get('grp_id')) {
$this->grp_id = $this->input->get('grp_id');
} else {
$this->grp_id = 0;
}
}
public function index() {
$this->load->helper(array('form'));
@@ -55,7 +49,7 @@ public function create() {
$this->load->helper(array('form'));
$this->load->library('form_validation');
$data = array();
$data['translations'] = $this->groups_model->get_translations($this->grp_id);
$data['translations'] = $this->groups_model->get_translations(0);
$this->form_validation->set_rules('grp_code', 'lang:grp_code', 'required|max_length[100]|callback_rule_grp_code');
$this->form_validation->set_rules('grp_isitem', 'lang:grp_isitem');
@@ -89,21 +83,23 @@ public function create() {
$this->index();
}
}
public function read() {
if($this->grp_id != 0) {
$data = array();
$data['grp'] = $this->groups_model->get_group($this->grp_id);
$data['translations'] = $this->groups_model->get_translations($this->grp_id);
public function read($grp_id) {
$data = array();
$data['grp'] = $this->groups_model->get_group($grp_id);
if($data['grp']) {
$data['translations'] = $this->groups_model->get_translations($grp_id);
$this->zones['content'] = $this->load->view('axipi_dynamic/groups/groups_read', $data, true);
} else {
$this->index();
}
}
public function update() {
if($this->grp_id != 0) {
$this->load->helper(array('form'));
$this->load->library('form_validation');
$data = array();
$data['grp'] = $this->groups_model->get_group($this->grp_id);
$data['translations'] = $this->groups_model->get_translations($this->grp_id);
public function update($grp_id) {
$this->load->helper(array('form'));
$this->load->library('form_validation');
$data = array();
$data['grp'] = $this->groups_model->get_group($grp_id);
if($data['grp']) {
$data['translations'] = $this->groups_model->get_translations($grp_id);
$this->form_validation->set_rules('grp_code', 'lang:grp_code', 'required|max_length[100]|callback_rule_grp_code['.$data['grp']->grp_code.']');
$this->form_validation->set_rules('grp_isitem', 'lang:grp_isitem');
@@ -122,17 +118,17 @@ public function update() {
$this->db->set('grp_ispermission', checkbox2database($this->input->post('grp_ispermission')));
$this->db->set('grp_modifiedby', $this->usr->usr_id);
$this->db->set('grp_datemodified', date('Y-m-d H:i:s'));
$this->db->where('grp_id', $this->grp_id);
$this->db->where('grp_id', $grp_id);
$this->db->update('grp');
foreach($data['translations'] as $trl) {
$this->db->set('grp_trl_title', $this->input->post('title'.$trl->lng_id));
if($trl->grp_id) {
$this->db->where('grp_id', $this->grp_id);
$this->db->where('grp_id', $grp_id);
$this->db->where('lng_id', $trl->lng_id);
$this->db->update('grp_trl');
} else {
$this->db->set('grp_id', $this->grp_id);
$this->db->set('grp_id', $grp_id);
$this->db->set('lng_id', $trl->lng_id);
$this->db->insert('grp_trl');
}
@@ -141,38 +137,43 @@ public function update() {
$this->msg[] = $this->lang->line('updated');
$this->index();
}
} else {
$this->index();
}
}
public function delete() {
if($this->grp_id != 0) {
$this->load->helper(array('form'));
$this->load->library('form_validation');
$data = array();
$data['grp'] = $this->groups_model->get_group($this->grp_id);
$this->form_validation->set_rules('confirm', 'lang:confirm', 'required');
if($this->form_validation->run() == FALSE) {
$this->zones['content'] = $this->load->view('axipi_dynamic/groups/groups_delete', $data, true);
public function delete($grp_id) {
$this->load->helper(array('form'));
$this->load->library('form_validation');
$data = array();
$data['grp'] = $this->groups_model->get_group($grp_id);
if($data['grp']) {
if($data['grp']->grp_islocked == 0) {
$this->form_validation->set_rules('confirm', 'lang:confirm', 'required');
if($this->form_validation->run() == FALSE) {
$this->zones['content'] = $this->load->view('axipi_dynamic/groups/groups_delete', $data, true);
} else {
$this->db->where('grp_id', $grp_id);
$this->db->delete('grp_itm');
$this->db->where('grp_id', $grp_id);
$this->db->delete('grp_trl');
$this->db->where('grp_id', $grp_id);
$this->db->where('grp_per_islocked', 0);
$this->db->delete('grp_per');
$this->db->where('grp_id', $grp_id);
$this->db->where('grp_usr_islocked', 0);
$this->db->delete('grp_usr');
$this->db->where('grp_id', $grp_id);
$this->db->where('grp_islocked', 0);
$this->db->delete('grp');
$this->msg[] = $this->lang->line('deleted');
$this->index();
}
} else {
$this->db->where('grp_id', $this->grp_id);
$this->db->delete('grp_itm');
$this->db->where('grp_id', $this->grp_id);
$this->db->delete('grp_trl');
$this->db->where('grp_id', $this->grp_id);
$this->db->where('grp_per_islocked', 0);
$this->db->delete('grp_per');
$this->db->where('grp_id', $this->grp_id);
$this->db->where('grp_usr_islocked', 0);
$this->db->delete('grp_usr');
$this->db->where('grp_id', $this->grp_id);
$this->db->where('grp_islocked', 0);
$this->db->delete('grp');
$this->msg[] = $this->lang->line('deleted');
$this->index();
}
}
@@ -6,12 +6,6 @@ function __construct() {
$this->load->language('axipi_dynamic');
$this->load->model('axipi_dynamic/hosts_model', '', true);
if($this->input->get('hst_id')) {
$this->hst_id = $this->input->get('hst_id');
} else {
$this->hst_id = 0;
}
}
public function index() {
$this->load->helper(array('form'));
@@ -60,7 +54,7 @@ public function create() {
$data = array();
$data['select_layout'] = $this->hosts_model->select_layout();
$data['select_hst_trl_defaultitem'] = $this->hosts_model->select_hst_trl_defaultitem();
$data['translations'] = $this->hosts_model->get_translations($this->hst_id);
$data['translations'] = $this->hosts_model->get_translations(0);
$this->form_validation->set_rules('hst_code', 'lang:hst_code', 'required|max_length[100]|callback_rule_hst_code');
$this->form_validation->set_rules('hst_url', 'lang:hst_url', 'required|max_length[255]');
@@ -98,23 +92,25 @@ public function create() {
$this->index();
}
}
public function read() {
if($this->hst_id != 0) {
$data = array();
$data['hst'] = $this->hosts_model->get_host($this->hst_id);
$data['translations'] = $this->hosts_model->get_translations($this->hst_id);
public function read($hst_id) {
$data = array();
$data['hst'] = $this->hosts_model->get_host($hst_id);
if($data['hst']) {
$data['translations'] = $this->hosts_model->get_translations($hst_id);
$this->zones['content'] = $this->load->view('axipi_dynamic/hosts/hosts_read', $data, true);
} else {
$this->index();
}
}
public function update() {
if($this->hst_id != 0) {
$this->load->helper(array('form'));
$this->load->library('form_validation');
$data = array();
$data['hst'] = $this->hosts_model->get_host($this->hst_id);
public function update($hst_id) {
$this->load->helper(array('form'));
$this->load->library('form_validation');
$data = array();
$data['hst'] = $this->hosts_model->get_host($hst_id);
if($data['hst']) {
$data['select_layout'] = $this->hosts_model->select_layout();
$data['select_hst_trl_defaultitem'] = $this->hosts_model->select_hst_trl_defaultitem();
$data['translations'] = $this->hosts_model->get_translations($this->hst_id);
$data['translations'] = $this->hosts_model->get_translations($hst_id);
$this->form_validation->set_rules('hst_code', 'lang:hst_code', 'required|max_length[100]|callback_rule_hst_code['.$data['hst']->hst_code.']');
$this->form_validation->set_rules('hst_url', 'lang:hst_url', 'required|max_length[255]');
@@ -137,17 +133,17 @@ public function update() {
$this->db->set('hst_debug', checkbox2database($this->input->post('hst_debug')));
$this->db->set('hst_modifiedby', $this->usr->usr_id);
$this->db->set('hst_datemodified', date('Y-m-d H:i:s'));
$this->db->where('hst_id', $this->hst_id);
$this->db->where('hst_id', $hst_id);
$this->db->update('hst');
foreach($data['translations'] as $trl) {
$this->db->set('hst_trl_defaultitem', $this->input->post('defaultitem'.$trl->lng_id));
if($trl->hst_id) {
$this->db->where('hst_id', $this->hst_id);
$this->db->where('hst_id', $hst_id);
$this->db->where('lng_id', $trl->lng_id);
$this->db->update('hst_trl');
} else {
$this->db->set('hst_id', $this->hst_id);
$this->db->set('hst_id', $hst_id);
$this->db->set('lng_id', $trl->lng_id);
$this->db->insert('hst_trl');
}
@@ -156,12 +152,14 @@ public function update() {
$this->msg[] = $this->lang->line('updated');
$this->index();
}
} else {
$this->index();
}
}
public function delete() {
if($this->hst_id != 0) {
$data = array();
$data['hst'] = $this->hosts_model->get_host($this->hst_id);
public function delete($hst_id) {
$data = array();
$data['hst'] = $this->hosts_model->get_host($hst_id);
if($data['hst']) {
if($data['hst']->hst_islocked == 0) {
$this->load->helper(array('form'));
$this->load->library('form_validation');
@@ -170,18 +168,17 @@ public function delete() {
if($this->form_validation->run() == FALSE) {
$this->zones['content'] = $this->load->view('axipi_dynamic/hosts/hosts_delete', $data, true);
} else {
$this->db->where('hst_id', $this->hst_id);
$this->db->where('hst_id', $hst_id);
$this->db->delete('hst_trl');
$this->db->where('hst_id', $this->hst_id);
$this->db->where('hst_id', $hst_id);
$this->db->where('hst_islocked', 0);
$this->db->delete('hst');
$this->msg[] = $this->lang->line('deleted');
$this->index();
}
} else {
$this->zones['content'] = '';
$this->msg[] = $this->lang->line('nopermission');
$this->index();
}
}
}
Oops, something went wrong.

0 comments on commit fb1e0a1

Please sign in to comment.