ZenCart_Documentation  1.5.0
http://www.collinsharper.com
C:/xampp/htdocs/zen-cart/admin/media_manager.php
Go to the documentation of this file.
00001 <?php
00010   require('includes/application_top.php');
00011 
00012   $action = (isset($_GET['action']) ? $_GET['action'] : '');
00013   $current_category_id = (isset($_GET['current_category_id']) ? (int)$_GET['current_category_id'] : (int)$current_category_id);
00014 
00015   if (zen_not_null($action)) {
00016     switch ($action) {
00017       case 'edit':
00018         if (!is_writable(DIR_FS_CATALOG_MEDIA)) $messageStack->add(TEXT_WARNING_FOLDER_UNWRITABLE, 'caution');
00019       break;
00020       case 'remove_product':
00021         if (isset($_POST['mID']) && isset($_POST['product_id']))
00022         {
00023           $db->Execute("delete from " . TABLE_MEDIA_TO_PRODUCTS . "
00024                         where media_id = '" . (int)$_POST['mID'] . "'
00025                         and product_id = '" . (int)$_POST['product_id'] . "'");
00026         }
00027        zen_redirect(zen_href_link(FILENAME_MEDIA_MANAGER, 'action=products&current_category_id=' . $current_category_id) . '&mID=' . (int)$_POST['mID'] . '&page=' . $_GET['page']);
00028 
00029       break;
00030       case 'add_product':
00031         $product_add_query = $db->Execute("insert into " . TABLE_MEDIA_TO_PRODUCTS . " (media_id, product_id) values
00032                                            ('" . (int)$_POST['mID'] . "', '" . (int)$_POST['current_product_id'] . "')");
00033          zen_redirect(zen_href_link(FILENAME_MEDIA_MANAGER, 'action=products') . '&mID=' . $_POST['mID'] . '&page=' . $_GET['page']);
00034 
00035       break;
00036       case 'new_cat':
00037     $current_category_id = (isset($_GET['current_category_id']) ? (int)$_GET['current_category_id'] : (int)$current_category_id);
00038     $products_filter = $new_product_query->fields['products_id'];
00039     zen_redirect(zen_href_link(FILENAME_MEDIA_MANAGER, 'action=products&current_category_id=' . $current_category_id . '&mID=' . $_GET['mID'] . '&page=' . $_GET['page']));
00040       break;
00041       case 'remove_clip':
00042         if (isset($_POST['mID']) && isset($_POST['clip_id']))
00043         {
00044           $delete_query = "delete from " . TABLE_MEDIA_CLIPS . " where clip_id  = '" . (int)$_POST['clip_id'] . "'";
00045           $db->Execute($delete_query);
00046           zen_redirect(zen_href_link(FILENAME_MEDIA_MANAGER, 'action=edit&page=' . $_GET['page'] . '&mID=' . $_POST['mID']));
00047         }
00048       break;
00049       case 'insert':
00050       case 'save':
00051         if (isset($_POST['add_clip'])) {
00052           $clip_name = $_FILES['clip_filename'];
00053           $clip_name = zen_db_prepare_input($clip_name['name']);
00054           if ($clip_name) {
00055             $media_type = zen_db_prepare_input($_POST['media_type']);
00056             $ext = $db->Execute("select type_ext from " . TABLE_MEDIA_TYPES . " where type_id = '" . (int)$_POST['media_type'] . "'");
00057             if (preg_match('/'.$ext->fields['type_ext'] . '/', $clip_name)) {
00058 
00059               if ($media_upload = new upload('clip_filename')) {
00060                 $media_upload->set_destination(DIR_FS_CATALOG_MEDIA . $_POST['media_dir']);
00061                 if ($media_upload->parse() && $media_upload->save()) {
00062                   $media_upload_filename = zen_db_prepare_input($_POST['media_dir'] . $media_upload->filename);
00063                 }
00064                 if ($media_upload->filename != 'none' && $media_upload->filename != '' && is_writable(DIR_FS_CATALOG_MEDIA . $_POST['media_dir'])) {
00065 
00066                   $db->Execute("insert into " . TABLE_MEDIA_CLIPS . "
00067                                 (media_id, clip_type, clip_filename, date_added) values (
00068                                  '" . (int)$_GET['mID'] . "',
00069                                  '" . zen_db_prepare_input($media_type) . "',
00070                                  '" . $media_upload_filename . "', now())");
00071                 }
00072               }
00073 
00074             }
00075           }
00076         }
00077         if (isset($_GET['mID'])) $media_id = zen_db_prepare_input($_GET['mID']);
00078         $media_name = zen_db_prepare_input($_POST['media_name']);
00079 
00080         $sql_data_array = array('media_name' => $media_name);
00081 
00082         if ($media_name == '') {
00083           $messageStack->add_session(ERROR_UNKNOWN_DATA, 'caution');
00084         } else {
00085           if ($action == 'insert') {
00086             $insert_sql_data = array('date_added' => 'now()');
00087 
00088             $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
00089 
00090             zen_db_perform(TABLE_MEDIA_MANAGER, $sql_data_array);
00091             $media_id = zen_db_insert_id();
00092           } elseif ($action == 'save') {
00093             $update_sql_data = array('last_modified' => 'now()');
00094 
00095             $sql_data_array = array_merge($sql_data_array, $update_sql_data);
00096 
00097             zen_db_perform(TABLE_MEDIA_MANAGER, $sql_data_array, 'update', "media_id = '" . (int)$media_id . "'");
00098           }
00099         }
00100 
00101         zen_redirect(zen_href_link(FILENAME_MEDIA_MANAGER, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . ($media_id != '' ? 'mID=' . $media_id : '')));
00102         break;
00103       case 'deleteconfirm':
00104         // demo active test
00105         if (zen_admin_demo()) {
00106           $_GET['action']= '';
00107           $messageStack->add_session(ERROR_ADMIN_DEMO, 'caution');
00108           zen_redirect(zen_href_link(FILENAME_MEDIA_MANAGER, 'page=' . $_GET['page']));
00109         }
00110         $media_id = zen_db_prepare_input($_POST['mID']);
00111 
00112         $db->Execute("delete from " . TABLE_MEDIA_MANAGER . "
00113                       where media_id = '" . (int)$media_id . "'");
00114         $db->Execute("delete from " . TABLE_MEDIA_TO_PRODUCTS . "
00115                       where media_id = '" . (int)$media_id . "'");
00116         $db->Execute("delete from " . TABLE_MEDIA_CLIPS . "
00117                       where media_id = '" . (int)$media_id . "'");
00118 
00119         if (isset($_POST['delete_products']) && ($_POST['delete_products'] == 'on')) {
00120 
00121 //          while (!$products->EOF) {
00122 //            zen_remove_product($products->fields['products_id']);
00123 //            $products->MoveNext();
00124 //          }
00125         }
00126 
00127         zen_redirect(zen_href_link(FILENAME_MEDIA_MANAGER, 'page=' . $_GET['page']));
00128         break;
00129     }
00130   }
00131 ?>
00132 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
00133 <html <?php echo HTML_PARAMS; ?>>
00134 <head>
00135 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
00136 <title><?php echo TITLE; ?></title>
00137 <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
00138 <link rel="stylesheet" type="text/css" href="includes/cssjsmenuhover.css" media="all" id="hoverJS">
00139 <script language="javascript" src="includes/menu.js"></script>
00140 <script language="javascript" src="includes/general.js"></script>
00141 <script type="text/javascript">
00142   <!--
00143   function init()
00144   {
00145     cssjsmenu('navbar');
00146     if (document.getElementById)
00147     {
00148       var kill = document.getElementById('hoverJS');
00149       kill.disabled = true;
00150     }
00151   }
00152   // -->
00153 </script>
00154 </head>
00155 <body onLoad="init()">
00156 <!-- header //-->
00157 <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
00158 <!-- header_eof //-->
00159 
00160 <!-- body //-->
00161 <table border="0" width="100%" cellspacing="2" cellpadding="2">
00162   <tr>
00163 <!-- body_text //-->
00164     <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
00165       <tr>
00166         <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
00167           <tr>
00168             <td class="pageHeading"><?php echo HEADING_TITLE_MEDIA_MANAGER; ?></td>
00169             <td class="pageHeading" align="right"><?php echo zen_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
00170           </tr>
00171         </table></td>
00172       </tr>
00173       <tr>
00174         <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
00175           <tr>
00176             <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
00177               <tr class="dataTableHeadingRow">
00178                 <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_MEDIA; ?></td>
00179                 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?>&nbsp;</td>
00180               </tr>
00181 <?php
00182   $media_query_raw = "select * from " . TABLE_MEDIA_MANAGER . " order by media_name";
00183   $media_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $media_query_raw, $media_query_numrows);
00184   $media = $db->Execute($media_query_raw);
00185   while (!$media->EOF) {
00186     if ((!isset($_GET['mID']) || (isset($_GET['mID']) && ($_GET['mID'] == $media->fields['media_id']))) && !isset($mInfo) && (substr($action, 0, 3) != 'new')) {
00187 
00188       $mInfo = new objectInfo($media->fields);
00189     }
00190 
00191     if (isset($mInfo) && is_object($mInfo) && ($media->fields['media_id'] == $mInfo->media_id)) {
00192       echo '              <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_MEDIA_MANAGER, 'page=' . $_GET['page'] . '&mID=' . $media->fields['media_id']) . '\'">' . "\n";
00193     } else {
00194       echo '              <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_MEDIA_MANAGER, 'page=' . $_GET['page'] . '&mID=' . $media->fields['media_id']) . '\'">' . "\n";
00195     }
00196 ?>
00197                 <td class="dataTableContent"><?php echo $media->fields['media_name']; ?></td>
00198                 <td class="dataTableContent" align="right">
00199                   <?php echo '<a href="' . zen_href_link(FILENAME_MEDIA_MANAGER, 'page=' . $_GET['page'] . '&mID=' . $media->fields['media_id'] . '&action=edit') . '">' . zen_image(DIR_WS_IMAGES . 'icon_edit.gif', ICON_EDIT) . '</a>'; ?>
00200                   <?php echo '<a href="' . zen_href_link(FILENAME_MEDIA_MANAGER, 'page=' . $_GET['page'] . '&mID=' . $media->fields['media_id'] . '&action=delete') . '">' . zen_image(DIR_WS_IMAGES . 'icon_delete.gif', ICON_DELETE) . '</a>'; ?>
00201                   <?php if (isset($mInfo) && is_object($mInfo) && ($media->fields['media_id'] == $mInfo->media_id)) { echo zen_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . zen_href_link(FILENAME_MEDIA_MANAGER, zen_get_all_get_params(array('mID')) . 'mID=' . $media->fields['media_id']) . '">' . zen_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>
00202                 </td>
00203               </tr>
00204 <?php
00205     $media->MoveNext();
00206   }
00207 ?>
00208               <tr>
00209                 <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
00210                   <tr>
00211                     <td class="smallText" valign="top"><?php echo $media_split->display_count($media_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_MEDIA); ?></td>
00212                     <td class="smallText" align="right"><?php echo $media_split->display_links($media_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']); ?></td>
00213                   </tr>
00214                 </table></td>
00215               </tr>
00216 <?php
00217   if (empty($action)) {
00218 ?>
00219               <tr>
00220                 <td align="right" colspan="2" class="smallText"><?php echo '<a href="' . zen_href_link(FILENAME_MEDIA_MANAGER, 'page=' . $_GET['page'] . '&mID=' . $mInfo->media_id . '&action=new') . '">' . zen_image_button('button_insert.gif', IMAGE_INSERT) . '</a>'; ?></td>
00221               </tr>
00222 <?php
00223   }
00224 ?>
00225             </table></td>
00226 <?php
00227   $heading = array();
00228   $contents = array();
00229 
00230   switch ($action) {
00231     case 'new':
00232       $heading[] = array('text' => '<strong>' . TEXT_HEADING_NEW_MEDIA_COLLECTION . '</strong>');
00233 
00234       $contents[] = array('text' => zen_draw_form('collections', FILENAME_MEDIA_MANAGER, 'action=insert&page=' . $_GET['page'], 'post', 'enctype="multipart/form-data"'));
00235       $contents[] = array('text' => TEXT_NEW_INTRO);
00236       $contents[] = array('text' => '<br>' . TEXT_MEDIA_COLLECTION_NAME . '<br>' . zen_draw_input_field('media_name', '', zen_set_field_length(TABLE_MEDIA_MANAGER, 'media_name')));
00237 
00238       $contents[] = array('align' => 'center', 'text' => '<br>' . zen_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . zen_href_link(FILENAME_MEDIA_MANAGER, 'page=' . $_GET['page'] . '&mID=' . $_GET['mID']) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
00239       break;
00240     case 'edit':
00241       $heading[] = array('text' => '<strong>' . TEXT_HEADING_EDIT_MEDIA_COLLECTION . '</strong>');
00242 
00243       $contents[] = array('text' => zen_draw_form('collections', FILENAME_MEDIA_MANAGER, 'page=' . $_GET['page'] . '&mID=' . $mInfo->media_id . '&action=save', 'post', 'enctype="multipart/form-data"'));
00244       $contents[] = array('text' => TEXT_EDIT_INTRO);
00245       $contents[] = array('text' => '<br />' . TEXT_MEDIA_COLLECTION_NAME . '<br>' . zen_draw_input_field('media_name', htmlspecialchars($mInfo->media_name, ENT_COMPAT, CHARSET, TRUE), zen_set_field_length(TABLE_MEDIA_MANAGER, 'media_name')));
00246       $contents[] = array('align' => 'center', 'text' => '<br />' . zen_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . zen_href_link(FILENAME_MEDIA_MANAGER, 'page=' . $_GET['page'] . '&mID=' . $mInfo->media_id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
00247 
00248       $contents[] = array('text' => zen_draw_separator('pixel_black.gif'));
00249       $contents[] = array('text' => TEXT_MEDIA_EDIT_INSTRUCTIONS);
00250       $contents[] = array('text' => zen_draw_separator('pixel_black.gif'));
00251 
00252       $dir = @dir(DIR_FS_CATALOG_MEDIA);
00253       $dir_info[] = array('id' => '', 'text' => "Main Directory");
00254       while ($file = $dir->read()) {
00255         if (@is_dir(DIR_FS_CATALOG_MEDIA . $file) && strtoupper($file) != 'CVS' && $file != "." && $file != ".." && $file != '.svn') {
00256           $dir_info[] = array('id' => $file . '/', 'text' => $file);
00257         }
00258       }
00259       $dir->close();
00260       $contents[] = array('text' => '<br />' . TEXT_ADD_MEDIA_CLIP . zen_draw_file_field('clip_filename'));
00261       $contents[] = array('text' => TEXT_MEDIA_CLIP_DIR . ' ' . zen_draw_pull_down_menu('media_dir', $dir_info));
00262       $media_type_query = "select type_id, type_name, type_ext from " . TABLE_MEDIA_TYPES;
00263       $media_types = $db->Execute($media_type_query);
00264       while (!$media_types->EOF) {
00265         $media_types_array[] = array('id' => $media_types->fields['type_id'], 'text' => $media_types->fields['type_name'] . ' (' . $media_types->fields['type_ext'] . ')');
00266         $media_types->MoveNext();
00267       }
00268       $contents[] = array('text' => TEXT_MEDIA_CLIP_TYPE . ' ' . zen_draw_pull_down_menu('media_type', $media_types_array));
00269 
00270       $contents[] = array('text' => '<input type="submit" name="add_clip" value="' . TEXT_ADD . '">', 'align' => 'center');
00271       $contents[] = array('text' => '</form>');
00272       $clip_query = "select * from " . TABLE_MEDIA_CLIPS . " where media_id = '" . $mInfo->media_id . "'";
00273       $clips = $db->Execute($clip_query);
00274       if ($clips->RecordCount() > 0) $contents[] = array('text' => '<hr />');
00275       while (!$clips->EOF) {
00276         $contents[] = array('text'=>zen_draw_form('delete_clip', FILENAME_MEDIA_MANAGER, 'action=remove_clip') . '<input type="hidden" name="mID" value="' . $mInfo->media_id . '" />' . '<input type="hidden" name="clip_id" value="' . $clips->fields['clip_id'] . '" />' . zen_image_submit('button_delete.gif', IMAGE_DELETE) . '&nbsp;' . $clips->fields['clip_filename'] . '<br />' . '</form>');
00277         $clips->MoveNext();
00278       }
00279       break;
00280     case 'delete':
00281       $heading[] = array('text' => '<strong>' . TEXT_HEADING_DELETE_MEDIA_COLLECTION . '</strong>');
00282 
00283       $contents = array('form' => zen_draw_form('collections', FILENAME_MEDIA_MANAGER, 'page=' . $_GET['page'] . '&action=deleteconfirm') . zen_draw_hidden_field('mID', $mInfo->media_id));
00284       $contents[] = array('text' => TEXT_DELETE_INTRO);
00285       $contents[] = array('text' => '<br><strong>' . $mInfo->media_name . '</strong>');
00286 
00287       if ($mInfo->products_count > 0) {
00288         $contents[] = array('text' => '<br>' . zen_draw_checkbox_field('delete_products') . ' ' . TEXT_DELETE_PRODUCTS);
00289         $contents[] = array('text' => '<br>' . sprintf(TEXT_DELETE_WARNING_PRODUCTS, $mInfo->products_count));
00290       }
00291 
00292       $contents[] = array('align' => 'center', 'text' => '<br />' . zen_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . zen_href_link(FILENAME_MEDIA_MANAGER, 'page=' . $_GET['page'] . '&mID=' . $mInfo->media_id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
00293       break;
00294     case 'products':
00295       $new_product_query = $db->Execute("select ptc.*, pd.products_name from " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc  left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on ptc.products_id = pd.products_id and pd.language_id = '" . (int)$_SESSION['languages_id'] . "' where ptc.categories_id='" . $current_category_id . "' order by pd.products_name");
00296       $heading[] = array('text' => '<strong>' . TEXT_HEADING_ASSIGN_MEDIA_COLLECTION . '</strong>');
00297       $contents[] = array('text' => TEXT_PRODUCTS_INTRO . '<br /><br />');
00298       $contents[] = array('text' => zen_draw_form('new_category', FILENAME_MEDIA_MANAGER, '', 'get') . '&nbsp;&nbsp;' .
00299                            zen_draw_pull_down_menu('current_category_id', zen_get_category_tree('', '', '0'), '', 'onChange="this.form.submit();"') . zen_hide_session_id() . zen_draw_hidden_field('products_filter', $_GET['products_filter']) . zen_draw_hidden_field('action', 'new_cat') . zen_draw_hidden_field('mID', $mInfo->media_id) . zen_draw_hidden_field('page', $_GET['page']) . '&nbsp;&nbsp;</form>');
00300       $product_array = $zc_products->get_products_in_category($current_category_id, false);
00301       if ($product_array) {
00302         $contents[] = array('text' => zen_draw_form('new_product', FILENAME_MEDIA_MANAGER, 'action=add_product&page=' . (isset($GET['page']) ? $_GET['page'] : ''), 'post') . '&nbsp;&nbsp;' .
00303                            zen_draw_pull_down_menu('current_product_id', $product_array) . '&nbsp;' . '<input type="submit" name="add_product" value="Add">' .
00304                            zen_draw_hidden_field('current_category_id', $current_category_id) .
00305                            zen_draw_hidden_field('mID', $mInfo->media_id) . '&nbsp;&nbsp;</form>');
00306       } else {
00307         $contents[] = array('text' => '&nbsp;&nbsp;' . TEXT_NO_PRODUCTS);
00308       }
00309       $products_linked_query = "select * from " . TABLE_MEDIA_TO_PRODUCTS . "
00310                                 where media_id = '" . $mInfo->media_id . "'";
00311       $products_linked = $db->Execute($products_linked_query);
00312       if ($products_linked->RecordCount() > 0) $contents[] = array('text' => '<hr />');
00313       while (!$products_linked->EOF) {
00314         $contents[] = array('text'=>zen_draw_form('remove_product', FILENAME_MEDIA_MANAGER, 'action=remove_product&page=' . $_GET['page']) . '<input type="hidden" name="mID" value="' . $mInfo->media_id . '" />' . '<input type="hidden" name="product_id" value="' . $products_linked->fields['product_id'] . '" />' . zen_image_submit('button_delete.gif', IMAGE_DELETE) . '&nbsp;' . $zc_products->products_name($products_linked->fields['product_id']) . '<br />' . '</form>');
00315         $products_linked->MoveNext();
00316       }
00317       $contents[] = array('align' => 'center', 'text' =>  '<br /><a href="' . zen_href_link(FILENAME_MEDIA_MANAGER, 'page=' . $_GET['page'] . '&mID=' . $mInfo->media_id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
00318       break;
00319     default:
00320       if (isset($mInfo) && is_object($mInfo)) {
00321         $heading[] = array('text' => '<strong>' . $mInfo->media_name . '</strong>');
00322 
00323         $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_MEDIA_MANAGER, 'page=' . $_GET['page'] . '&mID=' . $mInfo->media_id . '&action=edit') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . zen_href_link(FILENAME_MEDIA_MANAGER, 'page=' . $_GET['page'] . '&mID=' . $mInfo->media_id . '&action=delete') . '">' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '</a> ' . '<a href="' . zen_href_link(FILENAME_MEDIA_MANAGER, 'page=' . $_GET['page'] . '&mID=' . $mInfo->media_id . '&action=products') . '">' . zen_image_button('button_assign_to_product.gif', IMAGE_PRODUCTS) . '</a>');
00324         $contents[] = array('text' => '<br />' . TEXT_DATE_ADDED . ' ' . zen_date_short($mInfo->date_added));
00325         if (zen_not_null($mInfo->last_modified)) $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . zen_date_short($mInfo->last_modified));
00326         $products_linked_query = "select product_id from " . TABLE_MEDIA_TO_PRODUCTS . "
00327                                 where media_id = '" . $mInfo->media_id . "'";
00328         $products_linked = $db->Execute($products_linked_query);
00329         $contents[] = array('text' => '<br />' . TEXT_PRODUCTS . ' ' . $products_linked->RecordCount());
00330         $clip_query = "select clip_id from " . TABLE_MEDIA_CLIPS . " where media_id = '" . $mInfo->media_id . "'";
00331         $clips = $db->Execute($clip_query);
00332         $contents[] = array('text' =>  TEXT_CLIPS . ' ' . $clips->RecordCount());
00333       }
00334       break;
00335   }
00336 
00337   if ( (zen_not_null($heading)) && (zen_not_null($contents)) ) {
00338     echo '            <td width="25%" valign="top">' . "\n";
00339 
00340     $box = new box;
00341     echo $box->infoBox($heading, $contents);
00342 
00343     echo '            </td>' . "\n";
00344   }
00345 ?>
00346           </tr>
00347         </table></td>
00348       </tr>
00349     </table></td>
00350   </tr>
00351 </table>
00352 <!-- body_eof //-->
00353 
00354 <!-- footer //-->
00355 <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
00356 <!-- footer_eof //-->
00357 <br>
00358 </body>
00359 </html>
00360 <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
 All Data Structures Namespaces Files Functions Variables Enumerations