Esempio n. 1
0
File: tag.php Progetto: arh922/ain
 function tags_and_synonyms()
 {
     $db_function_obj = new DbFunctions();
     $tags = $db_function_obj->tags_and_synonyms();
     $table = '<div class="box box-bordered">';
     $table .= '<div class="box-title">
                       <h3><i class="icon-th-list"></i> Add Realted Tags</h3>
                   </div>';
     $table .= "<div class='box-content nopadding'>";
     $table .= "<table id='synonyms_table' border='1' style='width: 400px; border: 1px solid !important;'>\n                      <tr><td>parent</td><td>name</td><td>synonyms</td><td><br /></td></tr>";
     foreach ($tags as $tag) {
         //  $tag['synonyms'] = str_replace("DDD", "<", $tag['synonyms']);
         //  $tag['synonyms'] = str_replace("CCC", ">", $tag['synonyms']);
         //    $tag['synonyms'] = str_replace("EEE", "</a>", $tag['synonyms']);
         $table .= "<tr id='tag_{$tag['id']}'>\n                             <td>{$tag['parent']}</td>\n                             <td>{$tag['name']}</td>\n                             <td id='synonyms_{$tag['id']}'>{$tag['synonyms']}</td>\n                             <td>\n                                  <input type='text' style='500px' id='related_tags_{$tag['id']}' />\n                                  word1,word2,word3,...  <br />\n                                  <input type='button' value='Save' onclick='SaveRelatedTags({$tag['parent']}, \"{$tag['name']}\")' />\n                             </td>\n                          </tr>";
     }
     $table .= "</table>";
     $table .= "</div>";
     $table .= "</div>";
     return $table;
 }