示例#1
0
function vam_get_generated_topic_path_ids($id, $from = 'topic')
{
    $calculated_topic_path_string = '';
    $calculated_topic_path = vam_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;
}
示例#2
0
     $contents[] = array('align' => 'center', 'text' => '<br>' . '<span class="button"><button type="submit" value="' . BUTTON_DELETE . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</button></span>' . ' <a class="button" href="' . vam_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&tID=' . $tInfo->topics_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
     break;
 case 'move_topic':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_MOVE_TOPIC . '</b>');
     $contents = array('form' => vam_draw_form('topics', FILENAME_ARTICLES, 'action=move_topic_confirm&tPath=' . $tPath) . vam_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>' . vam_draw_pull_down_menu('move_to_topic_id', vam_get_topic_tree(), $current_topic_id));
     $contents[] = array('align' => 'center', 'text' => '<br>' . '<span class="button"><button type="submit" value="' . BUTTON_MOVE . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/move.png', '', '12', '12') . '&nbsp;' . BUTTON_MOVE . '</button></span>' . ' <a class="button" href="' . vam_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&tID=' . $tInfo->topics_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
     break;
 case 'delete_article':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_ARTICLE . '</b>');
     $contents = array('form' => vam_draw_form('articles', FILENAME_ARTICLES, 'action=delete_article_confirm&tPath=' . $tPath) . vam_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 = vam_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 .= vam_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>' . '<span class="button"><button type="submit" value="' . BUTTON_DELETE . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</button></span>' . ' <a class="button" href="' . vam_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&aID=' . $aInfo->articles_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
     break;
 case 'move_article':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_MOVE_ARTICLE . '</b>');
     $contents = array('form' => vam_draw_form('articles', FILENAME_ARTICLES, 'action=move_article_confirm&tPath=' . $tPath) . vam_draw_hidden_field('articles_id', $aInfo->articles_id));