Exemple #1
0
 $mtags = explode(" ", $row['tags']);
 $misc = new misc();
 foreach ($mtags as $current) {
     if ($current != "") {
         $tclass->deleteindextag($current);
         if (is_dir("{$main_cache_dir}" . "" . "search_cache/" . $current . "/")) {
             $cache->destroy_page_cache("search_cache/" . $current . "/");
         } else {
             if (is_dir("{$main_cache_dir}" . "" . "search_cache/" . $misc->windows_filename_fix($current) . "/")) {
                 $cache->destroy_page_cache("search_cache/" . $misc->windows_filename_fix($current) . "/");
             }
         }
     }
 }
 foreach ($ttags as $current) {
     if ($misc->is_html(html_entity_decode($current, ENT_QUOTES, 'UTF-8'))) {
         header('Location: ../index.php');
         exit;
     }
     if (strpos($current, 'parent:') !== false) {
         $parent = str_replace("parent:", "", $current);
         if (!is_numeric($parent)) {
             $parent = '';
         }
         $query = "SELECT COUNT(*) FROM {$post_table} WHERE id='{$parent}'";
         $result = $db->query($query);
         $row = $result->fetch_assoc();
         if ($row['COUNT(*)'] < 1) {
             $parent = '';
         }
         $current = '';
Exemple #2
0
 $tag_count = count($ttags);
 if ($tag_count == 0) {
     $ttags[] = "tagme";
 }
 if ($tag_count < 5 && strpos(implode(" ", $ttags), "tagme") === false) {
     $ttags[] = "tagme";
 }
 foreach ($ttags as $current) {
     if (strpos($current, 'parent:') !== false) {
         $current = '';
         $parent = str_replace("parent:", "", $current);
         if (!is_numeric($parent)) {
             $parent = '';
         }
     }
     if ($current != "" && $current != " " && !$misc->is_html($current)) {
         $ttags = $tclass->filter_tags($tags, $current, $ttags);
         $alias = $tclass->alias($current);
         if ($alias !== false) {
             $key_array = array_keys($ttags, $current);
             foreach ($key_array as $key) {
                 $ttags[$key] = $alias;
             }
         }
     }
 }
 $tags = implode(" ", $ttags);
 foreach ($ttags as $current) {
     if ($current != "" && $current != " " && !$misc->is_html($current)) {
         $ttags = $tclass->filter_tags($tags, $current, $ttags);
         $tclass->addindextag($current);