'Add Info Users', 'URL' => get_admin_plugin_menu_link(ADDINFOUSERS_PATH . 'admin/admin.php'))); return $menu; } //add prefiter add_event_handler('loc_begin_admin', 'adddinfousersPIL', 55 ); function adddinfousersPIL() { global $template, $prefixeTable, $conf, $page ; $template->set_prefilter('user_list', 'adddinfousersPTL'); } function adddinfousersPTL($content, &$smarty) { load_language('plugin.lang', ADDINFOUSERS_PATH); load_language('lang', PHPWG_ROOT_PATH.'local/', array('no_fallback'=>true, 'local'=>true) ); $search = '
{\'Properties\'|translate}
'; return str_replace($search, $search."\n".'{\'addinfousers_complete\'|@translate}'."\n", $content); } add_event_handler('loc_begin_admin', 'adddinfousersPI', 55 ); function adddinfousersPI() { load_language('plugin.lang', ADDINFOUSERS_PATH); load_language('lang', PHPWG_ROOT_PATH.'local/', array('no_fallback'=>true, 'local'=>true) ); global $template, $prefixeTable; $template->set_prefilter('profile_content', 'adddinfousersPT'); $template->set_filename('profile_add', realpath(ADDINFOUSERS_PATH.'profile_add.tpl')); if (isset($_GET['user_id'])) { $query = ' select id,info1,info2,info3,info4,info5,info6,info7 FROM ' . ADDINFOUSERS_TABLE . ' WHERE id = '.$_GET['user_id'].' ;'; $result = pwg_query($query); $row = pwg_db_fetch_assoc($result); $idaddinfo=$row['id']; $info1=$row['info1']; $info2=$row['info2']; $info3=$row['info3']; $info4=$row['info4']; $info5=$row['info5']; $info6=$row['info6']; $info7=$row['info7']; $template->assign( array( 'AICONTENTID' => $_GET['user_id'], 'AICONTENT' => htmlspecialchars($info1), 'AICONTENT2' => htmlspecialchars($info2), 'AICONTENT3' => htmlspecialchars($info3), 'AICONTENT4' => htmlspecialchars($info4), 'AICONTENT5' => htmlspecialchars($info5), 'AICONTENT6' => htmlspecialchars($info6), 'AICONTENT7' => htmlspecialchars($info7), )); } $template->assign_var_from_handle('PROFILE_ADD', 'profile_add'); } function adddinfousersPT($content, &$smarty) { $search = '

'; return str_replace($search, '{$PROFILE_ADD}'."\n".$search, $content); } function adddinfousersPI2() { load_language('plugin.lang', ADDINFOUSERS_PATH); load_language('lang', PHPWG_ROOT_PATH.'local/', array('no_fallback'=>true, 'local'=>true) ); } add_event_handler('save_profile_from_post', 'addInfousersPT2'); function addInfousersPT2() { global $prefixeTable,$conf; $query = ' DELETE FROM ' . ADDINFOUSERS_TABLE . ' WHERE id = '.$_POST['inserID'].' ;'; $result = pwg_query($query); $q = ' INSERT INTO ' . $prefixeTable . 'AddInfo_users(id,info1,info2,info3,info4,info5,info6,info7)VALUES ("'.$_POST['inserID'].'","'.$_POST['inser'].'","'.$_POST['inser2'].'","'.$_POST['inser3'].'","'.$_POST['inser4'].'","'.$_POST['inser5'].'","'.$_POST['inser6'].'","'.$_POST['inser7'].'");'; pwg_query($q); } add_event_handler('delete_user', 'addInfousersPT3'); function addInfousersPT3($user_id) { global $prefixeTable; $query = ' DELETE FROM ' . ADDINFOUSERS_TABLE . ' WHERE id = '.$user_id.' ;'; $result = pwg_query($query); } ?>