Поиск по сайту

Результаты поиска: «text»

Найдено совпадений: 2286

ОН наверно хотел так:
text|text|text|text|text|4|text|
text|text|text|text|text|2|text|
text|text|text|text|text|1|text|
text|text|text|text|text|3|text|
И что бы после выполнения скрипта получалось так:
text|text|text|text|text|1|text|
text|text|text|text|text|2|text|
text|text|text|text|text|3|text|
text|text|text|text|text|4|text|
<?
Array ( [0] => text|text|text|text|text|4|text| [1] => text|text|text|text|text|2|text| [2] => text|text|text|text|text|1|text| [3] => text|text|text|text|text|3|text| ) //выполнение скрипта
Содержимое file.txt:
text|text|text|text|text|4|text|
text|text|text|text|text|2|text|
text|text|text|text|text|1|text|
text|text|text|text|text|3|text|
Не сортерует)
<?
//smiles.php

function smiles($text)
{

$text = str_replace(":) ","<img src='smiles/).gif' alt=':) '/>",$text);
$text = str_replace(":( ","<img src='smiles/(.gif' alt=':( '/>",$text);
$text = str_replace(";)","<img src='smiles/;).gif' alt=';)'/>",$text);
$text = str_replace(".3dsmaile.","<img src='smiles/3dsmile.gif' alt='3dsmile'/>",$text);
$text = str_replace(".4moks.","<img src='smiles/4moks.gif' alt='4moks'/>",$text);
$text = str_replace(".aaa.","<img src='smiles/aaa.gif' alt='aaa'/>",$text);
$text = str_replace(".admin.","<img src='smiles/admin.gif' alt='admin'/>",$text);
$text = str_replace(".aga.","<img src='smiles/aga.gif' alt='aga'/>",$text);
$text = str_replace(".be.","<img src='smiles/be.gif' alt='be'/>",$text);
$text = str_replace(".bebe.","<img src='smiles/bebe.gif' alt='bebe'/>",$text);
$text = str_replace(".beer.","<img src='smiles/beer.gif' alt='beer'/>",$text);
$text = str_replace(".best.","<img src='smiles/best.gif' alt='best'/>",$text);
$text = str_replace(".biggrin.","<img src='smiles/biggrin.gif' alt='biggrin'/>",$text);
$text = str_replace(".blush.","<img src='smiles/blush.gif' alt='blush'/>",$text);
$text = str_replace(".blya.","<img src='smiles/blya.gif' alt='blya'/>",$text);
$text = str_replace(".boggle.","<img src='smiles/boggle.gif' alt='boggle'/>",$text);
$text = str_replace(".buhaem.","<img src='smiles/buhaem.gif' alt='buhaem'/>",$text);
$text = str_replace(".buket.","<img src='smiles/buket.gif' alt='buket'/>",$text);...
image
Хотя здесь похоже на то, что этих дополей нет таки в файле иксфайледс.
Вот так в этом файле должно быть:
description|Описание (не уникальное)||text||1|0|0|0|||0|0|||||||||
kinopoisk_id|ID Kinopoisk||text||1|0|0|0|||0|0|||||||||
imdb_id|ID IMDB||text||1|0|0|0|||0|0|||||||||
tmdb_id|ID TMDB||text||1|0|0|0|||0|0|||||||||
tokenalloha|Токен фильма в базе Аллоха||text||1|0|0|0|||0|0||||||||||||||||0|
world_art_id|ID WORLD ART||text||1|0|0|0|||0|0|||||||||
shikimori_id|ID Shikimori||text||1|0|0|0|||0|0|||||||||
poster|Постер||text||1|0|0|0|||0|0|||||||||
poster_url|Загружаемое изображение Постер||image||1|0|0|0|340x460||1|0||||||Для Коллапса||||||||||0|1
screenshots|Скриншоты||imagegalery||0|0|0|0|480||1|0||||0||||||||||||0|1
iframe_aloha|Плеер Алоха||text||1|0|0|0|||0|0||||||||||||||||0|
iframe_bazon|Плеер Bazon||text||1|0|0|0|||0|0||||||||||||||||0|
iframe_ustore|Плеер Ustore ссылка на фильм||text||1|0|0|0|||0|0||||||||||||||||0|
iframe_vcdn|Плеер VideoCDN||text||1|0|0|0|||0|0||||||Ссылка на плеер VideoCDN||||||||||0|
iframe_kodik|Плеер Kodik||text||1|0|0|0|||0|0||||||||||||||||0|
iframe_collaps|Плеер Collaps||text||1|0|0|0|||0|0||||||||||||||||0|
trailer|Трейлер||text||1|0|0|0|||0|0|||||||||
title_ru|Название||text||1|0|0|0|||0|0|||||||||
title_en|Оригинальное название||text||1|0|0|0|||0|0||||||||||||||
title_alt|Альтернативное название||text||1|0|0|0|||0|0||||||||||||||
slogan|Слоган||text||1|0|0|0|||0|0||||||||||||||
countries|Страны||text||1|1|0|0|||0|0||||||||||||||
year|Год выхода||text||1|1|0|0|||0|0|||||||||
age|Возрастное ограничение||text||1|0|0|0|||0|0||||||||||||||
genres|Жанры||text||1|1|0|0|||0|0|||||||||
actors|Актеры||text||1|1|0|0|||0|0|||||||||
directors|Режиссеры||text||1|1|0|0|||0|0||||||||||||||
quality|Качество видео Алоха||text||1|0|0|0|||0|0||||||||||||||||0|
quality_bazon|Качество Bazon||text||1|0|0|0|||0|0||||||||||||||||0|
quality_ustore|Качество Ustore||text||1|0|0|0|||0|0||||||||||||||||0|
quality_vcdn|Качество VCDN||text||1|0|0|0|||0|0||||||||||||||||0|
quality_kodik|Качество видео Kodik||text||1|1|0|0|||0|0|||||||||
last_season|Последний сезон||text||1|0|0|0|||0|0|||||||||
last_episode|Последний эпизод||text||1|0|0|0|||0|0|||||||||
episode_count|Кол-во эпизодов в сезоне||text||1|0|0|0|||0|0||||||||||||||
episode_plus|Последняя...
Создание форм и получение содержимого в одной переменной

Класс
<?
define('BR',1);
class forms{
var $action;
var $method;
var $form_start;
var $form_close = '</form>';
var $clform;
var $cols = '25';
var $rows = '4';
var $size;
var $maxlength;
var $text;

function forms($action,$method)
{
		$this->action = $action;
		$this->method = $method;
		$this->form_start = '<form action="'.$action.'" method="'.$method.'">';
}

function addelem($TYPE,$form_type=null,$NAME,$VALUE=null,$br=null,$option=null)
{
	if ($form_type == '') {$form_type = 'text';}
	if ($br){$br = '<br />';}
	if (!empty($this->text)){$text = $this->text."\n";}
        if (!empty($this->size)){$size = 'size="'.$this->size.'"';}
	if (!empty($this->maxlength)){$maxlength = 'maxlength="'.$this->maxlength.'"';}
	
	
if ($TYPE == 'input')
{
		$this->clform[] = $text.'<input type="'.$form_type.'" name="'.$NAME.'" value="'.$VALUE.'" '.$size.' '.$maxlength.'/>'.$br;
}

elseif ($TYPE == 'textarea')
{...
function filter($text){
$text=str_replace('&','', $text);
$text=str_replace('$','', $text);
$text=str_replace('<','<', $text);
$text=str_replace('>','>', $text);
$text=str_replace('~','', $text);
$text=str_replace('`','', $text);
$text=str_replace('#','', $text);
$text=str_replace('*','', $text);
$text=str_replace('%','', $text);
return addslashes(trim(htmlspecialchars(stripslashes(chop($text)))));
}
Во как делаю, почти тоже самое.
хм... http://igru6ek.ru/bbcode.html
function tags($text = '') {
$text = preg_replace('#\[b\](.*?)\[/b\]#si', '<span style="font-weight: bold;">\1</span>', $text);
$text = preg_replace('#\[i\](.*?)\[/i\]#si', '<span style="font-style:italic;">\1</span>', $text);
$text = preg_replace('#\[u\](.*?)\[/u\]#si', '<span style="text-decoration:underline;">\1</span>', $text);
$text = preg_replace('#\[s\](.*?)\[/s\]#si', '<span style="text-decoration: line-through;">\1</span>', $text);
$text = preg_replace('#\[red\](.*?)\[/red\]#si', '<span style="color:red">\1</span>', $text);
$text = preg_replace('#\[green\](.*?)\[/green\]#si', '<span style="color:green">\1</span>', $text);
$text = preg_replace('#\[blue\](.*?)\[/blue\]#si', '<span style="color:blue">\1</span>', $text);
$text = preg_replace_callback('~\\[url=(https?://.+?)\\](.+?)\\[/url\\]|(https?://(www.)?[0-9a-z\.-]+\.[0-9a-z]{2,6}[0-9a-zA-Z/\?\.\~&amp;_=/%-:#]*)~', 'url_replace', $text);
return $text;
}
CREATE TABLE `cclub_clicks` (
`who` text,
`to` text,
`ts` bigint(20) default NULL,
`id_user` text
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `cclub_guest` (
`id` int(11) NOT NULL auto_increment,
`who` text,
`text` text,
`answer` text,
`ts` bigint(20) default NULL,
`ua` text,
`nans` text,
`izmts` BIGINT(20) NOT NULL,
`izmkol` INT(3) NOT NULL DEFAULT '0',
`izmwho` TEXT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

CREATE TABLE IF NOT EXISTS `cclub_lichka` (
`number` int(11) NOT NULL auto_increment,
`idot` text character set utf8 collate utf8_unicode_ci NOT NULL,
`idto` text character set utf8 collate utf8_unicode_ci NOT NULL,
`date` varchar(255) character set utf8 collate utf8_unicode_ci...
$text=str_replace('&','', $text);
$text=str_replace('$','', $text);
$text=str_replace('<','<', $text);
$text=str_replace('>','>', $text);
$text=str_replace('~','', $text);
$text=str_replace('`','', $text);
$text=str_replace('#','', $text);
$text=str_replace('*','', $text);
$text=str_replace('%','', $text);
а это для чего?
<?php
function bb_code($text)
{
$text=preg_replace('/\[b\](.+)\[\/b\]/sU', '<b>\1</b>', $text);
$text=preg_replace('/\[i\](.+)\[\/i\]/sU', '<i>\1</i>', $text);
$text=preg_replace('/\[u\](.+)\[\/u\]/sU', '<u>\1</u>', $text);
$text=preg_replace('/\[s\](.+)\[\/s\]/sU', '<s>\1</s>', $text);
$text=preg_replace('/'.preg_quote('[url=').'(.+)\](.+)\[\/url\]/sU', '<a href="\1">\2</a>', $text);
$text=preg_replace('/\[url\](.+)\[\/url\]/sU', '<a href="\1">\1</a>', $text);
return $text;
}
$text='Текст с bb-кодами';
$text=bb_code($text);
обработчик текста
echo bb_code($string);