* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * http://www.gnu.org/copyleft/gpl.html * */ require_once('includes/common.php'); require_once('includes/SI_UserType.php'); checkLogin("admin"); $user_type = new SI_UserType(); $user_types = SI_UserType::retrieveSet(); if($user_types === FALSE){ $error_msg = "Error getting user types!\n"; debug_message($user_type->getLastError()); } $title = "User Type Administration"; require('header.php') ?> <div class="tableContainer"> <a href="javascript:;" class="tCollapse" onclick="toggleGrid(this)"><img src="images/arrow_down.jpg" alt="Hide table" />User types</a><div> <div class="gridToolbar"> <a href="user_type.php?mode=add" style="background-image:url(images/new_invoice.png);">New user type</a> </div> <table border="0" cellspacing="0" cellpadding="0"> <tr>
function get($id = NULL){ global $db_conn; if(!isset($id)){ $id = $this->id; } if(!isset($id)){ $this->error = "SI_UserType::get() : UserType id not set\n"; return FALSE; } $UserType = SI_UserType::retrieveSet("WHERE id = $id", TRUE); if($UserType === FALSE){ return FALSE; } if(isset($UserType[0])){ $this->_populateData($UserType[0]); $this->stripSlashes(); }else{ $this->error = "SI_UserType::get() : No data retrieved from query\n"; return FALSE; } return TRUE; }