View file system/inc/classes/smiles.class.php

File size: 10.55Kb
<?php
/**
 * @name SHCMS Engine
 * @copyright Shamsik © 2012
 * Данный код защищен авторскими правами
 * http://shcms.ru
 */
 
 
 
 
 
class Smiles 
{  
    function Smileclass($strings) 
	{ 
		/**
		* Безопастные значение 
		* для смайликов
		*/
        $smiles_link = array(); 
        $smiles_link[0] = '*rofl*'; 
        $smiles_link[1] = ':-D'; 
		$smiles_link[2] = '*bravo*';
		$smiles_link[3] = ':-)';	
		$smiles_link[4] = ':-(';	
		$smiles_link[5] = ':-P';	
		$smiles_link[6] = '*dirol*';	
		$smiles_link[7] = '*blush*';	
		$smiles_link[8] = '*shok*';	
		$smiles_link[9] = '*kiss*';	
		$smiles_link[10] = '*cray*';	
		$smiles_link[11] = '*secret*';	
		$smiles_link[12] = '*aggressive*';	
		$smiles_link[13] = '*fool*';	
		$smiles_link[14] = ':-/';	
		$smiles_link[15] = '*mosking*';	
		$smiles_link[16] = '*diablo*';	
		$smiles_link[17] = '*music*';	
		$smiles_link[18] = '*kissed*';	
		$smiles_link[19] = '*stop*';	
		$smiles_link[20] = '*kissing*';	
		$smiles_link[21] = '*rose*';	
		$smiles_link[22] = '*good*';	
		$smiles_link[23] = '*drinks*';	
		$smiles_link[24] = '*love*';	
		$smiles_link[25] = '*bomba*';	
		$smiles_link[26] = '*wacko*';	
		$smiles_link[27] = '*mamba*';	
		$smiles_link[28] = '*pardon*';	
		$smiles_link[29] = '*no*';	
		$smiles_link[30] = '*crazy*';	
		$smiles_link[31] = '*hz*';	
		$smiles_link[32] = '*sorry*';	
		$smiles_link[33] = '*yahoo*';	
		$smiles_link[34] = '*dance*';	
		$smiles_link[35] = '*help*';	
		$smiles_link[36] = '*ok*';	
		$smiles_link[37] = '*hello*';	
		$smiles_link[38] = '*acute*';	
		$smiles_link[39] = '*bye*';	
		$smiles_link[40] = '*mail*';	
		$smiles_link[41] = '*dash*';	
		$smiles_link[42] = '*yes*';	
	    $smiles_link[43] = '*scratch*';
        $smiles_link[44] = '*lol*';	
        $smiles_link[45] = '*happy*';	
        $smiles_link[46] = '*db*';	
        $smiles_link[47] = '*loves*';	
	    $smiles_link[48] = '*boredom*';	
	    $smiles_link[49] = '*krut*';	
	    $smiles_link[50] = '*nono*';	
	    $smiles_link[51] = '*posle*';	
	    $smiles_link[52] = '*punish*';	
	    $smiles_link[53] = '*wink*';	
	    $smiles_link[54] = '*angel*';	

		/**
		* Ссылки на смайлики
		* Которые будут вставлены вместо значений
		*/
        $smiles_zam = array(); 
        $smiles_zam[0] = '<img src="/system/smile/rofl.gif">'; 
        $smiles_zam[1] = '<img src="/system/smile/biggrin.gif">'; 
        $smiles_zam[2] = '<img src="/system/smile/clapping.gif">';
        $smiles_zam[3] = '<img src="/system/smile/smile.gif">';
        $smiles_zam[4] = '<img src="/system/smile/sad.gif">';
        $smiles_zam[5] = '<img src="/system/smile/blum3.gif">';
        $smiles_zam[6] = '<img src="/system/smile/dirol.gif">';
        $smiles_zam[7] = '<img src="/system/smile/blush2.gif">';
        $smiles_zam[8] = '<img src="/system/smile/shok.gif">';
        $smiles_zam[9] = '<img src="/system/smile/kiss.gif">';
        $smiles_zam[10] = '<img src="/system/smile/cray.gif">';
        $smiles_zam[11] = '<img src="/system/smile/secret.gif">';
        $smiles_zam[12] = '<img src="/system/smile/aggressive.gif">';
        $smiles_zam[13] = '<img src="/system/smile/fool.gif">';
        $smiles_zam[14] = '<img src="/system/smile/beee.gif">';
        $smiles_zam[15] = '<img src="/system/smile/mosking.gif">';
        $smiles_zam[16] = '<img src="/system/smile/diablo.gif">';
        $smiles_zam[17] = '<img src="/system/smile/music2.gif">';
        $smiles_zam[18] = '<img src="/system/smile/air_kiss.gif">';
        $smiles_zam[19] = '<img src="/system/smile/stop.gif">';
        $smiles_zam[20] = '<img src="/system/smile/kiss_3.gif">';
        $smiles_zam[21] = '<img src="/system/smile/give_rose.gif">';
        $smiles_zam[22] = '<img src="/system/smile/good.gif">';
        $smiles_zam[23] = '<img src="/system/smile/drinks.gif">';
        $smiles_zam[24] = '<img src="/system/smile/man_in_love.gif">';
        $smiles_zam[25] = '<img src="/system/smile/bomb.gif">';
        $smiles_zam[26] = '<img src="/system/smile/wacko.gif">';
        $smiles_zam[27] = '<img src="/system/smile/mamba.gif">';
        $smiles_zam[28] = '<img src="/system/smile/pardon.gif">';
        $smiles_zam[29] = '<img src="/system/smile/nea.gif">';
        $smiles_zam[30] = '<img src="/system/smile/crazy.gif">';
        $smiles_zam[31] = '<img src="/system/smile/dntknw.gif">';
        $smiles_zam[32] = '<img src="/system/smile/sorry.gif">';
        $smiles_zam[33] = '<img src="/system/smile/yahoo.gif">';
        $smiles_zam[34] = '<img src="/system/smile/dance4.gif">';
        $smiles_zam[35] = '<img src="/system/smile/help.gif">';
        $smiles_zam[36] = '<img src="/system/smile/ok.gif">';
        $smiles_zam[37] = '<img src="/system/smile/preved.gif">';
        $smiles_zam[38] = '<img src="/system/smile/acute.gif">';
        $smiles_zam[39] = '<img src="/system/smile/bye.gif">';
        $smiles_zam[40] = '<img src="/system/smile/mail1.gif">';
        $smiles_zam[41] = '<img src="/system/smile/dash1.gif">';
        $smiles_zam[42] = '<img src="/system/smile/yes3.gif">';
        $smiles_zam[43] = '<img src="/system/smile/scratch_one-s_head.gif">';
        $smiles_zam[44] = '<img src="/system/smile/lol.gif">';
        $smiles_zam[45] = '<img src="/system/smile/i-m_so_happy.gif">';
        $smiles_zam[46] = '<img src="/system/smile/pleasantry.gif">';
        $smiles_zam[47] = '<img src="/system/smile/heart.gif">';
        $smiles_zam[48] = '<img src="/system/smile/boredom.gif">';
        $smiles_zam[49] = '<img src="/system/smile/new_russian.gif">';
        $smiles_zam[50] = '<img src="/system/smile/nono.gif">';
        $smiles_zam[51] = '<img src="/system/smile/posle.gif">';
        $smiles_zam[52] = '<img src="/system/smile/punish.gif">';
        $smiles_zam[53] = '<img src="/system/smile/wink.gif">';
        $smiles_zam[54] = '<img src="/system/smile/angel.gif">';

        $smil_return = str_replace($smiles_link, $smiles_zam, $strings); 
		
     return $smil_return; 
    } 
	
	
	
