Changeset 31841
- Timestamp:
- Jun 6, 2017, 11:31:27 AM (7 years ago)
- Location:
- extensions/user_custom_fields
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/user_custom_fields/admin.php
r31542 r31841 3 3 // | User Custom Fields plugin for Piwigo | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2016 ddtddthttp://temmii.com/piwigo/ |5 // | Copyright(C) 2016-2017 ddtddt http://temmii.com/piwigo/ | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | This program is free software; you can redistribute it and/or modify | … … 22 22 if (!defined('PHPWG_ROOT_PATH')) 23 23 die('Hacking attempt!'); 24 global $template, $conf, $user ;24 global $template, $conf, $user, $prefixeTable; 25 25 include_once(PHPWG_ROOT_PATH . 'admin/include/tabsheet.class.php'); 26 26 $my_base_url = get_admin_plugin_menu_link(__FILE__); … … 71 71 'UCFADMINONLY' => $user_custom_fields['adminonly'], 72 72 'UCFOBLIGATORY' => $user_custom_fields['obligatory'], 73 'U_DELETE' => $admin_base_url . '&delete=' . $user_custom_fields['id_ucf'], 73 74 'U_HIDE' => $admin_base_url . '&hide=' . $user_custom_fields['id_ucf'], 74 75 'U_SHOW' => $admin_base_url . '&show=' . $user_custom_fields['id_ucf'], … … 203 204 pwg_query($query); 204 205 } 206 /*Import information *AA */ 207 $exp = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'AddInfousers';")); 208 if($exp['state']=='active'){ 209 $template->assign( 210 'gestImp', 211 array( 212 'yep'=>l10n('yep'), 213 )); 214 } 215 if (isset($_POST['submitimport'])){ 216 217 $iducf=pwg_db_fetch_assoc(pwg_query('SELECT id_ucf FROM ' . UCF_TABLE . ' ORDER BY id_ucf DESC LIMIT 1;')); 218 219 220 $iducf=$iducf['id_ucf']; 221 $iducf1=$iducf+1;$iducf2=$iducf+2;$iducf3=$iducf+3;$iducf4=$iducf+4;$iducf5=$iducf+5;$iducf6=$iducf+6;$iducf7=$iducf+7; 222 $q = 'INSERT INTO ' . $prefixeTable . 'user_custom_fields(id_ucf,wording,order_ucf,active,edit,adminonly,obligatory)VALUES ('.$iducf1.',"infos1",'.$iducf1.',1,1,0,1);'; 223 pwg_query($q); 224 $q = 'INSERT INTO ' . $prefixeTable . 'user_custom_fields(id_ucf,wording,order_ucf,active,edit,adminonly,obligatory)VALUES ('.$iducf2.',"infos2",'.$iducf2.',1,1,0,1);'; 225 pwg_query($q); 226 $q = 'INSERT INTO ' . $prefixeTable . 'user_custom_fields(id_ucf,wording,order_ucf,active,edit,adminonly,obligatory)VALUES ('.$iducf3.',"infos3",'.$iducf3.',1,1,0,1);'; 227 pwg_query($q); 228 $q = 'INSERT INTO ' . $prefixeTable . 'user_custom_fields(id_ucf,wording,order_ucf,active,edit,adminonly,obligatory)VALUES ('.$iducf4.',"infos4",'.$iducf4.',1,1,0,1);'; 229 pwg_query($q); 230 $q = 'INSERT INTO ' . $prefixeTable . 'user_custom_fields(id_ucf,wording,order_ucf,active,edit,adminonly,obligatory)VALUES ('.$iducf5.',"infos5",'.$iducf5.',1,1,0,1);'; 231 pwg_query($q); 232 $q = 'INSERT INTO ' . $prefixeTable . 'user_custom_fields(id_ucf,wording,order_ucf,active,edit,adminonly,obligatory)VALUES ('.$iducf6.',"infos6",'.$iducf6.',1,1,0,1);'; 233 pwg_query($q); 234 $q = 'INSERT INTO ' . $prefixeTable . 'user_custom_fields(id_ucf,wording,order_ucf,active,edit,adminonly,obligatory)VALUES ('.$iducf7.',"infos7",'.$iducf7.',1,1,0,1);'; 235 pwg_query($q); 236 237 238 $query = 'SELECT * FROM '. $prefixeTable . 'addinfo_users;'; 239 $result = pwg_query($query); 240 if (pwg_db_num_rows($result)) { 241 while ($info = pwg_db_fetch_assoc($result)){ 242 $q = 'INSERT INTO ' . $prefixeTable . 'user_custom_fields_data(id_user,id_ucf,data)VALUES ('.$info['id'].','.$iducf1.',"'.htmlspecialchars($info['info1']).'");'; 243 pwg_query($q); 244 $q = 'INSERT INTO ' . $prefixeTable . 'user_custom_fields_data(id_user,id_ucf,data)VALUES ('.$info['id'].','.$iducf2.',"'.htmlspecialchars($info['info2']).'");'; 245 pwg_query($q); 246 $q = 'INSERT INTO ' . $prefixeTable . 'user_custom_fields_data(id_user,id_ucf,data)VALUES ('.$info['id'].','.$iducf3.',"'.htmlspecialchars($info['info3']).'");'; 247 pwg_query($q); 248 $q = 'INSERT INTO ' . $prefixeTable . 'user_custom_fields_data(id_user,id_ucf,data)VALUES ('.$info['id'].','.$iducf4.',"'.htmlspecialchars($info['info4']).'");'; 249 pwg_query($q); 250 $q = 'INSERT INTO ' . $prefixeTable . 'user_custom_fields_data(id_user,id_ucf,data)VALUES ('.$info['id'].','.$iducf5.',"'.htmlspecialchars($info['info5']).'");'; 251 pwg_query($q); 252 $q = 'INSERT INTO ' . $prefixeTable . 'user_custom_fields_data(id_user,id_ucf,data)VALUES ('.$info['id'].','.$iducf6.',"'.htmlspecialchars($info['info6']).'");'; 253 pwg_query($q); 254 $q = 'INSERT INTO ' . $prefixeTable . 'user_custom_fields_data(id_user,id_ucf,data)VALUES ('.$info['id'].','.$iducf7.',"'.htmlspecialchars($info['info7']).'");'; 255 pwg_query($q); 256 257 } 258 } 259 pwg_query( 'UPDATE ' . PLUGINS_TABLE . ' SET state="inactive" WHERE id="AddInfousers"'); 260 $_SESSION['page_infos'] = array(l10n('Import is successful')); 261 redirect($admin_base_url); 262 } 263 /*End *AA */ 205 264 break; 206 265 case 'edit_user': -
extensions/user_custom_fields/admin.tpl
r31783 r31841 169 169 } 170 170 {/html_style} 171 171 {if isset ($gestImp)} 172 <form method="post" > 173 <fieldset> 174 <legend>{'Import infos since Add Info Users'|@translate}</legend> 175 <input class="submit" name="submitimport" type="submit" value="{'Import'|@translate}"> 176 </fieldset> 177 </form> 178 {/if} 172 179 173 180 <div class="titrePage"> … … 181 188 <form method="post" > 182 189 <fieldset> 183 <legend><span id="leg_add">{'Create new custom fields'|@translate}</span><span id="leg_edit">{'Edit custom fi elds'|@translate}</span></legend>190 <legend><span id="leg_add">{'Create new custom fields'|@translate}</span><span id="leg_edit">{'Edit custom filds'|@translate}</span></legend> 184 191 <input id="hideid" type="hidden" name="invisibleID" value="{$addinfo_edit2.AIPID}"> 185 192 <p class="input"> -
extensions/user_custom_fields/include/function.inc.php
r31542 r31841 4 4 // | User Custom Fields plugin for Piwigo | 5 5 // +-----------------------------------------------------------------------+ 6 // | Copyright(C) 2016 ddtddthttp://temmii.com/piwigo/ |6 // | Copyright(C) 2016-2017 ddtddt http://temmii.com/piwigo/ | 7 7 // +-----------------------------------------------------------------------+ 8 8 // | This program is free software; you can redistribute it and/or modify | -
extensions/user_custom_fields/initadmin.php
r31544 r31841 3 3 // | User Custom Fields plugin for Piwigo | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2016 ddtddthttp://temmii.com/piwigo/ |5 // | Copyright(C) 2016-2017 ddtddt http://temmii.com/piwigo/ | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | This program is free software; you can redistribute it and/or modify | -
extensions/user_custom_fields/initprofile.php
r31542 r31841 3 3 // | User Custom Fields plugin for Piwigo | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2016 ddtddthttp://temmii.com/piwigo/ |5 // | Copyright(C) 2016-2017 ddtddt http://temmii.com/piwigo/ | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | This program is free software; you can redistribute it and/or modify | -
extensions/user_custom_fields/initregister.php
r31541 r31841 3 3 // | User Custom Fields plugin for Piwigo | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2016 ddtddthttp://temmii.com/piwigo/ |5 // | Copyright(C) 2016-2017 ddtddt http://temmii.com/piwigo/ | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | This program is free software; you can redistribute it and/or modify | -
extensions/user_custom_fields/language/en_UK/plugin.lang.php
r31783 r31841 3 3 // | User Custom Fields plugin for Piwigo | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2016 ddtddthttp://temmii.com/piwigo/ |5 // | Copyright(C) 2016-2017 ddtddt http://temmii.com/piwigo/ | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | This program is free software; you can redistribute it and/or modify | … … 25 25 $lang['Custom fields delete'] = 'Custom fields delete'; 26 26 $lang['Data custom fields update'] = 'Data custom fields update'; 27 $lang['Manage custom fi elds'] = 'Manage custom fields';28 $lang['Create new custom fi elds'] = 'Create new custom fields';29 $lang['Edit custom fi elds'] = 'Edit custom fields';27 $lang['Manage custom filds'] = 'Manage custom filds'; 28 $lang['Create new custom filds'] = 'Create new custom filds'; 29 $lang['Edit custom filds'] = 'Edit custom filds'; 30 30 $lang['Wording'] = 'Wording'; 31 31 $lang['Admin only'] = 'Admin only'; … … 33 33 $lang['Fields List'] = 'Fields List'; 34 34 35 /*data user add info*/ 36 $lang['Import infos since Add Info Users'] = 'Import infos since Add Info Users'; 37 $lang['Import'] = 'Import'; 38 $lang['Import is successful'] = 'Import is successful'; 39 35 40 ?> -
extensions/user_custom_fields/language/fr_FR/plugin.lang.php
r31783 r31841 3 3 // | User Custom Fields plugin for Piwigo | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2016 ddtddthttp://temmii.com/piwigo/ |5 // | Copyright(C) 2016-2017 ddtddt http://temmii.com/piwigo/ | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | This program is free software; you can redistribute it and/or modify | … … 25 25 $lang['Custom fields delete'] = 'Champs utilisateur supprimée'; 26 26 $lang['Data custom fields update'] = 'Données des champs pour l\'utilisateur mises à jour'; 27 $lang['Manage user custom fi elds'] = 'Gérer Manage custom fields';28 $lang['Create new custom fi elds'] = 'Créer un nouveau champs personnalisé';29 $lang['Edit custom fi elds'] = 'Éditer champs personnalisé';27 $lang['Manage user custom filds'] = 'Gérer Manage custom filds'; 28 $lang['Create new custom filds'] = 'Créer un nouveau champs personnalisé'; 29 $lang['Edit custom filds'] = 'Editer champs personnalisé'; 30 30 $lang['Wording'] = 'Libellé'; 31 31 $lang['Admin only'] = 'Seulement l\'administrateur'; … … 33 33 $lang['Fields List'] = 'Liste des Champs'; 34 34 35 /*data user add info*/ 36 $lang['Import infos since Add Info Users'] = 'Importer les informations du plugin Add Info Users'; 37 $lang['Import'] = 'Import'; 38 $lang['Import is successful'] = 'L\'import est un succès'; 39 35 40 ?> -
extensions/user_custom_fields/main.inc.php
r31598 r31841 12 12 // | User Custom Fields plugin for Piwigo | 13 13 // +-----------------------------------------------------------------------+ 14 // | Copyright(C) 2016 ddtddthttp://temmii.com/piwigo/ |14 // | Copyright(C) 2016-2017 ddtddt http://temmii.com/piwigo/ | 15 15 // +-----------------------------------------------------------------------+ 16 16 // | This program is free software; you can redistribute it and/or modify | -
extensions/user_custom_fields/maintain.class.php
r31534 r31841 3 3 // | User Custom Fields plugin for Piwigo | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2016 ddtddthttp://temmii.com/piwigo/ |5 // | Copyright(C) 2016-2017 ddtddt http://temmii.com/piwigo/ | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | This program is free software; you can redistribute it and/or modify |
Note: See TracChangeset
for help on using the changeset viewer.