[eluser]Lazos[/eluser]
I have this LOOP in my script. I was wondering if that will make the website really slow or PHP/Apache will handle them without a problem. Let's say for example this loop it will execute 30 times every time I visit the particular page.
What do you think?
Code:
function deleteContent ($array) {
if (array_key_exists('Remove Pages', $this->groupperms) && (array_key_exists('Modify Any Page', $this->groupperms)) && (!$this->CI->contentmodel->hasChild($array['content_id'])) && (!$this->CI->contentmodel->getOwnership($array['content_id'], $this->userid))) {
return '<a href="deletecontent.php?content_id='.$array['content_id'].'">'.$this->CI->admin_theme->displayImage('images/admin/icons/system/delete.gif', $this->CI->lang->line('delete'), '', '','systemicon').'</a>';
} else
{
if (!array_key_exists('Remove Pages', $this->groupperms) && (!array_key_exists('Modify Any Page', $this->groupperms)) && (!$this->CI->contentmodel->hasChild($array['content_id'])) && (!$this->CI->contentmodel->getOwnership($array['content_id'], $this->userid))) {
return '<a href="deletecontent.php?content_id='.$array['content_id'].'">'.$this->CI->admin_theme->displayImage('images/admin/icons/system/delete.gif', $this->CI->lang->line('delete'), '', '','systemicon').'</a>';
} else
{
if (!array_key_exists('Remove Pages', $this->groupperms) && (!array_key_exists('Modify Any Page', $this->groupperms)) && ($this->CI->contentmodel->hasChild($array['content_id'])) && (!$this->CI->contentmodel->getOwnership($array['content_id'], $this->userid))) {
return '<a href="deletecontent.php?content_id='.$array['content_id'].'">'.$this->CI->admin_theme->displayImage('images/admin/icons/system/delete.gif', $this->CI->lang->line('delete'), '', '','systemicon').'</a>';
} else
{
if (array_key_exists('Remove Pages', $this->groupperms) && (array_key_exists('Modify Any Page', $this->groupperms)) && ($this->CI->contentmodel->hasChild($array['content_id']))) {
return '<a href="deletecontent.php?content_id='.$array['content_id'].'">'.$this->CI->admin_theme->displayImage('images/admin/icons/system/delete.gif', $this->CI->lang->line('delete'), '', '','systemicon').'</a>';
}
}
}
}
}