コード例 #1
0
ファイル: preview_info.php プロジェクト: happyxlq/lt_svn
    $faqs_answer = $_POST['faqs_answer'];
    $faqs_url = $_POST['faqs_url'];
} else {
    $faqs = $db->Execute("select p.faqs_id, pd.language_id, pd.faqs_name, pd.faqs_contact_name, pd.faqs_contact_mail,\n                                      pd.faqs_description, pd.faqs_answer, pd.faqs_url, p.faqs_image, p.faqs_date_added, p.faqs_last_modified,\n                                      p.faqs_status, p.faqs_sort_order\n                               from " . TABLE_FAQS . " p, " . TABLE_FAQS_DESCRIPTION . " pd\n                               where p.faqs_id = pd.faqs_id\n                               and p.faqs_id = '" . (int) $_GET['pID'] . "'");
    $pInfo = new objectInfo($faq->fields);
    $faqs_image_name = $pInfo->faqs_image;
}
$form_action = isset($_GET['pID']) ? 'update_faq' : 'insert_faq';
echo zen_draw_form($form_action, $type_faq_admin_handler, 'fcPath=' . $fcPath . (isset($_GET['faq_type']) ? '&faq_type=' . $_GET['faq_type'] : '') . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '') . '&action=' . $form_action . (isset($_GET['page']) ? '&page=' . $_GET['page'] : ''), 'post', 'enctype="multipart/form-data"');
$languages = zen_get_languages();
for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
    if (isset($_GET['read']) && $_GET['read'] == 'only') {
        $pInfo->faqs_name = zen_get_faqs_name($pInfo->faqs_id, $languages[$i]['id']);
        $pInfo->faqs_contact_name = zen_get_faqs_contact_name($pInfo->faqs_id, $languages[$i]['id']);
        $pInfo->faqs_contact_mail = zen_get_faqs_contact_mail($pInfo->faqs_id, $languages[$i]['id']);
        $pInfo->faqs_description = zen_get_faqs_description($pInfo->faqs_id, $languages[$i]['id']);
        $pInfo->faqs_answer = zen_get_faqs_answer($pInfo->faqs_id, $languages[$i]['id']);
        $pInfo->faqs_url = zen_get_faqs_url($pInfo->faqs_id, $languages[$i]['id']);
    } else {
        $pInfo->faqs_name = zen_db_prepare_input($faqs_name[$languages[$i]['id']]);
        $pInfo->faqs_contact_name = zen_get_faqs_contact_name($pInfo->faqs_id, $languages[$i]['id']);
        $pInfo->faqs_contact_mail = zen_get_faqs_contact_mail($pInfo->faqs_id, $languages[$i]['id']);
        $pInfo->faqs_description = zen_db_prepare_input($faqs_description[$languages[$i]['id']]);
        $pInfo->faqs_answer = zen_get_faqs_answer($pInfo->faqs_id, $languages[$i]['id']);
        $pInfo->faqs_url = zen_db_prepare_input($faqs_url[$languages[$i]['id']]);
    }
    ?>
    <table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
コード例 #2
0
ファイル: collect_info.php プロジェクト: happyxlq/lt_svn
    if (is_null(HTML_EDITOR_PREFERENCE)) {
        echo TEXT_HTML_EDITOR_NOT_DEFINED;
    }
    if (HTML_EDITOR_PREFERENCE == "FCKEDITOR") {
        require_once DIR_WS_INCLUDES . 'fckeditor.php';
        $oFCKeditor = new FCKeditor('faqs_description[' . $languages[$i]['id'] . ']');
        $oFCKeditor->Value = isset($faqs_description[$languages[$i]['id']]) ? stripslashes($faqs_description[$languages[$i]['id']]) : zen_get_faqs_description($pInfo->faqs_id, $languages[$i]['id']);
        $oFCKeditor->Width = '90%';
        $oFCKeditor->Height = '230';
        //                $oFCKeditor->Config['ToolbarLocation'] = 'Out:xToolbar' ;
        //                $oFCKeditor->Create() ;
        $output = $oFCKeditor->CreateHtml();
        echo '<br />' . $output;
    } else {
        // using HTMLAREA or just raw "source"
        echo zen_draw_textarea_field('faqs_description[' . $languages[$i]['id'] . ']', 'soft', '100%', '20', isset($faqs_description[$languages[$i]['id']]) ? stripslashes($faqs_description[$languages[$i]['id']]) : zen_get_faqs_description($pInfo->faqs_id, $languages[$i]['id']));
        //,'id="'.'faqs_description' . $languages[$i]['id'] . '"');
    }
    ?>
        </td>
              </tr>
            </table></td>
          </tr>
<?php 
}
?>
          <tr>
            <td colspan="2"><?php 
