[ Index ] |
PHP Cross Reference of phpwcms V1.4.3 _r380 (23.11.09) |
[Summary view] [Print] [Text view]
1 <?php 2 // ---------------------------------------------------------------- 3 // obligate check for phpwcms constants 4 if (!defined('PHPWCMS_ROOT')) { 5 die("You Cannot Access This Script Directly, Have a Nice Day."); 6 } 7 // ---------------------------------------------------------------- 8 9 10 $action = empty($_GET["t"]) ? '' : clean_slweg($_GET["t"]); 11 $sendbutton = ($action == "add") ? $BL['be_gt_button_add'] : $BL['be_gt_button_update']; 12 $font_filename = clean_slweg($_GET["font_filename"]); 13 $font_id = empty($_GET["font_id"]) ? 0 : intval($_GET["font_id"]); 14 $font_name = ''; 15 $font_shortname = ''; 16 17 if (isset($_GET["doit"]) && intval($_GET["doit"]) === 1) 18 { 19 $font_name = clean_slweg($_POST["font_name"]); 20 $font_shortname = clean_slweg($_POST["font_shortname"]); 21 $font_filename = clean_slweg($_GET["font_filename"]); 22 23 if (!empty($font_shortname) && !empty($font_name)) 24 { 25 if ($action == "add") { 26 $query = "INSERT INTO ".DB_PREPEND."phpwcms_fonts SET font_name='"; 27 $query .= aporeplace($font_name)."', font_shortname='"; 28 $query .= aporeplace($font_shortname)."', font_filename='"; 29 $query .= aporeplace($font_filename)."'"; 30 } else { 31 $query = "UPDATE ".DB_PREPEND."phpwcms_fonts SET font_name='"; 32 $query .= aporeplace($font_name)."', font_shortname='"; 33 $query .= aporeplace($font_shortname)."', font_filename='"; 34 $query .= aporeplace($font_filename)."' WHERE font_id = ".$font_id; 35 } 36 37 mysql_query($query, $db) or die ("Graphical Text - Error in query:$query"); 38 39 header('Location:'.PHPWCMS_URL.'phpwcms.php?do=modules&p=2&s=fonts'); 40 } 41 else 42 { 43 echo "<span style=\"color:#FF0000\">".$BL['be_gt_edit_empty_fields']."</span>"; 44 } 45 } 46 47 48 if ($font_id) 49 { 50 $query = "SELECT * FROM ".DB_PREPEND."phpwcms_fonts WHERE font_id = ".intval($font_id); 51 $result = mysql_query($query, $db); 52 53 while ($row = mysql_fetch_assoc($result)) 54 { 55 $font_name = $row["font_name"]; 56 $font_shortname = $row["font_shortname"]; 57 } 58 } 59 ?> 60 61 <form action="phpwcms.php?do=modules&p=2&s=fonts&t=<?php echo $action; ?>&font_id=<?php echo $font_id;?>&font_filename=<?php echo rawurlencode($font_filename); ?>&&doit=1" method="post"> 62 <table width="538" border="0" cellpadding="0" cellspacing="0" summary=""> 63 <tr><td colspan="2" class="title"><img src="img/leer.gif" alt="" width="1" height="5" /></td> 64 </tr> 65 <tr><td colspan="2" class="title"><?php echo $BL['be_gt_font_edit_title']; ?></td></tr> 66 <tr><td colspan="2" class="title"><img src="img/leer.gif" alt="" width="1" height="5" /></td> 67 </tr> 68 <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td> 69 </tr> 70 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td> 71 </tr> 72 <tr> 73 <td align="right" class="chatlist" nowrap="nowrap"><?php echo $BL['be_gt_font_filename'] ?>: </td> 74 <td><?php echo html_specialchars($font_filename) ?></td> 75 </tr> 76 <tr><td colspan="2"><img src="img/leer.gif" width="1" height="3" alt="" /></td></tr> 77 <tr> 78 <td align="right" class="chatlist" nowrap="nowrap"><?php echo $BL['be_gt_font_name'] ?>: </td> 79 <td><input name="font_name" type="text" id="font_name" class="f11b" style="width: 350px" value="<?php echo html_specialchars($font_name) ?>" size="50" maxlength="50" /></td> 80 </tr> 81 <tr><td colspan="2"><img src="img/leer.gif" width="1" height="3" alt="" /></td></tr> 82 <tr> 83 <td align="right" class="chatlist" nowrap="nowrap"><?php echo $BL['be_gt_font_shortname'] ?>: </td> 84 <td><input name="font_shortname" type="text" id="font_shortname" class="f11b" style="width: 350px" value="<?php echo html_specialchars($font_shortname) ?>" size="50" maxlength="16" /></td> 85 </tr> 86 <tr><td colspan="2"><img src="img/leer.gif" width="1" height="3" alt="" /></td></tr> 87 <tr> 88 <td class="chatlist"></td> 89 <td><input name="Submit" type="submit" class="button10" value="<?php echo $sendbutton ?>" /> 90 91 <input name="donotsubmit" type="button" class="button10" value="<?php echo $BL['be_gt_button_cancel'] ?>" onclick="location.href='phpwcms.php?do=modules&p=2&s=fonts'" /></td> 92 </tr> 93 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td> 94 </tr> 95 <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td> 96 </tr> 97 <tr><td colspan="2"><?php subnavback($BL['be_gt_font_back'], "phpwcms.php?do=modules&p=2&s=fonts", 6) ?></td></tr> 98 </table> 99 </form>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Dec 30 05:55:15 2009 | Cross-referenced by PHPXref 0.7 |