Changeset 7905 for extensions/cl_conflit/admin
- Timestamp:
- Nov 28, 2010, 1:01:06 PM (13 years ago)
- Location:
- extensions/cl_conflit/admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/cl_conflit/admin/admin_conflit.php
r7880 r7905 92 92 93 93 $path = CONFLIT_PATH; 94 $plg_data = implode( '', file($path.'main.inc.php') );95 if ( preg_match("|Plugin Name: (.*)|", $plg_data, $val) )96 {97 $plugin['name'] = trim( $val[1] );98 }99 if (preg_match("|Version: (.*)|", $plg_data, $val))100 {101 $plugin['version'] = trim($val[1]);102 }103 if ( preg_match("|Plugin URI: (.*)|", $plg_data, $val) )104 {105 $plugin['uri'] = trim($val[1]);106 }107 if ($desc = load_language('description.txt', $path.'/', array('return' => true)))108 {109 $plugin['description'] = trim($desc);110 }111 elseif ( preg_match("|Description: (.*)|", $plg_data, $val) )112 {113 $plugin['description'] = trim($val[1]);114 }115 if ( preg_match("|Author: (.*)|", $plg_data, $val) )116 {117 $plugin['author'] = trim($val[1]);118 }119 if ( preg_match("|Author URI: (.*)|", $plg_data, $val) )120 {121 $plugin['author uri'] = trim($val[1]);122 }123 if (!empty($plugin['uri']) and strpos($plugin['uri'] , 'extension_view.php?eid='))124 {125 list( , $extension) = explode('extension_view.php?eid=', $plugin['uri']);126 if (is_numeric($extension)) $plugin['extension'] = $extension;127 }128 // IMPORTANT SECURITY !129 $plugin = array_map('htmlspecialchars', $plugin);130 94 131 $version = $plugin['version'] ;132 95 $conflit_parametres = cl_conflit_Get_Options(); 133 96 -
extensions/cl_conflit/admin/cl_conflit_admin.php
r7880 r7905 91 91 $visible=true; 92 92 93 $path = CONFLIT_PATH;94 93 95 $plg_data = implode( '', file($path.'main.inc.php') );96 if ( preg_match("|Plugin Name: (.*)|", $plg_data, $val) )97 {98 $plugin['name'] = trim( $val[1] );99 }100 if (preg_match("|Version: (.*)|", $plg_data, $val))101 {102 $plugin['version'] = trim($val[1]);103 }104 if ( preg_match("|Plugin URI: (.*)|", $plg_data, $val) )105 {106 $plugin['uri'] = trim($val[1]);107 }108 if ($desc = load_language('description.txt', $path.'/', array('return' => true)))109 {110 $plugin['description'] = trim($desc);111 }112 elseif ( preg_match("|Description: (.*)|", $plg_data, $val) )113 {114 $plugin['description'] = trim($val[1]);115 }116 if ( preg_match("|Author: (.*)|", $plg_data, $val) )117 {118 $plugin['author'] = trim($val[1]);119 }120 if ( preg_match("|Author URI: (.*)|", $plg_data, $val) )121 {122 $plugin['author uri'] = trim($val[1]);123 }124 if (!empty($plugin['uri']) and strpos($plugin['uri'] , 'extension_view.php?eid='))125 {126 list( , $extension) = explode('extension_view.php?eid=', $plugin['uri']);127 if (is_numeric($extension)) $plugin['extension'] = $extension;128 }129 // IMPORTANT SECURITY !130 $plugin = array_map('htmlspecialchars', $plugin);131 94 132 $version = $plugin['version'] ; 133 $cl_conflit_parametres = cl_conflit_Get_Options(); 95 $cl_conflit_parametres = cl_conflit_Get_Options(); 134 96 if (isset($_POST['submit'])) { 135 97 if ($_POST['submit'] == l10n('cl_conflit_save')) { -
extensions/cl_conflit/admin/template/admin.tpl
r7880 r7905 2 2 <script type="text/javascript"> 3 3 var DEBUG = '{$DEBUG}'; 4 var theme = '{$theme}'; 5 var cl_version = '{$cl_version}'; 6 var cl_plugin = '{$cl_plugin}'; 7 4 8 var thumbnail = '{$thumbnail}'; 5 9 var theme = '{$theme}'; 6 var version = '{$version}'; 7 var scaled_width = '{$SCALED_WIDTH}'; // valeur par defaut 8 var scaled_height = '{$SCALED_HEIGHT}'; // valeur par defaut 9 var img_width = '{$IMG_WIDTH }'; 10 var img_height = '{ $IMG_HEIGHT }'; 11 12 var marge_basse = '{ $MARGE_BASSE }'; 13 var echelle_max = '{ $ECHELLE_MAX }'; 14 var mini_width = '{ $MINI_WIDTH }'; 15 var mini_height = '{ $MINI_HEIGHT }'; 16 17 var webmaster_width = '{$webmaster_width }'; 18 var webmaster_height = '{ $webmaster_height }'; 19 var admin_width = '{ $admin_width }'; 20 var admin_height = '{ $admin_height }'; 21 var generic_width = '{ $generic_width }'; 22 var generic_height = '{ $generic_height }'; 23 var guest_width = '{ $guest_width }'; 24 var guest_height = '{$guest_height}'; 25 var normal_width = '{$normal_width}'; 26 var normal_height = '{$normal_height}'; 27 var user_status = '{$user_status}'; 28 29 var check_auto_w = '{$check_auto_w}'; 30 31 var check_desc_v = '{$check_desc_v}'; 10 var cl_Query = '{$cl_query}'; 11 var cl_type = '{$cl_type}'; 32 12 33 13 </script> … … 55 35 </script> 56 36 {/literal} 57 <!--============== assign visible =======================--> 58 {assign var="affiche_cde" value="true"} 59 {if $affiche_cde == "true"} 60 {assign var="visible" value="block"} 61 {else} 62 {assign var="visible" value="none"} 63 {/if} 64 {if $check_auto_w == true} 65 {assign var="visible_w" value="visible"} 66 {else} 67 {assign var="visible_w" value="hidden"} 68 {/if} 37 69 38 <div class="titrePage"> 70 <h2>{' Autosize'|translate} {'version'|translate}{$version}</h2>39 <h2>{'cl_conflit'} {'version'|translate}{$cl_version}</h2> 71 40 </div> 72 <span>{'cl_conflit_Howto'|translate}</span>41 73 42 74 43 75 76 <!--============== !DIV ==={$IMG_WIDTH }=={$IMG_HEIGHT }======--> 44 77 45 <table > 78 <form action="" method="post" name="form_conflit" id="form_conflit" > 79 80 <table id="table0" style=" background:none;border:outset;width:90%; z-index:-500 " > 81 <fieldset> 82 <legend class="cluetip" title="{'cl_conflit_config_title_1'|@translate}|{'cl_conflit_hlp_line1'|@translate}">{'cl_conflit_config_title_1'|@translate}</legend> 83 <td>{'User status'|@translate}</td> 84 <td>{'cl_conflit_height'|@translate}</td> 85 <td style="visibility:visible">{'cl_conflit_width'|@translate} 86 <input type="checkbox" name="check_auto_w" value="on" {$check_auto_w} /></td> 87 <td style="visibility:visible">{'cl_conflit_enabled'|@translate} 88 </td> 89 90 <tr> 91 <td>{'user_status_webmaster'|@translate}</td> 92 <td><input name="webmaster_height" id="Text7" type="text" value ="{$webmaster_height}" /></td> 93 <td style="visibility:{$visible_w}"><input name="webmaster_width" id="webmaster_width" type="text" value ="{$webmaster_width}" /></td> 94 <td ><input name="webmaster_enabled" id="webmaster_enabled" type="checkbox" value ="on" {$webmaster_enabled} /></td> 95 </tr> 96 <tr> 97 <td>{'user_status_admin'|@translate}</td> 98 <td><input name="admin_height" id="admin_height" type="text" value ="{$admin_height}" /></td> 99 <td style="visibility:{$visible_w}"><input name="admin_width" id="admin_width" type="text" value ="{$admin_width}" /></td> 100 <td ><input name="admin_enabled" id="admin_enabled" type="checkbox" value ="on" {$admin_enabled} /></td> 101 </tr> 102 <tr> 103 <td>{'user_status_generic'|@translate}</td> 104 <td><input name="generic_height" id="Text1" type="text" value ="{$generic_height}" /></td> 105 <td style="visibility:{$visible_w}"><input name="generic_width" id="generic_width" type="text" value ="{$generic_width}" /></td> 106 <td ><input name="generic_enabled" id="generic_enabled" type="checkbox" value ="on" {$generic_enabled} /></td> 107 </tr> 108 <tr> 109 <td>{'user_status_guest'|@translate}</td> 110 <td><input name="guest_height" id="Text3" type="text" value ="{$guest_height}" /></td> 111 <td style="visibility:{$visible_w}"><input name="guest_width" id="guest_width" type="text" value ="{$guest_width}" /></td> 112 <td ><input name="guest_enabled" id="guest_enabled" type="checkbox" value ="on" {$guest_enabled} /></td> 113 </tr> 114 <tr> 115 <td>{'user_status_normal'|@translate}</td> 116 <td><input name="normal_height" id="Text5" type="text" value ="{$normal_height}" /></td> 117 <td style="visibility:{$visible_w}"><input name="normal_width" id="normal_width" type="text" value ="{$normal_width}" /></td> 118 <td ><input name="normal_enabled" id="normal_enabled" type="checkbox" value ="on" {$normal_enabled} /></td> 119 </tr> 120 121 </fieldset> 122 123 </table> 124 125 <br /> 126 <table id="table_d" style=" background:none;border:outset;width:90%; z-index:-500 " > 127 <fieldset> 128 <legend class="cluetip" title="{'cl_conflit_config_title_2'|@translate}|{'cl_conflit_hlp_line2'|@translate}">{'cl_conflit_config_title_2'|@translate}</legend> 46 <form action="" method="post" name="form_conflit" id="form_conflit" > 129 47 130 <!--======== Dimensions HL ===================--> 131 <tr> 132 <td class="cluetip" title="{'cl_conflit_miniheight'|@translate}|{'cl_conflit_hlp_line3'|@translate}" >{'cl_conflit_miniheight'|translate}</td> 133 <td ><input name="mini_height" id="mini_height" type="text" value ="{$MINI_HEIGHT}" /> px 134 </td> 135 136 <td class="cluetip" title="{'cl_conflit_miniwidth'|translate}|{'cl_conflit_hlp_line3'|@translate}" > {'cl_conflit_miniwidth'|translate}</td> 137 <td > 138 <input name="mini_width" id="mini_width" type="text" value = "{$MINI_WIDTH}" /> px 139 </tr> 140 <!--======== Positions ===================--> 141 <tr > 142 <td class="cluetip" title="{'cl_conflit_echelle_max'|translate}|{'cl_conflit_hlp_line4'|@translate}" > {'cl_conflit_echelle_max'|translate}</td> 143 <td > 144 <input name="echelle_max" id="echelle_max" type="text" value ="{$ECHELLE_MAX}" /> 145 </td> 146 147 </tr> 148 149 <tr > 150 <td class="cluetip" title="{'cl_conflit_marge_basse'|translate}|{'cl_conflit_hlp_line5'|@translate}" > {'cl_conflit_marge_basse'|translate}</td> 151 <td><input name="marge_basse" id="marge_basse" type="text" value = "{$MARGE_BASSE}" /> px</td> 152 153 </tr> 154 155 <!--======================================================================================--> 156 <tr > 157 158 </tr> 159 160 161 </fieldset> 162 </table> 163 <!--=================== Bloc choix =============================--> 164 <table> 165 <tr><td style="visibility:visible">{'cl_conflit_icon_view'|@translate} 166 <input type="checkbox" name="check_icon_v" value="on" {$check_icon_v} /> 167 </td> 168 <td>{'cl_conflit_desc_view'|@translate} 169 <input type="checkbox" name="check_desc_v" value="on" {$check_desc_v} /> 170 </td> 171 <td> 172 </td> 173 174 </tr> 175 </table> 176 177 <table> 178 <td><input name="submit" type="submit" value="{'cl_conflit_save'|@translate}" /></td> 179 </table> 48 <table> 49 <td><input name="submit" type="submit" value="{'cl_conflit_save'|@translate}" /></td> 50 </table> 180 51 </form> 181 52
Note: See TracChangeset
for help on using the changeset viewer.