20){ header("location: $PHP_SELF?n=modules/emoticons&i=31"); exit; } if ($height > 20) { header("location: $PHP_SELF?n=modules/emoticons&i=32"); exit; } if ($uploaded_file['size'] > 5024) { header("location: $PHP_SELF?n=modules/emoticons&i=33"); exit; } //----------------------------------------------------------------- // Upload avatar //----------------------------------------------------------------- $temp = @move_uploaded_file($uploaded_file['tmp_name'], images.'/'.emoticons.'/'.$uploaded_file['name']); @chmod(images.'/'.emoticons.'/'.$uploaded_file['name'], 0644); //----------------------------------------------------------------- // If the upload goes bad redirect with error //----------------------------------------------------------------- if(!$temp) header("location: $PHP_SELF?n=modules/emoticons&i=28"); } //----------------------------------------------------------------- // If avatar is not uploaded show unknown error //----------------------------------------------------------------- else header("location: $PHP_SELF?n=modules/emoticons&i=34"); //----------------------------------------------------------------- // Redirect when finished //----------------------------------------------------------------- header("location: $PHP_SELF?n=modules/emoticons&i=66"); break; //----------------------------------------------------------------- // Add emoticons //----------------------------------------------------------------- case 2: //----------------------------------------------------------------- // Begin Check //----------------------------------------------------------------- if(!$code){ header("location: $PHP_SELF?n=modules/emoticons&i=70"); exit; } //----------------------------------------------------------------- // Write Log + Add the emoticon //----------------------------------------------------------------- $db->insertRow("log",array('user_id' => ''.$_SESSION['id'].'','user_user' => ''.$_SESSION['username'].'','log' => ''.$language['Logs desc3'].' emoticons the emoticon code -> \''.$code.'\'','date' => ''.time().'')); $db->insertRow("emoticons",array('code' => ''.$code.'','pic' => ''.$pic.'')); //----------------------------------------------------------------- // Add the emoticon //----------------------------------------------------------------- header("location: $PHP_SELF?n=modules/emoticons&i=67"); break; //----------------------------------------------------------------- // Delete Emoticons //----------------------------------------------------------------- case 3: //----------------------------------------------------------------- // Write Log + Delete the emoticon //----------------------------------------------------------------- $checker = $db->getLine("SELECT * FROM emoticons WHERE id = '$d'"); $db->insertRow("log",array('user_id' => ''.$_SESSION['id'].'','user_user' => ''.$_SESSION['username'].'','log' => ''.$language['Logs desc'].' emoticons the emoticon with code -> \''.$checker['code'].'\'','date' => ''.time().'')); $db->deleteRow("emoticons","id = '$d'"); //----------------------------------------------------------------- // Redirect when finished //----------------------------------------------------------------- header("location: $PHP_SELF?n=modules/emoticons&i=68"); break; //----------------------------------------------------------------- // Update Emoticons //----------------------------------------------------------------- case 4: //----------------------------------------------------------------- // Begin Check //----------------------------------------------------------------- foreach($code as $idx=>$val) if(!$code[$idx]){ header("location: $PHP_SELF?n=modules/emoticons&i=70"); exit; } foreach($pic as $idx=>$val) if(!$pic[$idx]){ header("location: $PHP_SELF?n=modules/emoticons&i=71"); exit; } //----------------------------------------------------------------- // Save the emoticons //----------------------------------------------------------------- foreach($code as $idx=>$val) $db->query("Update `emoticons` set `code` = '$val' WHERE `id` = '$idx'"); foreach($pic as $idx=>$val) $db->query("Update `emoticons` set `pic` = '$val' WHERE `id` = '$idx'"); //----------------------------------------------------------------- // Write Log //----------------------------------------------------------------- $db->insertRow("log",array('user_id' => ''.$_SESSION['id'].'','user_user' => ''.$_SESSION['username'].'','log' => ''.$language['Logs desc2'].' emoticons','date' => ''.time().'')); //----------------------------------------------------------------- // Redirect when finished //----------------------------------------------------------------- header("location: $PHP_SELF?n=modules/emoticons&i=69"); break; //----------------------------------------------------------------- // View Emoticons Form //----------------------------------------------------------------- default: //----------------------------------------------------------------- // Load Emoticons table //----------------------------------------------------------------- $emoticons_db = $db->getTable("SELECT * FROM emoticons"); if($emoticons_db != FALSE) { foreach($emoticons_db as $idx=>$emoticon) { //----------------------------------------------------------------- // Make Layout //----------------------------------------------------------------- $layout .= " {$emoticon[ {$language[ "; } } else { //----------------------------------------------------------------- // Make Layout //----------------------------------------------------------------- $layout .= " {$language['Emoticons form desc7']} \n"; } //----------------------------------------------------------------- // Echo the back link //----------------------------------------------------------------- echo "
{$language['Admin name']}
» {$language['Admin back']}

"; //----------------------------------------------------------------- // Load dropdown_form for templates directory //----------------------------------------------------------------- $array_template = array(); $dir_template = opendir( 'images/emoticons' ); while ($file_template = readdir($dir_template)) if(!preg_match( "/^..?$|^index|htm$|Thumbs$|html$|^\./i", $file_template)) $array_template[] = array($file_template, $file_template); closedir($dir_template); sort($array_template); reset($array_template); $default = array(); $default = $array_template[0] ?>

<?= $default[1] ?>'>


' tabindex='3'>