2 require_once("language.inc.php");
7 if ($_POST['constant_name'] == "") {
8 echo htmlspecialchars(xl('Constant name is blank'), ENT_NOQUOTES
).'<br>';
12 $sql="SELECT * FROM lang_constants WHERE constant_name=? limit 1" ;
13 $res=SqlQuery($sql, array($_POST['constant_name']));
15 echo htmlspecialchars(xl('Data Alike is already in database, please change constant name'), ENT_NOQUOTES
).'<br>';
20 $val_constant=$_POST['constant_name'];
22 //insert into the main table
23 $sql="INSERT INTO lang_constants SET constant_name=?";
24 SqlStatement($sql, array($_POST['constant_name']));
26 //insert into the log table - to allow persistant customizations
27 insert_language_log('', '', $_POST['constant_name'], '');
29 echo htmlspecialchars(xl('Constant', '', '', ' ') . $_POST['constant_name'] . xl('added', '', ' '), ENT_NOQUOTES
).'<br>';
40 <FORM name
="cons_form" METHOD
=POST ACTION
="?m=constant" onsubmit
="return top.restoreSession()">
42 <TD
><?php
echo htmlspecialchars(xl('constant name'), ENT_NOQUOTES
); ?
></TD
>
43 <TD
><INPUT TYPE
="text" NAME
="constant_name" size
="100" value
="<?php echo htmlspecialchars($val_constant, ENT_QUOTES); ?>"></TD
>
47 <TD
><INPUT TYPE
="submit" name
="add" value
="<?php echo htmlspecialchars(xl('Add'), ENT_QUOTES); ?>"></TD
>
51 <span
class="text"><?php
echo htmlspecialchars(xl('Please Note: constants are case sensitive and any string is allowed.'), ENT_NOQUOTES
); ?
></span
>