[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/admin/ -> authors.php (source)

   1  <?php
   2  /*

   3  $Id: authors.php 3 2006-05-27 04:59:07Z user $

   4  

   5    osCMax Power E-Commerce

   6    http://oscdox.com

   7  

   8    Copyright 2006 osCMax

   9  

  10    Released under the GNU General Public License

  11  */
  12  
  13    require ('includes/application_top.php');
  14    require (DIR_FCKEDITOR . 'fckeditor.php');
  15    $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
  16  
  17    if (tep_not_null($action)) {
  18      switch ($action) {
  19        case 'insert':
  20        case 'save':
  21          if (isset($HTTP_GET_VARS['auID'])) $authors_id = tep_db_prepare_input($HTTP_GET_VARS['auID']);
  22          $authors_name = tep_db_prepare_input($HTTP_POST_VARS['authors_name']);
  23  
  24          $sql_data_array = array('authors_name' => $authors_name);
  25  
  26          if ($action == 'insert') {
  27            $insert_sql_data = array('date_added' => 'now()');
  28  
  29            $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
  30  
  31            tep_db_perform(TABLE_AUTHORS, $sql_data_array);
  32            $authors_id = tep_db_insert_id();
  33          } elseif ($action == 'save') {
  34            $update_sql_data = array('last_modified' => 'now()');
  35  
  36            $sql_data_array = array_merge($sql_data_array, $update_sql_data);
  37  
  38            tep_db_perform(TABLE_AUTHORS, $sql_data_array, 'update', "authors_id = '" . (int)$authors_id . "'");
  39          }
  40  
  41          $languages = tep_get_languages();
  42          for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
  43            $authors_desc_array = $HTTP_POST_VARS['authors_description'];
  44            $authors_url_array = $HTTP_POST_VARS['authors_url'];
  45            $language_id = $languages[$i]['id'];
  46  
  47            $sql_data_array = array('authors_description' => tep_db_prepare_input($authors_desc_array[$language_id]),
  48                                    'authors_url' => tep_db_prepare_input($authors_url_array[$language_id]));
  49  
  50            if ($action == 'insert') {
  51              $insert_sql_data = array('authors_id' => $authors_id,
  52                                       'languages_id' => $language_id);
  53  
  54              $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
  55  
  56              tep_db_perform(TABLE_AUTHORS_INFO, $sql_data_array);
  57            } elseif ($action == 'save') {
  58              tep_db_perform(TABLE_AUTHORS_INFO, $sql_data_array, 'update', "authors_id = '" . (int)$authors_id . "' and languages_id = '" . (int)$language_id . "'");
  59            }
  60          }
  61  
  62          if (USE_CACHE == 'true') {
  63            tep_reset_cache_block('authors');
  64          }
  65  
  66          tep_redirect(tep_href_link(FILENAME_AUTHORS, (isset($HTTP_GET_VARS['page']) ? 'page=' . $HTTP_GET_VARS['page'] . '&' : '') . 'auID=' . $authors_id));
  67          break;
  68        case 'deleteconfirm':
  69          $authors_id = tep_db_prepare_input($HTTP_GET_VARS['auID']);
  70  
  71          tep_db_query("delete from " . TABLE_AUTHORS . " where authors_id = '" . (int)$authors_id . "'");
  72          tep_db_query("delete from " . TABLE_AUTHORS_INFO . " where authors_id = '" . (int)$authors_id . "'");
  73  
  74          if (isset($HTTP_POST_VARS['delete_articles']) && ($HTTP_POST_VARS['delete_articles'] == 'on')) {
  75            $articles_query = tep_db_query("select articles_id from " . TABLE_ARTICLES . " where authors_id = '" . (int)$authors_id . "'");
  76            while ($articles = tep_db_fetch_array($articles_query)) {
  77              tep_remove_article($articles['articles_id']);
  78            }
  79          } else {
  80            tep_db_query("update " . TABLE_ARTICLES . " set authors_id = '' where authors_id = '" . (int)$authors_id . "'");
  81          }
  82  
  83          if (USE_CACHE == 'true') {
  84            tep_reset_cache_block('authors');
  85          }
  86  
  87          tep_redirect(tep_href_link(FILENAME_AUTHORS, 'page=' . $HTTP_GET_VARS['page']));
  88          break;
  89      }
  90    }
  91  ?>
  92  <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
  93  <html <?php echo HTML_PARAMS; ?>>
  94  <head>
  95  <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
  96  <?php
  97  // BOF: WebMakers.com Changed: Header Tag Controller v1.0

  98  // Replaced by header_tags.php

  99  if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 100    require(DIR_WS_INCLUDES . 'header_tags.php');
 101  } else {
 102  ?> 
 103    <title><?php echo TITLE ?></title>
 104  <?php
 105  }
 106  // EOF: WebMakers.com Changed: Header Tag Controller v1.0

 107  ?>
 108  <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
 109  <script language="javascript" src="includes/general.js"></script>
 110  <script language="javascript"><!--
 111  function popupImageWindow(url) {
 112    window.open(url,'popupImageWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
 113  }
 114  //--></script>

 115  </head>
 116  <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();">
 117  <!-- header //-->
 118  <?php require (DIR_WS_INCLUDES . 'header.php'); ?>
 119  <!-- header_eof //-->
 120  
 121  <!-- body //-->
 122  <table border="0" width="100%" cellspacing="2" cellpadding="2">
 123    <tr>
 124      <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
 125  <!-- left_navigation //-->
 126  <?php require (DIR_WS_INCLUDES . 'column_left.php'); ?>
 127  <!-- left_navigation_eof //-->
 128      </table></td>
 129  <!-- body_text //-->
 130      <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
 131  <?php
 132    if ($action == 'new') {
 133  ?>
 134        <tr>
 135          <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
 136            <tr>
 137              <td class="pageHeading"><?php echo TEXT_HEADING_NEW_AUTHOR; ?></td>
 138              <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
 139            </tr>
 140          </table></td>
 141        </tr>
 142        <tr>
 143          <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
 144        </tr>
 145        <tr><?php echo tep_draw_form('authors', FILENAME_AUTHORS, 'action=insert', 'post', 'enctype="multipart/form-data"'); ?>
 146          <td><table border="0" cellspacing="0" cellpadding="2">
 147            <tr>
 148              <td class="main" colspan="2"><?php echo TEXT_NEW_INTRO; ?></td>
 149            </tr>
 150            <tr>
 151              <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
 152            </tr>
 153            <tr>
 154              <td class="main"><?php echo TEXT_AUTHORS_NAME; ?></td>
 155              <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_draw_input_field('authors_name', '', 'size="20"'); ?></td>
 156            </tr>
 157            <tr>
 158              <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
 159            </tr>
 160  <?php
 161    $languages = tep_get_languages();
 162    for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
 163  ?>
 164            <tr>
 165              <td class="main" valign="top"><?php echo TEXT_AUTHORS_DESCRIPTION; ?></td>
 166              <td>
 167                <table border="0" cellspacing="0" cellpadding="0">
 168                  <tr>
 169                    <td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;'; ?></td>
 170             <?php if (ARTICLE_WYSIWYG_ENABLE == 'Enable') { ?>
 171                    <td class="main">
 172                    <?php
 173  // Line Changed - MOD: Ajustable Editor Window

 174                    echo tep_draw_fckeditor('authors_description[' . $languages[$i]['id'] . ']',HTML_AREA_WYSIWYG_EDITOR_WIDTH, HTML_AREA_WYSIWYG_EDITOR_HEIGHT,''); ?></td>
 175             <?php } else { ?>
 176                    <td class="main" valign="top"><?php echo tep_draw_textarea_field('authors_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', ''); ?></td>
 177             <?php } ?>
 178                  </tr>
 179                </table>
 180              </td>
 181            <tr>
 182            <tr>
 183              <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
 184            </tr>
 185            <tr>
 186              <td class="main" valign="top"><?php echo TEXT_AUTHORS_URL; ?></td>
 187              <td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('authors_url[' . $languages[$i]['id'] . ']', '', 'size="30"'); ?></td>
 188            <tr>
 189            <tr>
 190              <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
 191            </tr>
 192  <?php
 193    }
 194  ?>
 195        <tr>
 196          <td class="main">&nbsp;</td>
 197          <td class="main" align="left"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . tep_href_link(FILENAME_AUTHORS, 'page=' . $HTTP_GET_VARS['page'] . '&auID=' . $HTTP_GET_VARS['auID']) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td>
 198        </form>
 199        </tr>
 200            </tr>
 201          </table></td>
 202        </tr>
 203  <?php
 204    } elseif ($action == 'edit') {
 205  
 206      $authors_query = tep_db_query("select authors_id, authors_name from " . TABLE_AUTHORS . " where authors_id = '" . $HTTP_GET_VARS['auID'] . "'");
 207      $authors = tep_db_fetch_array($authors_query)
 208  ?>
 209        <tr>
 210          <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
 211            <tr>
 212              <td class="pageHeading"><?php echo TEXT_HEADING_EDIT_AUTHOR; ?></td>
 213              <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
 214            </tr>
 215          </table></td>
 216        </tr>
 217        <tr>
 218          <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
 219        </tr>
 220        <tr><?php echo tep_draw_form('authors', FILENAME_AUTHORS, 'page=' . $HTTP_GET_VARS['page'] . '&auID=' . $authors['authors_id'] . '&action=save', 'post', 'enctype="multipart/form-data"'); ?>
 221          <td><table border="0" cellspacing="0" cellpadding="2">
 222            <tr>
 223              <td class="main" colspan="2"><?php echo TEXT_EDIT_INTRO; ?></td>
 224            </tr>
 225            <tr>
 226              <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
 227            </tr>
 228            <tr>
 229              <td class="main"><?php echo TEXT_AUTHORS_NAME; ?></td>
 230              <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_draw_input_field('authors_name', $authors['authors_name'], 'size="20"'); ?></td>
 231            </tr>
 232            <tr>
 233              <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
 234            </tr>
 235  <?php
 236    $languages = tep_get_languages();
 237    for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
 238  ?>
 239            <tr>
 240              <td class="main" valign="top"><?php echo TEXT_AUTHORS_DESCRIPTION; ?></td>
 241              <td>
 242                <table border="0" cellspacing="0" cellpadding="0">
 243                  <tr>
 244                    <td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;'; ?></td>
 245             <?php if (ARTICLE_WYSIWYG_ENABLE == 'Enable') { ?>
 246                    <td class="main">
 247                    <?php
 248  // Line Changed - MOD: Ajustable Editor Window

 249                    echo tep_draw_fckeditor('authors_description[' . $languages[$i]['id'] . ']',HTML_AREA_WYSIWYG_EDITOR_WIDTH, HTML_AREA_WYSIWYG_EDITOR_HEIGHT, tep_get_author_description($authors['authors_id'], $languages[$i]['id'])); ?></td>
 250             <?php } else { ?>
 251                    <td class="main" valign="top"><?php echo tep_draw_textarea_field('authors_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', tep_get_author_description($authors['authors_id'], $languages[$i]['id'])); ?></td>
 252             <?php } ?>
 253                  </tr>
 254                </table>
 255              </td>
 256            <tr>
 257            <tr>
 258              <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
 259            </tr>
 260            <tr>
 261              <td class="main" valign="top"><?php echo TEXT_AUTHORS_URL; ?></td>
 262              <td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('authors_url[' . $languages[$i]['id'] . ']', tep_get_author_url($authors['authors_id'], $languages[$i]['id']), 'size="30"'); ?></td>
 263            <tr>
 264            <tr>
 265              <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
 266            </tr>
 267  <?php
 268    }
 269  ?>
 270        <tr>
 271          <td class="main">&nbsp;</td>
 272          <td class="main" align="left"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . tep_href_link(FILENAME_AUTHORS, 'page=' . $HTTP_GET_VARS['page'] . '&auID=' . $authors['authors_id']) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td>
 273        </form>
 274        </tr>
 275            </tr>
 276          </table></td>
 277        </tr>
 278  <?php
 279    } elseif ($action == 'preview') {
 280  
 281      $authors_query = tep_db_query("select authors_id, authors_name from " . TABLE_AUTHORS . " where authors_id = '" . $HTTP_GET_VARS['auID'] . "'");
 282      $authors = tep_db_fetch_array($authors_query)
 283  
 284  ?>
 285        <tr>
 286          <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
 287            <tr>
 288              <td class="pageHeading"><?php echo TEXT_ARTICLE_BY . $authors['authors_name']; ?></td>
 289              <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
 290            </tr>
 291          </table></td>
 292        </tr>
 293        <tr>
 294          <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
 295        </tr>
 296        <tr>
 297          <td><table border="0" cellspacing="0" cellpadding="2">
 298  <?php
 299    $languages = tep_get_languages();
 300    for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
 301  ?>
 302            <tr>
 303              <td class="main" colspan="2" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?></td>
 304            <tr>
 305            <tr>
 306              <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
 307            </tr>
 308            <tr>
 309              <td class="main" valign="top"><?php echo tep_get_author_description($authors['authors_id'], $languages[$i]['id']); ?></td>
 310            <tr>
 311            <tr>
 312              <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
 313            </tr>
 314            <?php if(tep_not_null(tep_get_author_url($authors['authors_id'], $languages[$i]['id']))) { ?>
 315            <tr>
 316              <td class="main" valign="top"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_get_author_url($authors['authors_id'], $languages[$i]['id'])); ?></td>
 317            <tr>
 318            <tr>
 319              <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
 320            </tr>
 321            <?php } ?>
 322  <?php
 323    }
 324  ?>
 325        <tr>
 326          <td class="main" colspan="2" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_AUTHORS, 'page=' . $HTTP_GET_VARS['page'] . '&auID=' . $authors['authors_id']) . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a>'; ?></td>
 327        </form>
 328        </tr>
 329            </tr>
 330          </table></td>
 331        </tr>
 332  <?php } else { ?>
 333        <tr>
 334          <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
 335            <tr>
 336              <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
 337              <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
 338            </tr>
 339          </table></td>
 340        </tr>
 341        <tr>
 342          <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
 343            <tr>
 344              <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
 345                <tr class="dataTableHeadingRow">
 346                  <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_AUTHORS; ?></td>
 347                  <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?>&nbsp;</td>
 348                </tr>
 349  <?php
 350    $authors_query_raw = "select authors_id, authors_name, date_added, last_modified from " . TABLE_AUTHORS . " order by authors_name";
 351    $authors_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $authors_query_raw, $authors_query_numrows);
 352    $authors_query = tep_db_query($authors_query_raw);
 353    while ($authors = tep_db_fetch_array($authors_query)) {
 354      if ((!isset($HTTP_GET_VARS['auID']) || (isset($HTTP_GET_VARS['auID']) && ($HTTP_GET_VARS['auID'] == $authors['authors_id']))) && !isset($auInfo) && (substr($action, 0, 3) != 'new')) {
 355        $author_articles_query = tep_db_query("select count(*) as articles_count from " . TABLE_ARTICLES . " where authors_id = '" . (int)$authors['authors_id'] . "'");
 356        $author_articles = tep_db_fetch_array($author_articles_query);
 357  
 358       $auInfo_array = array_merge($authors, $author_articles);
 359        $auInfo = new objectInfo($auInfo_array);
 360      }
 361  
 362      if (isset($auInfo) && is_object($auInfo) && ($authors['authors_id'] == $auInfo->authors_id)) {
 363        echo '              <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_AUTHORS, 'page=' . $HTTP_GET_VARS['page'] . '&auID=' . $authors['authors_id'] . '&action=edit') . '\'">' . "\n";
 364      } else {
 365        echo '              <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_AUTHORS, 'page=' . $HTTP_GET_VARS['page'] . '&auID=' . $authors['authors_id']) . '\'">' . "\n";
 366      }
 367  ?>
 368                  <td class="dataTableContent"><?php echo $authors['authors_name']; ?></td>
 369                  <td class="dataTableContent" align="right"><?php if (isset($auInfo) && is_object($auInfo) && ($authors['authors_id'] == $auInfo->authors_id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif'); } else { echo '<a href="' . tep_href_link(FILENAME_AUTHORS, 'page=' . $HTTP_GET_VARS['page'] . '&auID=' . $authors['authors_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>&nbsp;</td>
 370                </tr>
 371  <?php
 372    }
 373  ?>
 374                <tr>
 375                  <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
 376                    <tr>
 377                      <td class="smallText" valign="top"><?php echo $authors_split->display_count($authors_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_AUTHORS); ?></td>
 378                      <td class="smallText" align="right"><?php echo $authors_split->display_links($authors_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page']); ?></td>
 379                    </tr>
 380                  </table></td>
 381                </tr>
 382  <?php
 383    if (empty($action)) {
 384  ?>
 385                <tr>
 386                  <td align="right" colspan="2" class="smallText"><?php echo '<a href="' . tep_href_link(FILENAME_AUTHORS, 'page=' . $HTTP_GET_VARS['page'] . '&auID=' . $auInfo->authors_id . '&action=new') . '">' . tep_image_button('button_insert.gif', IMAGE_INSERT) . '</a>'; ?></td>
 387                </tr>
 388  <?php
 389    }
 390  ?>
 391              </table></td>
 392  <?php
 393    $heading = array();
 394    $contents = array();
 395  
 396    switch ($action) {
 397      case 'delete':
 398        $heading[] = array('text' => '<b>' . TEXT_HEADING_DELETE_AUTHOR . '</b>');
 399  
 400        $contents = array('form' => tep_draw_form('authors', FILENAME_AUTHORS, 'page=' . $HTTP_GET_VARS['page'] . '&auID=' . $auInfo->authors_id . '&action=deleteconfirm'));
 401        $contents[] = array('text' => TEXT_DELETE_INTRO);
 402        $contents[] = array('text' => '<br><b>' . $auInfo->authors_name . '</b>');
 403  
 404        if ($auInfo->articles_count > 0) {
 405          $contents[] = array('text' => '<br>' . tep_draw_checkbox_field('delete_articles') . ' ' . TEXT_DELETE_ARTICLES);
 406          $contents[] = array('text' => '<br>' . sprintf(TEXT_DELETE_WARNING_ARTICLES, $auInfo->articles_count));
 407        }
 408  
 409        $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_AUTHORS, 'page=' . $HTTP_GET_VARS['page'] . '&auID=' . $auInfo->authors_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
 410        break;
 411      default:
 412        if (isset($auInfo) && is_object($auInfo)) {
 413          $heading[] = array('text' => '<b>' . $auInfo->authors_name . '</b>');
 414  
 415          $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_AUTHORS, 'page=' . $HTTP_GET_VARS['page'] . '&auID=' . $auInfo->authors_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_AUTHORS, 'page=' . $HTTP_GET_VARS['page'] . '&auID=' . $auInfo->authors_id . '&action=delete') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a><br>' . ' <a href="' . tep_href_link(FILENAME_AUTHORS, 'page=' . $HTTP_GET_VARS['page'] . '&auID=' . $HTTP_GET_VARS['auID']) . '&action=preview' . '">' . tep_image_button('button_preview.gif', IMAGE_PREVIEW) . '</a>');
 416          $contents[] = array('text' => '<br>' . TEXT_DATE_ADDED . ' ' . tep_date_short($auInfo->date_added));
 417          if (tep_not_null($auInfo->last_modified)) $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . tep_date_short($auInfo->last_modified));
 418          $contents[] = array('text' => '<br>' . TEXT_ARTICLES . ' ' . $auInfo->articles_count);
 419        }
 420        break;
 421    }
 422  
 423    if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
 424      echo '            <td width="25%" valign="top">' . "\n";
 425  
 426      $box = new box;
 427      echo $box->infoBox($heading, $contents);
 428  
 429      echo '            </td>' . "\n";
 430    }
 431  ?>
 432            </tr>
 433          </table></td>
 434        </tr>
 435  <?php
 436    }
 437  ?>
 438      </table></td>
 439  <!-- body_text_eof //-->
 440    </tr>
 441  </table>
 442  <!-- body_eof //-->
 443  
 444  <!-- footer //-->
 445  <?php require (DIR_WS_INCLUDES . 'footer.php'); ?>
 446  <!-- footer_eof //-->
 447  <br>
 448  </body>
 449  </html>
 450  <?php require (DIR_WS_INCLUDES . 'application_bottom.php'); ?>


Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7