diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-08-09 22:26:41 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-08-09 22:26:41 +0000 |
commit | a8ff6858bcd58ac9e2cd23b36775268a66358a12 (patch) | |
tree | 0fc3b1200cfa650420e051ee060e5978576fb3bd /phpBB/admin/admin_smilies.php | |
parent | 56772bb75aeeb2ef1420a270409e10cbd9042da1 (diff) | |
download | forums-a8ff6858bcd58ac9e2cd23b36775268a66358a12.tar forums-a8ff6858bcd58ac9e2cd23b36775268a66358a12.tar.gz forums-a8ff6858bcd58ac9e2cd23b36775268a66358a12.tar.bz2 forums-a8ff6858bcd58ac9e2cd23b36775268a66358a12.tar.xz forums-a8ff6858bcd58ac9e2cd23b36775268a66358a12.zip |
Change to reflect path change ... the path could perhaps end up in the template config file ...
git-svn-id: file:///svn/phpbb/trunk@825 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/admin/admin_smilies.php')
-rw-r--r-- | phpBB/admin/admin_smilies.php | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/phpBB/admin/admin_smilies.php b/phpBB/admin/admin_smilies.php index 3338a1dcb9..d56ccba5c1 100644 --- a/phpBB/admin/admin_smilies.php +++ b/phpBB/admin/admin_smilies.php @@ -33,6 +33,7 @@ if($setmodules == 1) return; } + // // Include required files register $phpEx, and check permisions // @@ -52,7 +53,8 @@ switch($mode) // Get the data that should be passed. // $smiley_id = ($HTTP_GET_VARS['id']) ? $HTTP_GET_VARS['id']: $HTTP_POST_VARS['id']; - $sql = 'DELETE FROM ' . SMILIES_TABLE . ' WHERE smilies_id = ' . $smiley_id; + $sql = 'DELETE FROM ' . SMILIES_TABLE . ' + WHERE smilies_id = ' . $smiley_id; $result = $db->sql_query($sql); if( !$result ) { @@ -80,7 +82,9 @@ switch($mode) // Get the data for the selected smiley. // $smiley_id = ($HTTP_GET_VARS['id']) ? $HTTP_GET_VARS['id']: $HTTP_POST_VARS['id']; - $sql = 'SELECT * FROM ' . SMILIES_TABLE . ' WHERE smilies_id = ' . $smiley_id; + $sql = 'SELECT * + FROM ' . SMILIES_TABLE . ' + WHERE smilies_id = ' . $smiley_id; $result = $db->sql_query($sql); if( !$result ) { @@ -142,15 +146,17 @@ switch($mode) // Get the submitted data, being careful to ensure that we only // accept the data we are looking for. // - $smile_code = addslashes(($HTTP_POST_VARS['smile_code']) ? $HTTP_POST_VARS['smile_code'] : $HTTP_GET_VARS['smile_code']); - $smile_url = addslashes(($HTTP_POST_VARS['smile_url']) ? $HTTP_POST_VARS['smile_url'] : $HTTP_GET_VARS['smile_url']); - $smile_emotion = addslashes(($HTTP_POST_VARS['smile_emotion']) ? $HTTP_POST_VARS['smile_emotion'] : $HTTP_GET_VARS['smile_emotion']); + $smile_code = ($HTTP_POST_VARS['smile_code']) ? $HTTP_POST_VARS['smile_code'] : $HTTP_GET_VARS['smile_code']; + $smile_url = ($HTTP_POST_VARS['smile_url']) ? $HTTP_POST_VARS['smile_url'] : $HTTP_GET_VARS['smile_url']; + $smile_emotion = ($HTTP_POST_VARS['smile_emotion']) ? $HTTP_POST_VARS['smile_emotion'] : $HTTP_GET_VARS['smile_emotion']; $smile_id = intval(($HTTP_POST_VARS['smile_id']) ? $HTTP_POST_VARS['smile_id'] : $HTTP_GET_VARS['smile_id']); // // Proceed with updating the smiley table. // - $sql = 'UPDATE ' . SMILIES_TABLE . " SET code='$smile_code', smile_url='$smile_url', emoticon='$smile_emotion' WHERE smilies_id = $smile_id"; + $sql = 'UPDATE ' . SMILIES_TABLE . " + SET code='$smile_code', smile_url='$smile_url', emoticon='$smile_emotion' + WHERE smilies_id = $smile_id"; $result = $db->sql_query($sql); if( !$result ) { @@ -179,14 +185,15 @@ switch($mode) // Get the submitted data being careful to ensure the the data // we recieve and process is only the data we are looking for. // - $smile_code = addslashes(($HTTP_POST_VARS['smile_code']) ? $HTTP_POST_VARS['smile_code'] : $HTTP_GET_VARS['smile_code']); - $smile_url = addslashes(($HTTP_POST_VARS['smile_url']) ? $HTTP_POST_VARS['smile_url'] : $HTTP_GET_VARS['smile_url']); - $smile_emotion = addslashes(($HTTP_POST_VARS['smile_emotion']) ? $HTTP_POST_VARS['smile_emotion'] : $HTTP_GET_VARS['smile_emotion']); + $smile_code = ($HTTP_POST_VARS['smile_code']) ? $HTTP_POST_VARS['smile_code'] : $HTTP_GET_VARS['smile_code']; + $smile_url = ($HTTP_POST_VARS['smile_url']) ? $HTTP_POST_VARS['smile_url'] : $HTTP_GET_VARS['smile_url']; + $smile_emotion = ($HTTP_POST_VARS['smile_emotion']) ? $HTTP_POST_VARS['smile_emotion'] : $HTTP_GET_VARS['smile_emotion']; // // Save the data to the smiley table. // - $sql = 'INSERT INTO ' . SMILIES_TABLE . "(code, smile_url, emoticon) VALUES('$smile_code', '$smile_url', '$smile_emotion')"; + $sql = 'INSERT INTO ' . SMILIES_TABLE . " (code, smile_url, emoticon) + VALUES ('$smile_code', '$smile_url', '$smile_emotion')"; $result = $db->sql_query($sql); if( !$result ) { @@ -214,7 +221,8 @@ switch($mode) // // Get a listing of smileys. // - $sql = 'SELECT * FROM ' . SMILIES_TABLE; + $sql = 'SELECT * + FROM ' . SMILIES_TABLE; $result = $db->sql_query($sql); if( !$result ) { @@ -222,10 +230,6 @@ switch($mode) } $smilies = $db->sql_fetchrowset($result); $total_smilies = $db->sql_numrows($result); - if(empty($smilies_url)) - { - $smilies_url = "images/smilies"; - } $template->set_filenames(array( "body" => "admin/admin_smile.tpl") ); @@ -239,7 +243,7 @@ switch($mode) } $template->assign_vars(array( "S_SMILEY_URL" => $my_path, - "S_SMILEY_BASEDIR" => $phpbb_root_path.'/'.$smilies_url, + "S_SMILEY_BASEDIR" => $phpbb_root_path . '/' . $board_config['smilies_path'], "L_ACTION" => $lang['Action'], "L_SMILEY_TITLE" => $lang['smiley_title'], "L_SMILEY_TEXT" => $lang['smile_desc'], @@ -273,3 +277,4 @@ switch($mode) // include('page_footer_admin.'.$phpEx); +?>
\ No newline at end of file |