本文整理汇总了PHP中delete_all函数的典型用法代码示例。如果您正苦于以下问题:PHP delete_all函数的具体用法?PHP delete_all怎么用?PHP delete_all使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了delete_all函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: extract_label_koef
function extract_label_koef($html)
{
$html = kill_tag_bound($html, 'div|tr');
$label = delete_all(copy_be($html, '<td', '</td>', 'label'), '<', '>');
$koef = delete_all(copy_be($html, '<td', '</td>', '\'odd\''), '<', '>');
return array($label, $koef);
}
示例2: extract_league
function extract_league($Html)
{
$Html = extract_tags($Html, '<input', '>', "\r\n", 'catm[]');
$Html = delete_all($Html, '<', 'name=');
$Html = delete_all($Html, '"', '>');
$Html = replace_all($Html, '[]', '"', '[]=');
return $Html;
}
示例3: kill_table_row
function kill_table_row($Html, $Tag)
{
$Tags = explode('|', $Tag);
foreach ($Tags as $t) {
$Html = delete_all($Html, '<tr', '</tr>', $t);
}
return $Html;
}
示例4: extract_bet
function extract_bet($Html)
{
$Html = copy_be($Html, '<form ', '</form>', 'betform');
$Html = kill_tag($Html, 'script|div');
$Html = kill_space($Html);
$Html = kill_tag_bound($Html, 'b|span|br|i|a|input|font|img');
$Html = delete_all($Html, '<tr', '</tr>', 'line3');
$Html = kill_property_value_exclude($Html, 'class', 'line_table');
$Html = kill_property($Html, 'width|height|valign|align|bgcolor|style|border|cellspacing|cellpadding');
// Убираем "левые" данные
$Html = replace_all_contain($Html, '<tr', '</tr>', '', 'Хозяева|' . 'Гости|' . 'Индив.тотал:|' . '-я четверть|' . '-я партия|' . ' тайм|' . '-й сет');
return $Html;
}
示例5: extract_bet
function extract_bet($Html)
{
$Html = extract_tags($Html, '<table cellSpacing=2 cellPadding=1', '</table>', "\r\n");
$Html = kill_space($Html);
$Html = kill_tag_bound($Html, 'b|a|br|font|img');
$Html = str_ireplace(' nowrap', '', $Html);
$Html = kill_property($Html, 'onmouseover|onclick|align|id|style|width|cellspacing');
// Убираем строки без ставок
$Html = delete_all($Html, '<tr>', '</tr>', 'class="t_comment"');
$Html = delete_all($Html, '<tr>', '</tr>', 'class="t_comment1"');
$Html = str_ireplace(' class=date', ' @lass=date', $Html);
$Html = kill_property($Html, 'class');
$Html = str_ireplace(' @lass=date', ' class=date', $Html);
return $Html;
}
示例6: extract_league
function extract_league($Html)
{
$Html = copy_be($Html, '<form ', '</form>', '"frmTurnirs"');
$Html = extract_tags($Html, '<input', '>', "\r\n", 'id="sport_', 'name="turnir_');
$Html = delete_all($Html, '<input', '>', 'turnir_2_');
// Бейсбол
$Html = delete_all($Html, '<input', '>', 'turnir_12_');
// Бокс
$Html = delete_all($Html, '<input', '>', 'turnir_254_');
// Лотереи
$Html = delete_all($Html, '<input', '>', 'turnir_255_');
// Другие виды спорта
$Html = delete_all($Html, '<input', '>', 'turnir_6_');
// Хоккей
$Html = extract_property_values($Html, 'name', ';');
return $Html;
}
示例7: extract_bet
function extract_bet($Html)
{
// Разбираемся с концами строк
$Html = str_ireplace("\n", '<br>', $Html);
$Html = str_ireplace("\r", '<br>', $Html);
$Html = copy_be($Html, '<form name=f1>', '</form>');
$Html = str_ireplace(' ', ' ', $Html);
$Html = kill_tag_bound($Html, 'input|itemevent|a|b');
$Html = str_ireplace(' noshade', '', $Html);
$Html = kill_property($Html, 'time|color');
$Html = replace_all($Html, '<sup>', '</sup>', ' ');
$Html = kill_tag($Html, 'big');
$Html = str_ireplace('<endpreview/>', '', $Html);
$Html = str_ireplace('<hr><br>', '<hr>', $Html);
$Html = str_ireplace('<br>Оглавление<', '<', $Html);
$Html = str_ireplace('<br>Оглавление<', '<', $Html);
$Html = replace_all($Html, '<u>', '</form>', '</form>');
$Html = kill_tag_bound($Html, 'u|form');
$Html = delete_all($Html, '<span ', '</span>', 'maxcap');
return $Html;
}
示例8: extract_bet
function extract_bet($Html)
{
$Html = copy_be($Html, '<form name=f1', '</form>', 'Дома');
$Html = kill_space($Html);
$Html = kill_tag($Html, 'script');
$Html = kill_tag_bound($Html, 'b|a|tbody|small|colgroup');
// <!-- Выносим Экспресы и информацию о предыдущих встречах -->
$Html = str_ireplace('<span class=tr>1</span>', '', $Html);
$Html = delete_all($Html, '<tr>', '</tr>', '<span class=tr>');
$Html = delete_all($Html, '<span class=n>', '</span>');
// <!-- Убираем строки с кнопками -->
$Html = delete_all($Html, '<table ', '</table>', '<input ');
// <!-- Заменяем IMG с информацией на igif для последующего удаления -->
$Html = replace_all($Html, '<img ', '>', "igif");
// <!-- Убираем левые коэффициенты в скобках -->
$Html = replace_all($Html, '>(', ')', '>');
// <!-- Убираем оглавление -->
$Html = delete_all($Html, "<div ", "</div", "Оглавление");
$Html = kill_property($Html, 'width|border');
$Html = replace_all_contain($Html, '<tr', '</tr>', '', '>Хозяева|' . '>Гости|' . '>Фолы|' . '>ж/к|' . '>угл.');
return $Html;
}
示例9: extract_main_bets
function extract_main_bets(&$tournir_node, $html, $sport_sign, $tournir_id)
{
$subjects_file = "phrases/olymp/subjects.txt";
$subjects = file_get_hash($subjects_file);
$event_id = extract_property_values(copy_be($html, '<ul', '>', 'rel'), 'rel', '');
$html = kill_tag_bound($html, 'u');
$cells = extract_all_tags($html, '<li', '</li>');
$i = 0;
foreach ($cells as $cell) {
$cells[$i++] = delete_all($cell, '<', '>', 'li');
}
list($day_no, $month_no, $year_no, $hour, $minute) = decode_datetime(str_ireplace('<br>', ' ', $cells[0]));
list($gamer1_name, $gamer2_name) = explode('<br/>', $cells[2]);
$event_node = event_create($tournir_node, $event_id, mktime($hour, $minute, 0, $month_no, $day_no, $year_no), $gamer1_name, $gamer2_name);
if ($cells[3] != '') {
add_bet($event_node, 'Period=Match;Gamer=1;Modifier=Win;Koef=' . $cells[3]);
}
if ($cells[4] != '') {
add_bet($event_node, 'Period=Match;Modifier=Draw;Koef=' . $cells[4]);
}
if ($cells[5] != '') {
add_bet($event_node, 'Period=Match;Gamer=2;Modifier=Win;Koef=' . $cells[5]);
}
if ($cells[6] != '') {
add_bet($event_node, 'Period=Match;Kind=DoubleChance;Modifier=NoLose;Gamer=1;Koef=' . $cells[6]);
}
if ($cells[7] != '') {
add_bet($event_node, 'Period=Match;Kind=DoubleChance;Modifier=NoDraw;Koef=' . $cells[7]);
}
if ($cells[8] != '') {
add_bet($event_node, 'Period=Match;Kind=DoubleChance;Modifier=NoLose;Gamer=2;Koef=' . $cells[8]);
}
if ($cells[9] != '') {
preg_match('/\\(([\\+\\-]*?)(.+?)\\)<br\\/>(.+?)/iU', $cells[9], $matches);
if ($matches[1] == '' and $matches[2] != '0') {
$matches[1] = '+';
}
add_bet($event_node, 'Period=Match;Kind=Fora;Value=' . $matches[1] . $matches[2] . ';Modifier=Win;Gamer=1;Koef=' . $matches[3]);
}
if ($cells[10] != '') {
preg_match('/\\(([\\+\\-]*?)(.+?)\\)<br\\/>(.+?)/iU', $cells[10], $matches);
if ($matches[1] == '' and $matches[2] != '0') {
$matches[1] = '+';
}
add_bet($event_node, 'Period=Match;Kind=Fora;Value=' . $matches[1] . $matches[2] . ';Modifier=Win;Gamer=2;Koef=' . $matches[3]);
}
if ($cells[12] != '') {
$value = $cells[11];
if (!strpos($value, '.')) {
$value = $value + 0.5;
}
add_bet($event_node, 'Period=Match;' . $subjects[$sport_sign] . ';Kind=Total;Value=' . $value . ';Modifier=Under;Koef=' . $cells[12]);
}
if ($cells[13] != '') {
$value = $cells[11];
if (!strpos($value, '.')) {
$value = $value - 0.5;
}
add_bet($event_node, 'Period=Match;' . $subjects[$sport_sign] . ';Kind=Total;Value=' . $value . ';Modifier=Over;Koef=' . $cells[13]);
}
}
示例10: delete_all
function delete_all($path)
{
$dir = dir($path);
while ($file = $dir->read()) {
if ($file == '.' || $file == '..') {
continue;
}
$file = $path . '/' . $file;
if ($file != $path . '/.htaccess') {
// Never remove a .htaccess
if (is_dir($file)) {
delete_all($file);
rmdir($file);
} else {
unlink($file);
}
}
}
}
示例11: extract_tag_from_tag
function extract_tag_from_tag($html, $outer_tag, $inner_tag, $kill_bounds = null)
{
$ul_tagno = copy_be($html, "<{$outer_tag}", '>');
$ul_tagno = extract_tagno($ul_tagno, $outer_tag);
$html = extract_numbered_tag($html, $outer_tag, $ul_tagno);
$result = array();
while ($li_tagno = copy_be($html, "<{$inner_tag}", '>')) {
$li_tagno = extract_tagno($li_tagno, $inner_tag);
$li_html = extract_numbered_tag($html, $inner_tag, $li_tagno);
$html = str_replace($li_html, '', $html);
if ($kill_bounds) {
$li_html = delete_all($li_html, "<{$inner_tag}", '>', "TagNo=\"{$inner_tag}{$li_tagno}\"");
$li_html = delete_all($li_html, "</{$inner_tag}", '>', "TagNo=\"{$inner_tag}{$li_tagno}\"");
}
$result[] = $li_html;
}
return $result;
}
示例12: delete_all
<?php
/* delete-all.php
*
**********WARNING!!!****************
* Executing this script (or opening in browser) will DELETE and COMMIT
* all data in the project Solr index.
*/
require "layout/head.php";
//require "layout/splash.php";
require "layout/nav-search.php";
require_once 'solr.php';
?>
<div class="container-fluid">
<pre>
<?php
delete_all();
?>
</pre>
</div>
<?php
?>
<?php
require "layout/footer.php";
require "layout/scripts.php";
示例13: foreach
$form['maintenance'] = '0';
}
foreach ($form as $key => $input) {
// Only update values that have changed
if (array_key_exists('o_' . $key, $luna_config) && $luna_config['o_' . $key] != $input) {
if ($input != '' || is_int($input)) {
$value = '\'' . $db->escape($input) . '\'';
} else {
$value = 'NULL';
}
$db->query('UPDATE ' . $db->prefix . 'config SET conf_value=' . $value . ' WHERE conf_name=\'o_' . $db->escape($key) . '\'') or error('Unable to update board config', __FILE__, __LINE__, $db->error());
}
}
if ($action == 'clear_cache') {
confirm_referrer('backstage/maintenance.php');
delete_all(FORUM_ROOT . 'cache');
redirect('backstage/maitenance.php?cache_cleared=true');
}
// Regenerate the config cache
if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) {
require FORUM_ROOT . 'include/cache.php';
}
generate_config_cache();
clear_feed_cache();
redirect('backstage/maintenance.php?saved=true');
}
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Maintenance', 'luna'));
define('FORUM_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('maintenance', 'maintenance');
if (isset($_GET['saved'])) {
示例14: session_start
<?php
include "basket.php";
session_start();
$products = unserialize(file_get_contents("../products/prods.db"));
foreach ($products as $key => $product) {
if ($_POST[$product["name"]] == "delete") {
delete_all($product["name"]);
}
}
?>
<html>
<body>
<form method="POST">
<table style="margin-left: 50px; background-color: #A5EDE4; border-radius: 10px;">
<tr>
<?php
if (!$_SESSION["id_session"]) {
$usr = "anon";
} else {
$usr = $_SESSION["id_session"];
}
$basket = unserialize(file_get_contents("../basket/" . $usr));
$products = unserialize(file_get_contents("../products/prods.db"));
foreach ($basket as $key => $elem) {
if ($elem) {
echo '<tr><td>' . $elem . '</td><td><input type="submit" name="' . $elem . '" value="delete"></td></tr>';
}
}
?>
</tr>
示例15: extract_main_bets
private function extract_main_bets(&$tournir_node, $html, $sport_sign, $tournir_id)
{
$event_id = extract_property_values(copy_be($html, '<ul', '>', 'rel'), 'rel', '');
$html = kill_tag_bound($html, 'u');
$cells = extract_all_tags($html, '<li', '</li>');
$i = 0;
foreach ($cells as $cell) {
$cells[$i++] = delete_all($cell, '<', '>', 'li');
}
list($day_no, $month_no, $year_no, $hour, $minute) = $this->decode_datetime(str_ireplace('<br>', ' ', $cells[0]));
list($gamer1_name, $gamer2_name) = explode('<br/>', $cells[2]);
$event_node = $this->event_create($tournir_node, $event_id, mktime($hour, $minute, 0, $month_no, $day_no, $year_no), $gamer1_name, $gamer2_name);
if ($cells[3] != '') {
$this->addBet($event_node, $this->header[3] . ';Koef=' . $cells[3]);
}
if ($cells[4] != '') {
$this->addBet($event_node, $this->header[4] . ';Koef=' . $cells[4]);
}
if ($cells[5] != '') {
$this->addBet($event_node, $this->header[5] . ';Koef=' . $cells[5]);
}
if ($cells[6] != '') {
$this->addBet($event_node, $this->header[6] . ';Koef=' . $cells[6]);
}
if ($cells[7] != '') {
$this->addBet($event_node, $this->header[7] . ';Koef=' . $cells[7]);
}
if ($cells[8] != '') {
$this->addBet($event_node, $this->header[8] . ';Koef=' . $cells[8]);
}
if ($cells[9] != '') {
preg_match('/\\(([\\+\\-]*?)(.+?)\\)<br\\/>(.+?)/iU', $cells[9], $matches);
if ($matches[1] == '' and $matches[2] != '0') {
$matches[1] = '+';
}
$this->addBet($event_node, $this->header[9] . ';Value=' . $matches[1] . $matches[2] . ';Koef=' . $matches[3]);
}
if ($cells[10] != '') {
preg_match('/\\(([\\+\\-]*?)(.+?)\\)<br\\/>(.+?)/iU', $cells[10], $matches);
if ($matches[1] == '' and $matches[2] != '0') {
$matches[1] = '+';
}
$this->addBet($event_node, $this->header[10] . ';Value=' . $matches[1] . $matches[2] . ';Koef=' . $matches[3]);
}
if ($cells[12] != '') {
$value = $cells[11];
if (!strpos($value, '.')) {
$value = $value - 0.5;
}
$this->addBet($event_node, $this->header[12] . ';Value=' . $value . ';Koef=' . $cells[12]);
}
if ($cells[13] != '') {
$value = $cells[11];
if (!strpos($value, '.')) {
$value = $value + 0.5;
}
$this->addBet($event_node, $this->header[13] . ';Value=' . $value . ';Koef=' . $cells[13]);
}
}