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