	function SmileString($string) 
	{ 
		/**
		* Безопастные значение 
		* для смайликов
		*/
        $smiles_link = array(); 
        $smiles_link[0] = '*rofl*'; 
        $smiles_link[1] = ':-D'; 
		$smiles_link[2] = '*bravo*';
		$smiles_link[3] = ':-)';	
		$smiles_link[4] = ':-(';	
		$smiles_link[5] = ':-P';	
		$smiles_link[6] = '*dirol*';	
		$smiles_link[7] = '*blush*';	
		$smiles_link[8] = '*shok*';	
		$smiles_link[9] = '*kiss*';	
		$smiles_link[10] = '*cray*';	
		$smiles_link[11] = '*secret*';	
		$smiles_link[12] = '*aggressive*';	
		$smiles_link[13] = '*fool*';	
		$smiles_link[14] = ':-/';	
		$smiles_link[15] = '*mosking*';	
		$smiles_link[16] = '*diablo*';	
		$smiles_link[17] = '*music*';	
		$smiles_link[18] = '*kissed*';	
		$smiles_link[19] = '*stop*';	
		$smiles_link[20] = '*kissing*';	
		$smiles_link[21] = '*rose*';	
		$smiles_link[22] = '*good*';	
		$smiles_link[23] = '*drinks*';	
		$smiles_link[24] = '*love*';	
		$smiles_link[25] = '*bomba*';	
		$smiles_link[26] = '*wacko*';	
		$smiles_link[27] = '*mamba*';	
		$smiles_link[28] = '*pardon*';	
		$smiles_link[29] = '*no*';	
		$smiles_link[30] = '*crazy*';	
		$smiles_link[31] = '*hz*';	
		$smiles_link[32] = '*sorry*';	
		$smiles_link[33] = '*yahoo*';	
		$smiles_link[34] = '*dance*';	
		$smiles_link[35] = '*help*';	
		$smiles_link[36] = '*ok*';	
		$smiles_link[37] = '*hello*';	
		$smiles_link[38] = '*acute*';	
		$smiles_link[39] = '*bye*';	
		$smiles_link[40] = '*mail*';	
		$smiles_link[41] = '*dash*';	
		$smiles_link[42] = '*yes*';	
	    $smiles_link[43] = '*scratch*';
        $smiles_link[44] = '*lol*';	
        $smiles_link[45] = '*happy*';	
        $smiles_link[46] = '*db*';	
        $smiles_link[47] = '*loves*';	
	    $smiles_link[48] = '*boredom*';	
	    $smiles_link[49] = '*krut*';	
	    $smiles_link[50] = '*nono*';	
	    $smiles_link[51] = '*posle*';	
	    $smiles_link[52] = '*punish*';	
	    $smiles_link[53] = '*wink*';	
	    $smiles_link[54] = '*angel*';	

		/**
		* Ссылки на смайлики
		* Которые будут вставлены вместо значений
		*/
        $smiles_zam = array(); 
        $smiles_zam[0] = 'rofl.gif'; 
        $smiles_zam[1] = 'biggrin.gif'; 
        $smiles_zam[2] = 'clapping.gif';
        $smiles_zam[3] = 'smile.gif';
        $smiles_zam[4] = 'sad.gif';
        $smiles_zam[5] = 'blum3.gif';
        $smiles_zam[6] = 'dirol.gif';
        $smiles_zam[7] = 'blush2.gif';
        $smiles_zam[8] = 'shok.gif';
        $smiles_zam[9] = 'kiss.gif';
        $smiles_zam[10] = 'cray.gif';
        $smiles_zam[11] = 'secret.gif';
        $smiles_zam[12] = 'aggressive.gif';
        $smiles_zam[13] = 'fool.gif';
        $smiles_zam[14] = 'beee.gif';
        $smiles_zam[15] = 'mosking.gif';
        $smiles_zam[16] = 'diablo.gif';
        $smiles_zam[17] = 'music2.gif';
        $smiles_zam[18] = 'airkiss.gif';
        $smiles_zam[19] = 'stop.gif';
        $smiles_zam[20] = 'kiss_3.gif';
        $smiles_zam[21] = 'give_rose.gif';
        $smiles_zam[22] = 'good.gif';
        $smiles_zam[23] = 'drinks.gif';
        $smiles_zam[24] = 'man_in_love.gif';
        $smiles_zam[25] = 'bomb.gif';
        $smiles_zam[26] = 'wacko.gif';
        $smiles_zam[27] = 'mamba.gif';
        $smiles_zam[28] = 'pardon.gif';
        $smiles_zam[29] = 'nea.gif';
        $smiles_zam[30] = 'crazy.gif';
        $smiles_zam[31] = 'dntknw.gif';
        $smiles_zam[32] = 'sorry.gif';
        $smiles_zam[33] = 'yahoo.gif';
        $smiles_zam[34] = 'dance4.gif';
        $smiles_zam[35] = 'help.gif';
        $smiles_zam[36] = 'ok.gif';
        $smiles_zam[37] = 'preved.gif';
        $smiles_zam[38] = 'acute.gif';
        $smiles_zam[39] = 'bye.gif';
        $smiles_zam[40] = 'mail1.gif';
        $smiles_zam[41] = 'dash1.gif';
        $smiles_zam[42] = 'yes3.gif';
        $smiles_zam[43] = 'scratch_one-s_head.gif';
        $smiles_zam[44] = 'lol.gif';
        $smiles_zam[45] = 'i-m_so_happy.gif';
        $smiles_zam[46] = 'pleasantry.gif';
        $smiles_zam[47] = 'heart.gif';
        $smiles_zam[48] = 'boredom.gif';
        $smiles_zam[49] = 'new_russian.gif';
        $smiles_zam[50] = 'nono.gif';
        $smiles_zam[51] = 'posle.gif';
        $smiles_zam[52] = 'punish.gif';
        $smiles_zam[53] = 'wink.gif';
		$smiles_zam[54] = 'angel.gif';
        $smil = str_replace($smiles_zam, $smiles_link, $string); 
		
    return $smil; 
    } 
	
	
	
	
}
$smile_class = new Smiles;
?>