//$data['_extraModule']=array(array('User Module','userModule')); $_data = $obj->getByID_v2($id); //var_dump($_data); $upload_dir = UPLOADS_DIR . 'Organization/'; $data['upload_dir'] = $upload_dir; $data['uploadUrl'] = '../uploads/Organization/'; /***************** END of these fields are required ************************************/ /** * $fields_post :: This list is the list of all fields which are affected while inserting in database **/ $fields_post = array('title', 'rights'); /** * $fields_edit :: This list is the list of all fields which are affected while updating database **/ $fields_edit = $fields_post; /** * generalprocess :: This will handle CRUD model **/ if (isset($_POST['rights'])) { $objUserModule = new userModule(); #var_dump($objUserModule->getCurrentRight()); #var_dump($_POST); if ($_POST['rights'] > $objUserModule->getCurrentRight() || $_POST['rights'] > 100) { $_POST['rights'] = 0; } //var_dump($_POST); } include_once ADMIN_TPL_MODULE . 'includes/generalprocess_v2.php'; /** * other Process :: You can add code here for further Special processing **/
//var_dump($data); $data['_extraModule'] = array(array('User Module', 'userModule'), array('ResetPassword', 'resetPass')); $_data = $obj->getById($id); $upload_dir = UPLOADS_DIR . 'Organization/'; $data['upload_dir'] = $upload_dir; $data['uploadUrl'] = '../uploads/Organization/'; /* * *************** END of these fields are required *********************************** */ /** * $fields_post :: This list is the list of all fields which are affected while inserting in database * */ $fields_post = array('username', 'email', 'us00uin'); /** * $fields_edit :: This list is the list of all fields which are affected while updating database * */ $fields_edit = $fields_post; /** * generalprocess :: This will handle CRUD model * */ if (isset($_POST['us00uin'])) { $objUserModule = new userModule(); #var_dump($objUserModule->getCurrentRight()); #var_dump($_POST); if ($_POST['us00uin'] > $objUserModule->getCurrentRight()) { $_POST['us00uin'] = 0; } //var_dump($_POST); } include_once ADMIN_TPL_MODULE . 'includes/generalprocess_v3.php'; /** * other Process :: You can add code here for further Special processing * */
$data['prefix'] = $prefix; $module_Title = 'User Modules'; $data['module_Title'] = $module_Title; $data['table'] = $table; $message = ''; $data['message'] = ''; $_id = $prefix . 'uin'; $data['_id'] = $_id; //$id=0; //$data['MyModules']=$MyModules ; /** * $field_list :: This list is the list of all fields to be used for various puropse **/ $field_list = array('uin', 'set02uin', 'us01uin', 'view', 'add', 'delete'); //$obj=PrepareModule($prefix,$table,$field_list); $obj = new userModule(); $data['field_list'] = $field_list; if (isset($_GET['_Id'])) { $data['_data'] = $obj->get($prefix . 'us01uin =' . $id, $_id . ' desc'); //var_dump($data['_data']); $data['list_fields'] = array('UIN' => 'uin', 'View' => 'view', 'Add/Edit' => 'add', 'Delete' => 'delete'); } //$_data=$obj->getByID_v2($id); $upload_dir = UPLOADS_DIR . 'Organization/'; $data['upload_dir'] = $upload_dir; $data['uploadUrl'] = '../uploads/Organization/'; /***************** END of these fields are required ************************************/ /** * $fields_post :: This list is the list of all fields which are affected while inserting in database **/ $fields_post = array('title', 'detail');
<?php /** * @author Arun Rajthala * @copyright 2011 * */ require_once '../system/config.php'; require '../system/UserModule.php'; //Connect(); $currUser = new Users(); $myDb = new PDODatabase(); $objUserModule = new userModule(); $data['objUserModule'] = $objUserModule; $CrossResult = false; $data['MyModules'] = array(); //var_dump($objUserModule); $strModule = getREQUEST('module'); //echo $strModule; if ($strModule) { $CrossResult = $objUserModule->CrossCheck($strModule); //var_dump($CrossResult);die(); if (!$CrossResult[0]) { $strModule = UNAUTHORIZED; } else { //echo 'i m true'; //die(); if (!$CrossResult[ACCESS_VIEW]) { //var_dump(getREQUEST('action')); //if() $strModule = UNAUTHORIZED; if (getREQUEST('action') == '') {
} ?> " name="<?php echo 'email'; ?> "> </td> </tr> <tr> <td> <label >Access Level: </label> </td> <td> <select name="us01uin" class="input_field"> <?php $dbUserModule = new userModule(); $SQL = "SELECT * FROM us00usertype where us00rights < " . $dbUserModule->getCurrentRight(); $userTypes = Query($SQL); foreach ($userTypes as $row1) { $selected = ''; if ($row1['us00uin'] == $_data['us01us00uin']) { $selected = 'selected'; } echo '<option ' . $selected . ' value="' . $row1['us00uin'] . '">' . $row1['us00title'] . '</option>'; } ?> </select> </td> </tr> <tr>
<?php /* $table='us02modules'; $prefix='us02'; $_id='us02uin'; $_fields=array($prefix.'uin', $prefix.'view',$prefix.'add',$prefix.'delete'); $db=new PDODatabase(); $db->setMasterData($table,$_fields,$prefix);*/ $db = new userModule(); $objMsg = new Message(); $prefix = $db->getPrefix(); $id = 0; if (isset($_GET['_Id'])) { $id = $_GET['_Id']; $data = $db->getByID($id); } if ($id == 0) { //echo 'inserting'; $db->setFieldValues('us01uin', getREQUEST('userId')); $db->setFieldValues('set02uin', getREQUEST('mod_id')); $id = $db->insert_core(); if ($id > 0) { $objMsg->set('Update Successfull'); //echo 'inserted'; } //die(); //redirect('?module=News'); } //var_dump($data);