// // ------------------------------------------------------------------------ // // This program is free software; you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // // the Free Software Foundation; either version 2 of the License, or // // (at your option) any later version. // // // // You may not change or alter any portion of this comment or credits // // of supporting developers from this source code or any supporting // // source code which is considered copyrighted (c) material of the // // original comment or credit authors. // // // // This program is distributed in the hope that it will be useful, // // but WITHOUT ANY WARRANTY; without even the implied warranty of // // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // // GNU General Public License for more details. // // // // You should have received a copy of the GNU General Public License // // along with this program; if not, write to the Free Software // // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // ------------------------------------------------------------------------ // // Author: Kazumi Ono (AKA onokazu) // // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ // // Project: The XOOPS Project // // ------------------------------------------------------------------------- // if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) { exit("Access Denied"); } function SmilesAdmin() { $db =& Database::getInstance(); $url_smiles = XOOPS_UPLOAD_URL; $myts =& MyTextSanitizer::getInstance(); xoops_cp_header(); echo "

"._AM_SMILESCONTROL."

"; if ($getsmiles = $db->query("SELECT * FROM ".$db->prefix("smiles"))) { if (($numsmiles = $db->getRowsNum($getsmiles)) == "0") { //EMPTY } else { echo '
'; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $i = 0; while ($smiles = $db->fetchArray($getsmiles)) { if ($i % 2 == 0) { $class = 'even'; } else { $class= 'odd'; } $smiles['code'] = $myts->makeTboxData4Show($smiles['code']); $smiles['smile_url'] = $myts->makeTboxData4Edit($smiles['smile_url']); $smiles['smile_emotion'] = $myts->makeTboxData4Edit($smiles['emotion']); echo ""; echo ""; echo ""; echo ''; echo '"; echo "\n"; $i++; } echo '
" ._AM_CODE."" ._AM_SMILIE.""._AM_SMILEEMOTION."" ._AM_DISPLAYF.""._AM_ACTION."
".$smiles['code']."'.$smiles['smile_emotion'].'" ._AM_EDIT." "; echo "" ._AM_DEL."
'.$GLOBALS['xoopsSecurity']->getTokenHTML().'
'; } } else { echo _AM_CNRFTSD; } $smiles['smile_code'] = ''; $smiles['smile_url'] = 'blank.gif'; $smiles['smile_desc'] = ''; $smiles['smile_display'] = 1; $smiles['smile_form'] = _AM_ADDSMILE; $smiles['op'] = 'SmilesAdd'; $smiles['id'] = ''; include XOOPS_ROOT_PATH.'/modules/system/admin/smilies/smileform.php'; $smile_form->display(); xoops_cp_footer(); } function SmilesEdit($id) { $db =& Database::getInstance(); $myts =& MyTextSanitizer::getInstance(); xoops_cp_header(); echo ''._AM_SMILESCONTROL .' »» '._AM_EDITSMILE.'

'; if ($getsmiles = $db->query("SELECT * FROM ".$db->prefix("smiles")." WHERE id = $id")) { $numsmiles = $db->getRowsNum($getsmiles); if ( $numsmiles == 0 ) { //EMPTY } else { if ($smiles = $db->fetchArray($getsmiles)) { $smiles['smile_code'] = $myts->makeTboxData4Edit($smiles['code']); $smiles['smile_url'] = $myts->makeTboxData4Edit($smiles['smile_url']); $smiles['smile_desc'] = $myts->makeTboxData4Edit($smiles['emotion']); $smiles['smile_display'] = $smiles['display']; $smiles['smile_form'] = _AM_EDITSMILE; $smiles['op'] = 'SmilesSave'; include XOOPS_ROOT_PATH.'/modules/system/admin/smilies/smileform.php'; $smile_form->addElement(new XoopsFormHidden('old_smile', $smiles['smile_url'])); $smile_form->display(); } } } else { echo _AM_CNRFTSD; } xoops_cp_footer(); } ?>