echo zen_draw_separator('pixel_trans.gif', '1', '10');
?>
</td>
コード例 #3
0
ファイル: faqs_all_listing.php プロジェクト: happyxlq/lt_svn
        $fcPath = zen_get_faq_path($faqs_all->fields['faqs_id']);
        if (FAQ_ALL_DISPLAY_CATEGORY != '0' && $category_displayed != $faqs_all->fields['faq_categories_name']) {
            $category_displayed = $faqs_all->fields['faq_categories_name'];
            echo '<h3>' . $category_displayed . '</h3>';
        }
        echo '<div class="margin_t">';
        if (FAQ_ALL_LIST_NAME != '0') {
            $display_faqs_name = '<a class="u" href="' . zen_href_link(zen_get_info_faq_page($faqs_all->fields['faqs_id']), 'fcPath=' . $fcPath . '&faqs_id=' . $faqs_all->fields['faqs_id']) . '">' . $faqs_all->fields['faqs_name'] . '</a>' . str_repeat('<br clear="all" />', substr(FAQ_ALL_LIST_NAME, 3, 1));
        } else {
            $display_faqs_name = '';
        }
        $link = '<a href="' . zen_href_link(zen_get_info_faq_page($faqs_all->fields['faqs_id']), 'fcPath=' . $fcPath . '&faqs_id=' . $faqs_all->fields['faqs_id']) . '">' . MORE_INFO_TEXT . '</a>';
        $the_button = $link;
        $faqs_link = '<a href="' . zen_href_link(zen_get_info_faq_page($faqs_all->fields['faqs_id']), 'fcPath=' . $fcPath . '&faqs_id=' . $faqs_all->fields['faqs_id']) . '">' . MORE_INFO_TEXT . '</a>';
        if (FAQ_ALL_LIST_DESCRIPTION != '0') {
            $disp_text = zen_get_faqs_description($faqs_all->fields['faqs_id']);
            $disp_text = zen_clean_html($disp_text);
            $display_faqs_description = stripslashes(zen_trunc_string($disp_text, 150, '<a href="' . zen_href_link(zen_get_info_faq_page($faqs_all->fields['faqs_id']), 'fcPath=' . $fcPath . '&faqs_id=' . $faqs_all->fields['faqs_id']) . '"> ' . MORE_INFO_TEXT . '</a>'));
        } else {
            $display_faqs_description = '';
        }
        echo '<h4 class="margin_t bg_help">' . $display_faqs_name . '</h4>';
        if (FAQ_ALL_LIST_DESCRIPTION != 0 && $current_faq_category_id != 0) {
            echo '<ul>' . $display_faqs_description . '</ul>';
        }
        echo '</div>';
        $faqs_all->MoveNext();
    }
} else {
    echo '<div class="error_box">' . TEXT_NO_ALL_FAQS . '</div>';
}
コード例 #4
0
        }
        if (FAQ_FEATURED_LIST_NAME != '0') {
            $display_faqs_name = '<a href="' . zen_href_link(zen_get_info_faq_page($featured_faqs->fields['faqs_id']), 'faqs_id=' . $featured_faqs->fields['faqs_id']) . '"><strong>' . $featured_faqs->fields['faqs_name'] . '</strong></a>' . str_repeat('<br clear="all" />', substr(FAQ_FEATURED_LIST_NAME, 3, 1));
        } else {
            $display_faqs_name = '';
        }
        if (FAQ_FEATURED_LIST_DATE_ADDED != '0' and zen_get_show_faq_switch($featured_faqs->fields['faqs_id'], 'date_added')) {
            $display_faqs_date_added = TEXT_DATE_ADDED . ' ' . zen_date_long($featured_faqs->fields['faqs_date_added']) . str_repeat('<br clear="all" />', substr(FAQ_FEATURED_LIST_DATE_ADDED, 3, 1));
        } else {
            $display_faqs_date_added = '';
        }
        $link = '<a href="' . zen_href_link(zen_get_info_faq_page($featured_faqs->fields['faqs_id']), 'faqs_id=' . $featured_faqs->fields['faqs_id']) . '">' . MORE_INFO_TEXT . '</a>';
        $the_button = $link;
        $faqs_link = '<a href="' . zen_href_link(zen_get_info_faq_page($featured_faqs->fields['faqs_id']), 'faqs_id=' . $featured_faqs->fields['faqs_id']) . '">' . MORE_INFO_TEXT . '</a>';
        if (FAQ_FEATURED_LIST_DESCRIPTION != '0') {
            $disp_text = zen_get_faqs_description($featured_faqs->fields['faqs_id']);
            $disp_text = zen_clean_html($disp_text);
            $display_faqs_description = stripslashes(zen_trunc_string($disp_text, 150, '<a href="' . zen_href_link(zen_get_info_faq_page($featured_faqs->fields['faqs_id']), 'faqs_id=' . $featured_faqs->fields['faqs_id']) . '"> ' . MORE_INFO_TEXT . '</a>'));
        } else {
            $display_faqs_description = '';
        }
        ?>
          <tr>
            <td width="<?php 
        echo IMAGE_FEATURED_FAQS_LISTING_WIDTH + 10;
        ?>
" valign="top" class="main" align="center">
              <?php 
        $disp_sort_order = $db->Execute("select configuration_key, configuration_value from " . TABLE_CONFIGURATION . " where configuration_group_id='" . $group_id . "' and (configuration_value >= 1000 and configuration_value <= 1999) order by LPAD(configuration_value,11,0)");
        while (!$disp_sort_order->EOF) {
            if ($disp_sort_order->fields['configuration_key'] == 'FAQ_FEATURED_LIST_IMAGE') {