Beispiel #1
0
function tep_get_generated_topic_path_ids($id, $from = 'topic')
{
    $calculated_topic_path_string = '';
    $calculated_topic_path = tep_generate_topic_path($id, $from);
    for ($i = 0, $n = sizeof($calculated_topic_path); $i < $n; $i++) {
        for ($j = 0, $k = sizeof($calculated_topic_path[$i]); $j < $k; $j++) {
            $calculated_topic_path_string .= $calculated_topic_path[$i][$j]['id'] . '_';
        }
        $calculated_topic_path_string = substr($calculated_topic_path_string, 0, -1) . '<br>';
    }
    $calculated_topic_path_string = substr($calculated_topic_path_string, 0, -4);
    if (strlen($calculated_topic_path_string) < 1) {
        $calculated_topic_path_string = TEXT_TOP;
    }
    return $calculated_topic_path_string;
}
Beispiel #2
0
     $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&amp;tID=' . $tInfo->topics_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 case 'move_topic':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_MOVE_TOPIC . '</b>');
     $contents = array('form' => tep_draw_form('topics', FILENAME_ARTICLES, 'action=move_topic_confirm&amp;tPath=' . $tPath) . tep_draw_hidden_field('topics_id', $tInfo->topics_id));
     $contents[] = array('text' => sprintf(TEXT_MOVE_TOPICS_INTRO, $tInfo->topics_name));
     $contents[] = array('text' => '<br>' . sprintf(TEXT_MOVE, $tInfo->topics_name) . '<br>' . tep_draw_pull_down_menu('move_to_topic_id', tep_get_topic_tree(), $current_topic_id));
     $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_move.gif', IMAGE_MOVE) . ' <a href="' . tep_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&amp;tID=' . $tInfo->topics_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 case 'delete_article':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_ARTICLE . '</b>');
     $contents = array('form' => tep_draw_form('articles', FILENAME_ARTICLES, 'action=delete_article_confirm&amp;tPath=' . $tPath) . tep_draw_hidden_field('articles_id', $aInfo->articles_id));
     $contents[] = array('text' => TEXT_DELETE_ARTICLE_INTRO);
     $contents[] = array('text' => '<br><b>' . $aInfo->articles_name . '</b>');
     $article_topics_string = '';
     $article_topics = tep_generate_topic_path($aInfo->articles_id, 'article');
     for ($i = 0, $n = sizeof($article_topics); $i < $n; $i++) {
         $topic_path = '';
         for ($j = 0, $k = sizeof($article_topics[$i]); $j < $k; $j++) {
             $topic_path .= $article_topics[$i][$j]['text'] . '&nbsp;&gt;&nbsp;';
         }
         $topic_path = substr($topic_path, 0, -16);
         $article_topics_string .= tep_draw_checkbox_field('article_topics[]', $article_topics[$i][sizeof($article_topics[$i]) - 1]['id'], true) . '&nbsp;' . $topic_path . '<br>';
     }
     $article_topics_string = substr($article_topics_string, 0, -4);
     $contents[] = array('text' => '<br>' . $article_topics_string);
     $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&amp;aID=' . $aInfo->articles_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 case 'move_article':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_MOVE_ARTICLE . '</b>');
     $contents = array('form' => tep_draw_form('articles', FILENAME_ARTICLES, 'action=move_article_confirm&amp;tPath=' . $tPath) . tep_draw_hidden_field('articles_id', $aInfo->articles_id));