|
ZenCart_Documentation
1.5.0
http://www.collinsharper.com
|
00001 <?php 00010 require('includes/application_top.php'); 00011 00012 // Check all existing boxes are in the main /sideboxes 00013 $boxes_directory = DIR_FS_CATALOG_MODULES . 'sideboxes/'; 00014 00015 $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.')); 00016 $directory_array = array(); 00017 if ($dir = @dir($boxes_directory)) { 00018 while ($file = $dir->read()) { 00019 if (!is_dir($boxes_directory . $file)) { 00020 if (substr($file, strrpos($file, '.')) == $file_extension) { 00021 if ($file != 'empty.txt') { 00022 $directory_array[] = $file; 00023 } 00024 } 00025 } 00026 } 00027 if (sizeof($directory_array)) { 00028 sort($directory_array); 00029 } 00030 $dir->close(); 00031 } 00032 00033 // Check all exisiting boxes are in the current template /sideboxes/template_dir 00034 $dir_check= $directory_array; 00035 $boxes_directory = DIR_FS_CATALOG_MODULES . 'sideboxes/' . $template_dir . '/'; 00036 00037 $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.')); 00038 00039 if ($dir = @dir($boxes_directory)) { 00040 while ($file = $dir->read()) { 00041 if (!is_dir($boxes_directory . $file)) { 00042 if (in_array($file, $dir_check, TRUE)) { 00043 // skip name exists 00044 } else { 00045 if ($file != 'empty.txt') { 00046 $directory_array[] = $file; 00047 } 00048 } 00049 } 00050 } 00051 sort($directory_array); 00052 $dir->close(); 00053 } 00054 00055 $warning_new_box=''; 00056 $installed_boxes = array(); 00057 for ($i = 0, $n = sizeof($directory_array); $i < $n; $i++) { 00058 $file = $directory_array[$i]; 00059 00060 // Verify Definitions 00061 $definitions = $db->Execute("select layout_box_name from " . TABLE_LAYOUT_BOXES . " where layout_box_name='" . zen_db_input($file) . "' and layout_template='" . zen_db_input($template_dir) . "'"); 00062 if ($definitions->EOF) { 00063 if (!strstr($file, 'ezpages_bar')) { 00064 $warning_new_box .= $file . ' '; 00065 } else { 00066 // skip ezpage sideboxes 00067 // $warning_new_box .= $file . ' - HIDDEN '; 00068 } 00069 $db->Execute("insert into " . TABLE_LAYOUT_BOXES . " 00070 (layout_template, layout_box_name, layout_box_status, layout_box_location, layout_box_sort_order, layout_box_sort_order_single, layout_box_status_single) 00071 values ('" . zen_db_input($template_dir) . "', '" . zen_db_input($file) . "', 0, 0, 0, 0, 0)"); 00072 } 00073 } 00074 00076 if ($_GET['action']) { 00077 switch ($_GET['action']) { 00078 case 'insert': 00079 $layout_box_name = zen_db_prepare_input($_POST['layout_box_name']); 00080 $layout_box_status = zen_db_prepare_input($_POST['layout_box_status']); 00081 $layout_box_location = zen_db_prepare_input($_POST['layout_box_location']); 00082 $layout_box_sort_order = zen_db_prepare_input($_POST['layout_box_sort_order']); 00083 $layout_box_sort_order_single = zen_db_prepare_input($_POST['layout_box_sort_order_single']); 00084 $layout_box_status_single = zen_db_prepare_input($_POST['layout_box_status_single']); 00085 00086 $db->Execute("insert into " . TABLE_LAYOUT_BOXES . " 00087 (layout_box_name, layout_box_status, layout_box_location, layout_box_sort_order, layout_box_sort_order_single, layout_box_status_single) 00088 values ('" . zen_db_input($layout_box_name) . "', 00089 '" . zen_db_input($layout_box_status) . "', 00090 '" . zen_db_input($layout_box_location) . "', 00091 '" . zen_db_input($layout_box_sort_order) . "', 00092 '" . zen_db_input($layout_box_sort_order_single) . "', 00093 '" . zen_db_input($layout_box_status_single) . "')"); 00094 00095 $messageStack->add_session(SUCCESS_BOX_ADDED . $_GET['layout_box_name'], 'success'); 00096 zen_redirect(zen_href_link(FILENAME_LAYOUT_CONTROLLER)); 00097 break; 00098 case 'save': 00099 $box_id = zen_db_prepare_input($_GET['cID']); 00100 // $layout_box_name = zen_db_prepare_input($_POST['layout_box_name']); 00101 $layout_box_status = zen_db_prepare_input($_POST['layout_box_status']); 00102 $layout_box_location = zen_db_prepare_input($_POST['layout_box_location']); 00103 $layout_box_sort_order = zen_db_prepare_input($_POST['layout_box_sort_order']); 00104 $layout_box_sort_order_single = zen_db_prepare_input($_POST['layout_box_sort_order_single']); 00105 $layout_box_status_single = zen_db_prepare_input($_POST['layout_box_status_single']); 00106 00107 $db->Execute("update " . TABLE_LAYOUT_BOXES . " set layout_box_status = '" . zen_db_input($layout_box_status) . "', layout_box_location = '" . zen_db_input($layout_box_location) . "', layout_box_sort_order = '" . zen_db_input($layout_box_sort_order) . "', layout_box_sort_order_single = '" . zen_db_input($layout_box_sort_order_single) . "', layout_box_status_single = '" . zen_db_input($layout_box_status_single) . "' where layout_id = '" . zen_db_input($box_id) . "'"); 00108 00109 $messageStack->add_session(SUCCESS_BOX_UPDATED . $_GET['layout_box_name'], 'success'); 00110 zen_redirect(zen_href_link(FILENAME_LAYOUT_CONTROLLER, 'page=' . $_GET['page'] . '&cID=' . $box_id)); 00111 break; 00112 case 'deleteconfirm': 00113 $box_id = zen_db_prepare_input($_POST['cID']); 00114 00115 $db->Execute("delete from " . TABLE_LAYOUT_BOXES . " where layout_id = '" . zen_db_input($box_id) . "'"); 00116 00117 $messageStack->add_session(SUCCESS_BOX_DELETED . $_GET['layout_box_name'], 'success'); 00118 zen_redirect(zen_href_link(FILENAME_LAYOUT_CONTROLLER, 'page=' . $_GET['page'])); 00119 break; 00120 case 'reset_defaults': 00121 $reset_boxes = $db->Execute("select * from " . TABLE_LAYOUT_BOXES . " where layout_template= 'default_template_settings'"); 00122 while (!$reset_boxes->EOF) { 00123 $db->Execute("update " . TABLE_LAYOUT_BOXES . " set layout_box_status= '" . $reset_boxes->fields['layout_box_status'] . "', layout_box_location= '" . $reset_boxes->fields['layout_box_location'] . "', layout_box_sort_order='" . $reset_boxes->fields['layout_box_sort_order'] . "', layout_box_sort_order_single='" . $reset_boxes->fields['layout_box_sort_order_single'] . "', layout_box_status_single='" . $reset_boxes->fields['layout_box_status_single'] . "' where layout_box_name='" . $reset_boxes->fields['layout_box_name'] . "' and layout_template='" . zen_db_input($template_dir) . "'"); 00124 $reset_boxes->MoveNext(); 00125 } 00126 00127 $messageStack->add_session(SUCCESS_BOX_RESET . $template_dir, 'success'); 00128 zen_redirect(zen_href_link(FILENAME_LAYOUT_CONTROLLER, 'page=' . $_GET['page'])); 00129 break; 00130 } 00131 } 00132 00133 ?> 00134 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> 00135 <html <?php echo HTML_PARAMS; ?>> 00136 <head> 00137 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> 00138 <title><?php echo TITLE; ?></title> 00139 <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> 00140 <link rel="stylesheet" type="text/css" href="includes/cssjsmenuhover.css" media="all" id="hoverJS"> 00141 <script language="javascript" src="includes/menu.js"></script> 00142 <script language="javascript" src="includes/general.js"></script> 00143 <script type="text/javascript"> 00144 <!-- 00145 function init() 00146 { 00147 cssjsmenu('navbar'); 00148 if (document.getElementById) 00149 { 00150 var kill = document.getElementById('hoverJS'); 00151 kill.disabled = true; 00152 } 00153 } 00154 // --> 00155 </script> 00156 </head> 00157 <body onload="init()"> 00158 <!-- header //--> 00159 <?php require(DIR_WS_INCLUDES . 'header.php'); ?> 00160 <!-- header_eof //--> 00161 00162 <!-- body //--> 00163 <table border="0" width="100%" cellspacing="2" cellpadding="2"> 00164 <tr> 00165 <!-- body_text //--> 00166 <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> 00167 00168 <tr> 00169 <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> 00170 <?php 00171 if ($warning_new_box) { 00172 ?> 00173 <tr class="messageStackError"> 00174 <td colspan="2" class="messageStackError"> 00175 <?php echo 'WARNING: New boxes found: ' . $warning_new_box; ?> 00176 </td> 00177 </tr> 00178 <?php 00179 } 00180 ?> 00181 <tr> 00182 <td class="pageHeading"><?php echo HEADING_TITLE . ' ' . $template_dir; ?></td> 00183 <td class="pageHeading" align="right"><?php echo zen_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> 00184 </tr> 00185 </table></td> 00186 </tr> 00187 00188 <tr> 00189 <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> 00190 <tr> 00191 <td class="main" align="left"><strong>Boxes Path: </strong><?php echo DIR_FS_CATALOG_MODULES . ' ... ' . '<br /> '; ?></td> 00192 </tr> 00193 <tr> 00194 <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> 00195 <tr class="dataTableHeadingRow"> 00196 <td class="dataTableHeadingContent" align="left" width="200"><?php echo TABLE_HEADING_LAYOUT_BOX_NAME; ?></td> 00197 <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_LAYOUT_BOX_STATUS; ?></td> 00198 <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_LAYOUT_BOX_LOCATION; ?></td> 00199 <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_LAYOUT_BOX_SORT_ORDER; ?></td> 00200 <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_LAYOUT_BOX_SORT_ORDER_SINGLE; ?></td> 00201 <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_LAYOUT_BOX_STATUS_SINGLE; ?></td> 00202 <td colspan="2" class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_ACTION; ?> </td> 00203 </tr> 00204 00205 <?php 00206 $boxes_directory = DIR_FS_CATALOG_MODULES . 'sideboxes' . '/'; 00207 $boxes_directory_template = DIR_FS_CATALOG_MODULES . 'sideboxes/' . $template_dir . '/'; 00208 00209 $column_controller = $db->Execute("select layout_id, layout_box_name, layout_box_status, layout_box_location, layout_box_sort_order, layout_box_sort_order_single, layout_box_status_single from " . TABLE_LAYOUT_BOXES . " where (layout_template='" . zen_db_input($template_dir) . "' and layout_box_name NOT LIKE '%ezpages_bar%') order by layout_box_location, layout_box_sort_order"); 00210 while (!$column_controller->EOF) { 00211 // if (((!$_GET['cID']) || (@$_GET['cID'] == $column_controller->fields['layout_id'])) && (!$bInfo) && (substr($_GET['action'], 0, 3) != 'new')) { 00212 if ((!isset($_GET['cID']) || (isset($_GET['cID']) && ($_GET['cID'] == $column_controller->fields['layout_id']))) && !isset($bInfo) && (substr($action, 0, 3) != 'new')) { 00213 $bInfo = new objectInfo($column_controller->fields); 00214 } 00215 00216 // if ( (is_object($bInfo)) && ($column_controller->fields['layout_id'] == $bInfo->layout_id) ) { 00217 if (isset($bInfo) && is_object($bInfo) && ($column_controller->fields['layout_id'] == $bInfo->layout_id)) { 00218 echo ' <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . zen_href_link(FILENAME_LAYOUT_CONTROLLER, 'page=' . $_GET['page'] . '&cID=' . $bInfo->layout_id . '&action=edit') . '\'">' . "\n"; 00219 } else { 00220 echo ' <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . zen_href_link(FILENAME_LAYOUT_CONTROLLER, 'page=' . $_GET['page'] . '&cID=' . $column_controller->fields['layout_id']) . '\'">' . "\n"; 00221 } 00222 ?> 00223 <td class="dataTableContent" width="100"><?php echo (file_exists($boxes_directory_template . $column_controller->fields['layout_box_name']) ? '<span class="alert">' . str_replace(DIR_FS_CATALOG_MODULES, '', $boxes_directory_template) . '</span>' . $column_controller->fields['layout_box_name'] : str_replace(DIR_FS_CATALOG_MODULES, '', $boxes_directory) . $column_controller->fields['layout_box_name']); ?></td> 00224 <td class="<?php echo ( (file_exists($boxes_directory . $column_controller->fields['layout_box_name']) or file_exists($boxes_directory_template . $column_controller->fields['layout_box_name'])) ? dataTableContent : messageStackError ); ?>" align="center"><?php echo ($column_controller->fields['layout_box_status']=='1' ? TEXT_ON : '<span class="alert">' . TEXT_OFF .'</span>'); ?></td> 00225 <td class="<?php echo ( (file_exists($boxes_directory . $column_controller->fields['layout_box_name']) or file_exists($boxes_directory_template . $column_controller->fields['layout_box_name'])) ? dataTableContent : messageStackError ); ?>" align="center"><?php echo ($column_controller->fields['layout_box_location']=='0' ? TEXT_LEFT : TEXT_RIGHT); ?></td> 00226 <td class="<?php echo ( (file_exists($boxes_directory . $column_controller->fields['layout_box_name']) or file_exists($boxes_directory_template . $column_controller->fields['layout_box_name'])) ? dataTableContent : messageStackError ); ?>" align="center"><?php echo $column_controller->fields['layout_box_sort_order']; ?></td> 00227 <td class="<?php echo ( (file_exists($boxes_directory . $column_controller->fields['layout_box_name']) or file_exists($boxes_directory_template . $column_controller->fields['layout_box_name'])) ? dataTableContent : messageStackError ); ?>" align="center"><?php echo $column_controller->fields['layout_box_sort_order_single']; ?></td> 00228 <td class="<?php echo ( (file_exists($boxes_directory . $column_controller->fields['layout_box_name']) or file_exists($boxes_directory_template . $column_controller->fields['layout_box_name'])) ? dataTableContent : messageStackError ); ?>" align="center"><?php echo ($column_controller->fields['layout_box_status_single']=='1' ? TEXT_ON : '<span class="alert">' . TEXT_OFF . '</span>'); ?></td> 00229 00230 <td class="dataTableContent" align="right"><?php echo ( (file_exists($boxes_directory . $column_controller->fields['layout_box_name']) or file_exists($boxes_directory_template . $column_controller->fields['layout_box_name'])) ? TEXT_GOOD_BOX : TEXT_BAD_BOX) ; ?><?php echo '<a href="' . zen_href_link(FILENAME_LAYOUT_CONTROLLER, 'page=' . $_GET['page'] . '&cID=' . $column_controller->fields['layout_id'] . '&action=edit') . '">' . zen_image(DIR_WS_IMAGES . 'icon_edit.gif', IMAGE_EDIT) . '</a>'; ?></td> 00231 00232 <td class="dataTableContent" align="right"><?php echo ( (file_exists($boxes_directory . $column_controller->fields['layout_box_name']) or file_exists($boxes_directory_template . $column_controller->fields['layout_box_name'])) ? TEXT_GOOD_BOX : TEXT_BAD_BOX) ; ?><?php if ( (is_object($bInfo)) && ($column_controller->fields['layout_id'] == $bInfo->layout_id) ) { echo zen_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . zen_href_link(FILENAME_LAYOUT_CONTROLLER, 'page=' . $_GET['page'] . '&cID=' . $column_controller->fields['layout_id']) . '">' . zen_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> 00233 </tr> 00234 00235 <?php 00236 $last_box_column = $column_controller->fields['layout_box_location']; 00237 $column_controller->MoveNext(); 00238 if (($column_controller->fields['layout_box_location'] != $last_box_column) and !$column_controller->EOF) { 00239 ?> 00240 <tr valign="top"> 00241 <td colspan="7" height="20" align="center" valign="middle"><?php echo zen_draw_separator('pixel_black.gif', '90%', '3'); ?></td> 00242 </tr> 00243 <?php 00244 } 00245 } 00246 ?> 00247 00248 <tr valign="top"> 00249 <td valign="top"><?php echo zen_draw_separator('pixel_trans.gif', '75%', '10'); ?></td> 00250 </tr> 00251 00252 </table></td> 00253 <?php 00254 $heading = array(); 00255 $contents = array(); 00256 00257 switch ($bInfo->layout_box_status) { 00258 case '0': $layout_box_status_status_on = false; $layout_box_status_status_off = true; break; 00259 case '1': 00260 default: $layout_box_status_status_on = true; $layout_box_status_status_off = false; 00261 } 00262 switch ($bInfo->layout_box_status_single) { 00263 case '0': $layout_box_status_single_on = false; $layout_box_status_single_off = true; break; 00264 case '1': 00265 default: $layout_box_status_single_on = true; $layout_box_status_single_off = false; 00266 } 00267 00268 switch ($_GET['action']) { 00269 case 'new': 00270 $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_NEW_BOX . '</b>'); 00271 00272 $contents = array('form' => zen_draw_form('column_controller', FILENAME_LAYOUT_CONTROLLER, 'page=' . $_GET['page'] . '&action=insert')); 00273 $contents[] = array('text' => TEXT_INFO_INSERT_INTRO); 00274 $contents[] = array('text' => '<br />' . TEXT_INFO_LAYOUT_BOX_NAME . '<br />' . zen_draw_input_field('layout_box_name')); 00275 $contents[] = array('text' => '<br />' . TEXT_INFO_LAYOUT_BOX_STATUS . '<br />' . zen_draw_input_field('layout_box_status')); 00276 $contents[] = array('text' => '<br />' . TEXT_INFO_LAYOUT_BOX_LOCATION . '<br />' . zen_draw_input_field('layout_box_location')); 00277 $contents[] = array('text' => '<br />' . TEXT_INFO_LAYOUT_BOX_SORT_ORDER . '<br />' . zen_draw_input_field('layout_box_sort_order')); 00278 $contents[] = array('text' => '<br />' . TEXT_INFO_LAYOUT_BOX_SORT_ORDER_SINGLE . '<br />' . zen_draw_input_field('layout_box_sort_order_single')); 00279 $contents[] = array('text' => '<br />' . TEXT_INFO_LAYOUT_BOX_STATUS_SINGLE . '<br />' . zen_draw_input_field('layout_box_status_single')); 00280 00281 $contents[] = array('align' => 'center', 'text' => '<br />' . zen_image_submit('button_insert.gif', IMAGE_INSERT) . ' <a href="' . zen_href_link(FILENAME_LAYOUT_CONTROLLER, 'page=' . $_GET['page']) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); 00282 break; 00283 case 'edit': 00284 switch ($bInfo->layout_box_status) { 00285 case '0': $in_status = false; $out_status = true; break; 00286 case '1': $in_status = true; $out_status = false; break; 00287 default: $in_status = true; $out_status = false; 00288 } 00289 switch ($bInfo->layout_box_location) { 00290 case '0': $left_status = true; $right_status = false; break; 00291 case '1': $left_status = false; $right_status = true; break; 00292 default: $left_status = false; $right_status = true; 00293 } 00294 switch ($bInfo->layout_box_status_single) { 00295 case '0': $in_status_single = false; $out_status_single = true; break; 00296 case '1': $in_status_single = true; $out_status_single = false; break; 00297 default: $in_status_single = true; $out_status_single = false; 00298 } 00299 00300 $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_EDIT_BOX . '</b>'); 00301 00302 $contents = array('form' => zen_draw_form('column_controller', FILENAME_LAYOUT_CONTROLLER, 'page=' . $_GET['page'] . '&cID=' . $bInfo->layout_id . '&action=save' . '&layout_box_name=' . $bInfo->layout_box_name)); 00303 $contents[] = array('text' => TEXT_INFO_EDIT_INTRO); 00304 $contents[] = array('text' => TEXT_INFO_LAYOUT_BOX_NAME . ' ' . $bInfo->layout_box_name); 00305 $contents[] = array('text' => '<br />' . TEXT_INFO_LAYOUT_BOX_STATUS . '<br />' . zen_draw_radio_field('layout_box_status', '1', $in_status) . TEXT_ON . zen_draw_radio_field('layout_box_status', '0', $out_status) . TEXT_OFF); 00306 $contents[] = array('text' => '<br />' . TEXT_INFO_LAYOUT_BOX_LOCATION . '<br />' . zen_draw_radio_field('layout_box_location', '0', $left_status) . TEXT_LEFT . zen_draw_radio_field('layout_box_location', '1', $right_status) . TEXT_RIGHT); 00307 $contents[] = array('text' => '<br />' . TEXT_INFO_LAYOUT_BOX_SORT_ORDER . '<br />' . zen_draw_input_field('layout_box_sort_order', $bInfo->layout_box_sort_order,'size="4"')); 00308 $contents[] = array('text' => '<br />' . TEXT_INFO_LAYOUT_BOX_SORT_ORDER_SINGLE . '<br />' . zen_draw_input_field('layout_box_sort_order_single', $bInfo->layout_box_sort_order_single,'size="4"')); 00309 $contents[] = array('text' => '<br />' . TEXT_INFO_LAYOUT_BOX_STATUS_SINGLE . '<br />' . zen_draw_radio_field('layout_box_status_single', '1', $in_status_single) . TEXT_ON . zen_draw_radio_field('layout_box_status_single', '0', $out_status_single) . TEXT_OFF); 00310 $contents[] = array('align' => 'center', 'text' => '<br />' . zen_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . zen_href_link(FILENAME_LAYOUT_CONTROLLER, 'page=' . $_GET['page'] . '&cID=' . $bInfo->layout_id . '&layout_box_name=' . $bInfo->layout_box_name) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); 00311 break; 00312 case 'delete': 00313 $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_BOX . '</b>'); 00314 00315 $contents = array('form' => zen_draw_form('column_controller', FILENAME_LAYOUT_CONTROLLER, 'page=' . $_GET['page'] . '&action=deleteconfirm' . '&layout_box_name=' . $bInfo->layout_box_name) . zen_draw_hidden_field('cID', $bInfo->layout_id)); 00316 $contents[] = array('text' => TEXT_INFO_DELETE_INTRO); 00317 $contents[] = array('text' => '<br /><b>' . $bInfo->layout_box_name . '</b>'); 00318 $contents[] = array('align' => 'center', 'text' => '<br />' . zen_image_submit('button_delete.gif', IMAGE_UPDATE) . ' <a href="' . zen_href_link(FILENAME_LAYOUT_CONTROLLER, 'page=' . $_GET['page'] . '&cID=' . $bInfo->layout_id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); 00319 break; 00320 default: 00321 if (is_object($bInfo)) { 00322 $heading[] = array('text' => '<strong>' . TEXT_INFO_LAYOUT_BOX . $bInfo->layout_box_name . '</strong>'); 00323 $contents[] = array('align' => 'left', 'text' => '<a href="' . zen_href_link(FILENAME_LAYOUT_CONTROLLER, 'page=' . $_GET['page'] . '&cID=' . $bInfo->layout_id . '&action=edit') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a>'); 00324 $contents[] = array('text' => '<strong>' . TEXT_INFO_BOX_DETAILS . '</strong>'); 00325 $contents[] = array('text' => TEXT_INFO_LAYOUT_BOX_NAME . ' ' . $bInfo->layout_box_name); 00326 $contents[] = array('text' => TEXT_INFO_LAYOUT_BOX_STATUS . ' ' . ($bInfo->layout_box_status=='1' ? TEXT_ON : TEXT_OFF) ); 00327 $contents[] = array('text' => TEXT_INFO_LAYOUT_BOX_LOCATION . ' ' . ($bInfo->layout_box_location=='0' ? TEXT_LEFT : TEXT_RIGHT) ); 00328 $contents[] = array('text' => TEXT_INFO_LAYOUT_BOX_SORT_ORDER . ' ' . $bInfo->layout_box_sort_order); 00329 $contents[] = array('text' => TEXT_INFO_LAYOUT_BOX_SORT_ORDER_SINGLE . ' ' . $bInfo->layout_box_sort_order_single); 00330 $contents[] = array('text' => TEXT_INFO_LAYOUT_BOX_STATUS_SINGLE . ' ' . ($bInfo->layout_box_status_single=='1' ? TEXT_ON : TEXT_OFF) ); 00331 00332 if (!(file_exists($boxes_directory . $bInfo->layout_box_name) or file_exists($boxes_directory_template . $bInfo->layout_box_name))) { 00333 $contents[] = array('align' => 'left', 'text' => '<br /><strong>' . TEXT_INFO_DELETE_MISSING_LAYOUT_BOX . '<br />' . $template_dir . '</strong>'); 00334 $contents[] = array('align' => 'left', 'text' => TEXT_INFO_DELETE_MISSING_LAYOUT_BOX_NOTE . '<strong>' . $bInfo->layout_box_name . '</strong>'); 00335 $contents[] = array('align' => 'left', 'text' => '<a href="' . zen_href_link(FILENAME_LAYOUT_CONTROLLER, 'page=' . $_GET['page'] . '&cID=' . $bInfo->layout_id . '&action=delete' . '&layout_box_name=' . $bInfo->layout_box_name) . '">' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '</a>'); 00336 } 00337 } 00338 break; 00339 } 00340 00341 if ( (zen_not_null($heading)) && (zen_not_null($contents)) ) { 00342 echo "\n" . ' <td width="25%" valign="top">' . "\n"; 00343 00344 $box = new box; 00345 echo $box->infoBox($heading, $contents); 00346 00347 echo ' </td>' . "\n"; 00348 } 00349 ?> 00350 </tr> 00351 <tr> 00352 <td><table align="center"> 00353 <tr> 00354 <td class="main" align="left"> 00355 <?php echo '<br />' . TEXT_INFO_RESET_TEMPLATE_SORT_ORDER . '<strong>' . $template_dir . '</strong>'; ?> 00356 </td> 00357 </tr> 00358 <tr> 00359 <td class="main" align="center"> 00360 <?php echo TEXT_INFO_RESET_TEMPLATE_SORT_ORDER_NOTE; ?> 00361 </td> 00362 </tr> 00363 <tr> 00364 <td class="main" align="center"> 00365 <?php echo '<br /><a href="' . zen_href_link(FILENAME_LAYOUT_CONTROLLER, 'page=' . $_GET['page'] . '&cID=' . $bInfo->layout_id . '&action=reset_defaults') . '">' . zen_image_button('button_reset.gif', IMAGE_RESET) . '</a>'; ?> 00366 </td> 00367 </tr> 00368 </table></td> 00369 </tr> 00370 <tr valign="top"> 00371 <td valign="top"><?php echo zen_draw_separator('pixel_trans.gif', '1', '100'); ?></td> 00372 </tr> 00373 00374 <!-- end of display --> 00375 00376 </table></td> 00377 </tr> 00378 </table></td> 00379 <!-- body_text_eof //--> 00380 </tr> 00381 </table> 00382 <!-- body_eof //--> 00383 00384 <!-- footer //--> 00385 <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> 00386 <!-- footer_eof //--> 00387 <br /> 00388 </body> 00389 </html> 00390 <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>