Changeset 7131
- Timestamp:
- 10/24/08 19:04:49 (5 years ago)
- Files:
-
- contributed_modules/modules/cidroute/functions.inc.php (modified) (4 diffs)
- contributed_modules/modules/cidroute/js/comboselect.css (modified) (3 diffs)
- contributed_modules/modules/cidroute/js/comboselect.js (modified) (1 diff)
- contributed_modules/modules/cidroute/page.cidroute.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
contributed_modules/modules/cidroute/functions.inc.php
r7120 r7131 3 3 // Why Pay More 4 Less Pty Ltd (Australia) 2008 4 4 // 5 // T his isNOT OPEN SOURCE SOFTWARE.5 // THIS IS NOT OPEN SOURCE SOFTWARE. 6 6 // 7 7 // Whilst the source is available for you to look at, you 8 // do NOT have a licence to change or re-distribute this8 // do NOT have a licence to change or re-distribute this 9 9 // software. 10 // 11 // This specific document, and the databases that accompany it 12 // are licenced for the SOLE USE of Astrogen LLC, otherwise 13 // known as FreePBX, to be distributed SOLEY with the FreePBX 14 // software package. 15 // 10 11 // This specific document, all other associated files, any 12 // databases, and the database designs that accompany it 13 // are Copyright 2008, and are licenced for the SOLE USE of 14 // Astrogen LLC, otherwise known as FreePBX, to be 15 // distributed SOLEY with the FreePBX software package. 16 16 17 // If you wish to licence the redistribution of these 17 // copyrighted documents, database, and database design es,18 // the ONLY company that is a pprovedto do so is:18 // copyrighted documents, database, and database designs, 19 // the ONLY company that is able to do so is: 19 20 20 21 // Why Pay More 4 Less Pty Ltd, 21 22 // 1 Grayson st, 22 // Gladstone, QLD, 4680 23 // Gladstone, QLD, 4680, AUSTRALIA 24 // 25 // PHYSICAL MAIL only (Electronic mail is not acceptable) 23 26 24 27 // If you do not have written permission from this company to 25 // do so, you are violating international copyright laws, and 26 // will be prosecuted to the full extent of the law. 28 // redistribute this copyrighted package and do so, you are 29 // violating international copyright laws, and will be 30 // prosecuted to the FULL EXTENT of the law. 27 31 28 32 // You may be asking why this licence is so strict? At the time 29 // this was written, the Author believed that Fona tity was33 // this was written, the Author believed that Fonality was 30 34 // involved in numerous GPL Violations with their Trixbox 31 35 // product. If and when that is ever resolved, this document … … 225 229 if(is_array($results)){ 226 230 foreach($results as $result){ 227 $ allowed[] = $result;231 $dests[] = $result; 228 232 } 229 233 } 230 return isset($ allowed)?$allowed:null;234 return isset($dests)?$dests:null; 231 235 } 232 236 … … 251 255 252 256 function cidroute_alter($post){ 257 global $db; 253 258 if (isset($post['addquick'])) { 254 259 // Check for Range: Area: State: … … 258 263 print "<br>Adding range ".$defn[1]."\n"; 259 264 } elseif (strcasecmp($defn[0], "Area") === 0) { 260 print "<br>Adding Area ".$defn[1]."\n"; 265 $q = "insert into cidroute_matches (country, areacode, min_numb, max_numb, dest) select "; 266 $q .= "country, areacode, min_numb, max_numb, ".$db->escapeSimple($post['itemid'])." from "; 267 $q .= "cidroute_cidlist where localarea = '".$db->escapeSimple($defn[1])."'"; 268 sql($q); 261 269 } elseif (strcasecmp($defn[0], "State") === 0) { 262 270 print "<br>Adding State ".$defn[1]."\n"; 271 $q = "insert into cidroute_matches (country, areacode, min_numb, max_numb, dest) select "; 272 $q .= "country, areacode, min_numb, max_numb, ".$db->escapeSimple($post['itemid'])." from "; 273 $q .= "cidroute_cidlist where state = '".$db->escapeSimple($defn[1])."'"; 274 sql($q); 263 275 } elseif (strcasecmp($defn[0], "Region") === 0) { 264 276 print "<br>Adding region ".$defn[1]."\n"; 277 $q = "insert into cidroute_matches (country, areacode, min_numb, max_numb, dest) select "; 278 $q .= "country, areacode, min_numb, max_numb, ".$db->escapeSimple($post['itemid'])." from "; 279 $q .= "cidroute_cidlist where region = '".$db->escapeSimple($defn[1])."'"; 280 sql($q); 265 281 } 266 282 } elseif (isset($post['area'])) { contributed_modules/modules/cidroute/js/comboselect.css
r7121 r7131 1 lxabel, ixnput,#myselect, #myotherselect {1 #myselect, #myotherselect { 2 2 display: block; 3 3 float: left; … … 25 25 display: block; 26 26 float: left; 27 width: 800px;27 width: 100%; 28 28 margin-bottom: 10px; 29 29 padding: 0; … … 33 33 display: block; 34 34 float: left; 35 width: 4 5%;35 width: 47%; 36 36 } 37 37 38 38 fieldset.comboselect select { 39 height: 100px;39 height: 300px; 40 40 } 41 41 42 42 fieldset.comboselect fieldset { 43 43 border: 0; 44 width: 3 0px;45 height: 100px;44 width: 3%; 45 height: 300px; 46 46 padding: 10px; 47 47 padding-top: 25px; contributed_modules/modules/cidroute/js/comboselect.js
r7121 r7131 69 69 combo += '<input type="button" class="csremove" value="' + settings.rembtn + '" />'; 70 70 combo += '</fieldset>'; 71 combo += '<select id="' + rightID + '" name="' + rightID + ' " class="csright" multiple="multiple">';71 combo += '<select id="' + rightID + '" name="' + rightID + '[]" class="csright" multiple="multiple">'; 72 72 combo += '</select>'; 73 73 combo += '</fieldset>'; contributed_modules/modules/cidroute/page.cidroute.php
r7121 r7131 182 182 ?> 183 183 </td></tr> 184 <tr><td colspan=2><hr></td></tr> 185 <tr><td> 184 <tr><td colspan=2><hr> 186 185 <script type="text/javascript" src="modules/cidroute/js/comboselect.js" charset="utf-8"></script> 187 186 <script type="text/javascript" src="modules/cidroute/js/chainedSelects.js" charset="utf-8"></script> … … 223 222 }); 224 223 $(document).ready(function() { 225 $('#myselect').comboselect({ sort: 'both', addbtn: ' +', rembtn: '-' });224 $('#myselect').comboselect({ sort: 'both', addbtn: '>>', rembtn: '<<' }); 226 225 }); 227 226 … … 239 238 <input type="hidden" name="action" value="alter"> 240 239 <input type="hidden" name="display" value="<? echo $dispnum; ?>"> 241 242 Quick Select:</td><td>240 </td></tr> 241 <tr><td>Quick Select:</td><td> 243 242 <input style="width: 200px" type="text" id="quick" name="quick" value="" /> <input type="submit" name="addquick" value="Add" /></td></tr> 244 243 <tr><td>State:</td><td> <select id="state" name="state"> … … 260 259 <tr><td>Area:</td><td> 261 260 <select name="area" id="area"><option value="0">--</option></select></td></tr> 262 <tr><td><input type="submit" name="addselect" value="submit" /></td></tr> 263 <tr><td>Currently Used Maps</td></tr> 261 <tr><td><input type="submit" name="addselect" value="Submit" /></td></tr> 262 <tr><td><?php echo _('Currently Selected Areas'); ?></td> 263 <td style="text-align: right"><i>Move areas to right hand side to remove</i></td></tr> 264 264 265 <tr><td colspan=2> 265 266 </form> … … 267 268 268 269 <form method="post" action="<? echo $_SERVER['PHP_SELF'] ?>" class="removestuff"> 269 <select id="myselect" name="myselect" multiple="multiple"> 270 <input type="hidden" name="itemid" value="<? echo $itemid ?>"> 271 <input type="hidden" name="action" value="alter"> 272 <input type="hidden" name="display" value="<? echo $dispnum; ?>"> 273 <select id="myselect" name="myselect[]" multiple="multiple"> 270 274 <? 271 275 $q = "select state, region, localarea, cidroute_cidlist.areacode, cidroute_cidlist.min_numb, cidroute_cidlist.max_numb "; … … 284 288 285 289 </select> 290 </tr></td> 291 <tr><td colspan=2 style="text-align: right"><input type="submit" name="delselect" value="Remove Selected" /></td></tr> 286 292 </form> 287 293
