$category_inputs_string = '';
 for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
     $category_inputs_string .= '<br />' . zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;';
     if ($_SESSION['html_editor_preference_status'] == 'FCKEDITOR') {
         $oFCKeditor = new FCKeditor('categories_description[' . $languages[$i]['id'] . ']');
         $oFCKeditor->Value = zen_get_category_description($cInfo->categories_id, $languages[$i]['id']);
         $oFCKeditor->Width = '97%';
         $oFCKeditor->Height = '200';
         //                $oFCKeditor->Config['ToolbarLocation'] = 'Out:xToolbar' ;
         //                $oFCKeditor->Create() ;
         $output = $oFCKeditor->CreateHtml();
         $category_inputs_string .= '<br />' . $output;
         //        $category_inputs_string .= '<IFRAME src= "' . DIR_WS_CATALOG . 'FCKeditor/fckeditor.html?FieldName=categories_description[' . $languages[$i]['id']  . ']&Upload=false&Browse=false&Toolbar=Short" width="97%" height="200" frameborder="no" scrolling="yes"></IFRAME>';
         //        $category_inputs_string .= '<INPUT type="hidden" name="categories_description[' . $languages[$i]['id']  . ']" ' . 'value=' . "'" . zen_get_category_description($cInfo->categories_id, $languages[$i]['id']) . "'>";
     } else {
         $category_inputs_string .= zen_draw_textarea_field('categories_description[' . $languages[$i]['id'] . ']', 'soft', '100%', '20', zen_get_category_description($cInfo->categories_id, $languages[$i]['id']));
     }
 }
 $contents[] = array('text' => '<br />' . TEXT_CATEGORIES_DESCRIPTION . $category_inputs_string);
 $contents[] = array('text' => '<br />' . TEXT_EDIT_CATEGORIES_IMAGE . '<br />' . zen_draw_file_field('categories_image'));
 $dir = @dir(DIR_FS_CATALOG_IMAGES);
 $dir_info[] = array('id' => '', 'text' => "Main Directory");
 while ($file = $dir->read()) {
     if (is_dir(DIR_FS_CATALOG_IMAGES . $file) && strtoupper($file) != 'CVS' && $file != "." && $file != "..") {
         $dir_info[] = array('id' => $file . '/', 'text' => $file);
     }
 }
 $dir->close();
 sort($dir_info);
 $default_directory = substr($cInfo->categories_image, 0, strpos($cInfo->categories_image, '/') + 1);
 $contents[] = array('text' => TEXT_CATEGORIES_IMAGE_DIR . ' ' . zen_draw_pull_down_menu('img_dir', $dir_info, $default_directory));
Example #2
0
 // set image delete
 $on_image_delete = false;
 $off_image_delete = true;
 $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_EDIT_CATEGORY . '</b>');
 $contents[] = array('text' => zen_draw_form('categories', FILENAME_CATEGORIES, 'action=update_category&cPath=' . $cPath . (isset($_GET['search']) && !empty($_GET['search']) ? '&search=' . $_GET['search'] : ''), 'post', 'enctype="multipart/form-data"') . zen_draw_hidden_field('categories_id', $cInfo->categories_id));
 $contents[] = array('text' => TEXT_EDIT_INTRO);
 $languages = zen_get_languages();
 $category_inputs_string = '';
 for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
     $category_inputs_string .= '<br />' . zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . zen_draw_input_field('categories_name[' . $languages[$i]['id'] . ']', htmlspecialchars(zen_get_category_name($cInfo->categories_id, $languages[$i]['id']), ENT_COMPAT, CHARSET, TRUE), zen_set_field_length(TABLE_CATEGORIES_DESCRIPTION, 'categories_name'));
 }
 $contents[] = array('text' => '<br />' . TEXT_EDIT_CATEGORIES_NAME . $category_inputs_string);
 $category_inputs_string = '';
 for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
     $category_inputs_string .= '<br />' . zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;';
     $category_inputs_string .= zen_draw_textarea_field('categories_description[' . $languages[$i]['id'] . ']', 'soft', '100%', '20', htmlspecialchars(zen_get_category_description($cInfo->categories_id, $languages[$i]['id']), ENT_COMPAT, CHARSET, TRUE));
 }
 $contents[] = array('text' => '<br />' . TEXT_CATEGORIES_DESCRIPTION . $category_inputs_string);
 $contents[] = array('text' => '<br />' . TEXT_EDIT_CATEGORIES_IMAGE . '<br />' . zen_draw_file_field('categories_image'));
 $dir = @dir(DIR_FS_CATALOG_IMAGES);
 $dir_info[] = array('id' => '', 'text' => "Main Directory");
 while ($file = $dir->read()) {
     if (is_dir(DIR_FS_CATALOG_IMAGES . $file) && strtoupper($file) != 'CVS' && $file != "." && $file != "..") {
         $dir_info[] = array('id' => $file . '/', 'text' => $file);
     }
 }
 $dir->close();
 sort($dir_info);
 $default_directory = substr($cInfo->categories_image, 0, strpos($cInfo->categories_image, '/') + 1);
 $contents[] = array('text' => TEXT_CATEGORIES_IMAGE_DIR . ' ' . zen_draw_pull_down_menu('img_dir', $dir_info, $default_directory));
 $contents[] = array('text' => '<br />' . TEXT_CATEGORIES_IMAGE_MANUAL . '&nbsp;' . zen_draw_input_field('categories_image_manual'));