[ PHPXref.com ] [ Generated: Sun Jul 20 17:05:41 2008 ] [ Coppermine 1.4.5 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/ -> modifyalb.php (source)

   1  <?php
   2  /*************************

   3    Coppermine Photo Gallery

   4    ************************

   5    Copyright (c) 2003-2006 Coppermine Dev Team

   6    v1.1 originally written by Gregory DEMAR

   7  

   8    This program is free software; you can redistribute it and/or modify

   9    it under the terms of the GNU General Public License as published by

  10    the Free Software Foundation; either version 2 of the License, or

  11    (at your option) any later version.

  12    ********************************************

  13    Coppermine version: 1.4.5

  14    $Source: /cvsroot/coppermine/stable/modifyalb.php,v $

  15    $Revision: 1.14 $

  16    $Author: gaugau $

  17    $Date: 2006/03/02 08:17:40 $

  18  **********************************************/
  19  
  20  define('IN_COPPERMINE', true);
  21  define('MODIFYALB_PHP', true);
  22  
  23  include ("include/init.inc.php");
  24  
  25  if (!(GALLERY_ADMIN_MODE || USER_ADMIN_MODE)) {
  26      cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
  27  }
  28  // Type 0 => input

  29  // 1 => yes/no

  30  // 2 => Category

  31  // 3 => Textarea

  32  // 4 => Album thumbnail

  33  // 5 => Album visibility

  34  
  35  // add footnote

  36  $notice1 = ' *';
  37  $help_can_upload = '&nbsp;'.cpg_display_help('f=index.htm&amp;as=album_prop_visitor_start&amp;ae=album_prop_visitor_end&amp;top=1', '400', '200');
  38  $help_album_keywords = '&nbsp;'.cpg_display_help('f=index.htm&amp;as=album_prop_keyword_start&amp;ae=album_prop_keyword_end&amp;top=1', '400', '200');
  39  $help_album_password = '&nbsp;'.cpg_display_help('f=index.htm&amp;as=album_prop_password_start&amp;ae=album_prop_password_end&amp;top=1', '500', '250');
  40  
  41  $captionLabel = $lang_modifyalb_php['alb_desc'];
  42  if ($CONFIG['show_bbcode_help']) {$captionLabel .= '&nbsp;'. cpg_display_help('f=index.html&amp;base=64&amp;h='.urlencode(base64_encode(serialize($lang_bbcode_help_title))).'&amp;t='.urlencode(base64_encode(serialize($lang_bbcode_help))),470,245);}
  43  $data = array($lang_modifyalb_php['general_settings'],
  44      array($lang_modifyalb_php['alb_title'], 'title', 0),
  45      array($lang_modifyalb_php['alb_cat'], 'category', 2),
  46      array($captionLabel, 'description', 3),
  47      array($lang_modifyalb_php['alb_keyword'].$help_album_keywords, 'keyword', 0),
  48      array($lang_modifyalb_php['alb_thumb'], 'thumb', 4), $lang_modifyalb_php['alb_perm'],
  49      array($lang_modifyalb_php['can_view'], 'visibility', 5),
  50      array($lang_modifyalb_php['alb_password'].$help_album_password, 'alb_password', 6),
  51      array($lang_modifyalb_php['alb_password_hint'].$help_album_password, 'alb_password_hint', 7),
  52      array($lang_modifyalb_php['can_upload'].$notice1.$help_can_upload, 'uploads', 1),
  53      array($lang_modifyalb_php['can_post_comments'].$notice1, 'comments', 1),
  54      array($lang_modifyalb_php['can_rate'].$notice1, 'votes', 1),
  55      );
  56  
  57  function get_subcat_data($parent, $ident = '')
  58  {
  59      global $CONFIG, $CAT_LIST;
  60  
  61      $result = cpg_db_query("SELECT cid, name, description FROM {$CONFIG['TABLE_CATEGORIES']} WHERE parent = '$parent' AND cid != 1 ORDER BY pos");
  62      if (mysql_num_rows($result) > 0) {
  63          $rowset = cpg_db_fetch_rowset($result);
  64          foreach ($rowset as $subcat) {
  65              $CAT_LIST[] = array($subcat['cid'], $ident . $subcat['name']);
  66              get_subcat_data($subcat['cid'], $ident . '&nbsp;&nbsp;&nbsp;');
  67          }
  68      }
  69  }
  70  
  71  function form_label($text)
  72  {
  73      echo <<<EOT
  74          <tr>
  75                  <td class="tableh2" colspan="2">
  76                          <b>$text</b>
  77                  </td>
  78          </tr>
  79  
  80  EOT;
  81  }
  82  
  83  function form_input($text, $name)
  84  {
  85      global $ALBUM_DATA;
  86  
  87      $value = $ALBUM_DATA[$name];
  88  
  89      echo <<<EOT
  90          <tr>
  91              <td width="40%" class="tableb">
  92                          $text
  93          </td>
  94          <td width="60%" class="tableb" valign="top">
  95                  <input type="text" style="width: 100%" name="$name" value="$value" class="textinput" />
  96                  </td>
  97          </tr>
  98  
  99  EOT;
 100  }
 101  
 102  function form_yes_no($text, $name)
 103  {
 104      global $ALBUM_DATA, $lang_yes, $lang_no;
 105  
 106      if ($name == 'uploads' && USER_ADMIN_MODE) {
 107          echo "        <input type=\"hidden\" name=\"$name\" value=\"{$ALBUM_DATA['uploads']}\" />";
 108          return;
 109      }
 110  
 111      $value = isset($ALBUM_DATA[$name]) ? $ALBUM_DATA[$name] : false;
 112      $yes_selected = $value == 'YES' ? 'checked="checked"' : '';
 113      $no_selected = $value == 'NO' ? 'checked="checked"' : '';
 114  
 115      echo <<<EOT
 116          <tr>
 117              <td class="tableb">
 118                          $text
 119          </td>
 120          <td class="tableb" valign="top">
 121                          <input type="radio" id="{$name}1" name="$name" value="YES" $yes_selected /><label for="{$name}1" class="clickable_option">$lang_yes</label>
 122                          &nbsp;&nbsp;
 123                          <input type="radio" id="{$name}0" name="$name" value="NO" $no_selected /><label for="{$name}0" class="clickable_option">$lang_no</label>
 124                  </td>
 125          </tr>
 126  
 127  EOT;
 128  }
 129  
 130  function form_category($text, $name)
 131  {
 132      global $ALBUM_DATA, $CAT_LIST, $USER_DATA, $lang_modifyalb_php;
 133  
 134      if (!GALLERY_ADMIN_MODE || $ALBUM_DATA['category'] > FIRST_USER_CAT) {
 135          echo <<<EOT
 136          <tr>
 137              <td class="tableb">
 138                          $text
 139          </td>
 140          <td class="tableb" valign="top">
 141                          <i>{$lang_modifyalb_php['user_gal']}</i>
 142                          <input type="hidden" name="$name" value="{$ALBUM_DATA['category']}" />
 143                  </td>
 144  
 145  EOT;
 146          return;
 147      }
 148  
 149      $CAT_LIST = array();
 150      $CAT_LIST[] = array(0, $lang_modifyalb_php['no_cat']);
 151      get_subcat_data(0, '');
 152  
 153      echo <<<EOT
 154          <tr>
 155              <td class="tableb">
 156                          $text
 157          </td>
 158          <td class="tableb" valign="top">
 159                          <select name="$name" class="listbox">
 160  EOT;
 161      foreach($CAT_LIST as $category) {
 162          echo '                                <option value="' . $category[0] . '"' . ($ALBUM_DATA['category'] == $category[0] ? ' selected': '') . ">" . $category[1] . "</option>\n";
 163      }
 164      echo <<<EOT
 165                          </select>
 166                  </td>
 167          </tr>
 168  
 169  EOT;
 170  }
 171  
 172  function form_textarea($text, $name)
 173  {
 174      global $ALBUM_DATA;
 175  
 176      $value = $ALBUM_DATA[$name];
 177  
 178      echo <<<EOT
 179          <tr>
 180                  <td class="tableb" valign="top">
 181                          $text
 182                  </td>
 183                  <td class="tableb" valign="top">
 184                          <textarea name="$name" rows="5" cols="40" wrap="virtual" class="textinput" style="width: 100%;">{$ALBUM_DATA['description']}</textarea>
 185                  </td>
 186          </tr>
 187  EOT;
 188  }
 189  
 190  function form_alb_thumb($text, $name)
 191  {
 192      global $CONFIG, $ALBUM_DATA, $album, $lang_modifyalb_php,$USER_DATA;
 193  
 194      $cpg_nopic_data = cpg_get_system_thumb('nopic.jpg',$USER_DATA['user_id']);
 195  
 196      $results = cpg_db_query("SELECT pid, filepath, filename, url_prefix FROM {$CONFIG['TABLE_PICTURES']} WHERE aid='$album' AND approved='YES' ORDER BY filename");
 197      if (mysql_num_rows($results) == 0) {
 198          echo <<<EOT
 199          <tr>
 200                  <td class="tableb" valign="top">
 201                          $text
 202                  </td>
 203                  <td class="tableb" valign="top">
 204                          <i>{$lang_modifyalb_php['alb_empty']}</i>
 205                          <input type="hidden" name="$name" value="0" />
 206                  </td>
 207          </tr>
 208  
 209  EOT;
 210          return;
 211      }
 212  
 213      $initial_thumb_url = $cpg_nopic_data['thumb']; //'images/nopic.jpg';

 214  
 215      echo <<<EOT
 216  <script language="JavaScript" type="text/JavaScript">
 217  <!--
 218  var Pic = new Array()
 219  
 220  Pic[0] = '$initial_thumb_url'
 221  
 222  EOT;
 223  
 224      $img_list = array(0 => $lang_modifyalb_php['last_uploaded']);
 225      while ($picture = mysql_fetch_array($results)) {
 226          $thumb_url = get_pic_url($picture, 'thumb');
 227          echo "Pic[{$picture['pid']}] = '" . $thumb_url . "'\n";
 228          if ($picture['pid'] == $ALBUM_DATA[$name]) $initial_thumb_url = $thumb_url;
 229          $img_list[$picture['pid']] = htmlspecialchars($picture['filename']);
 230      } // while

 231      echo <<<EOT
 232  
 233  function ChangeThumb(index)
 234  {
 235          document.images.Thumb.src = Pic[index]
 236  }
 237  
 238  var checkobj
 239  
 240  function agreesubmit(el){
 241      checkobj=el
 242      if (document.all||document.getElementById){
 243          for (i=0;i<checkobj.form.length;i++){  //hunt down submit button
 244              var tempobj=checkobj.form.elements[i]
 245              if(tempobj.type.toLowerCase()=="submit")
 246                  tempobj.disabled=!checkobj.checked
 247          }
 248      }
 249  }
 250  
 251  function defaultagree(el){
 252      if (!document.all&&!document.getElementById){
 253          if (window.checkobj&&checkobj.checked)
 254              return true
 255          else{
 256              alert("{$lang_modifyalb_php['reset_views_confirm']}")
 257              return false
 258          }
 259      }
 260  }
 261  
 262  -->
 263  </script>
 264  
 265  EOT;
 266      $thumb_cell_height = $CONFIG['thumb_width'] + 17;
 267      echo <<<EOT
 268          <tr>
 269                  <td class="tableb" valign="top">
 270                          $text
 271                  </td>
 272                  <td class="tableb" align="center">
 273                          <table cellspacing="0" cellpadding="5" border="0">
 274                                  <tr>
 275                                          <td width="$thumb_cell_height" height="$thumb_cell_height" align="center"><img src="$initial_thumb_url" name='Thumb' class='image' /><br /></td>
 276                                  </tr>
 277                          </table>
 278                          <select name="$name" class="listbox" onChange="if(this.options[this.selectedIndex].value) ChangeThumb(this.options[this.selectedIndex].value);" onKeyUp="if(this.options[this.selectedIndex].value) ChangeThumb(this.options[this.selectedIndex].value);">
 279  
 280  EOT;
 281      foreach($img_list as $pid => $pic_name) {
 282          echo '                                <option value="' . $pid . '"' . ($pid == $ALBUM_DATA[$name] ? ' selected':'') . '>' . $pic_name . "</option>\n";
 283      }
 284      echo <<<EOT
 285                          </select>
 286                  </td>
 287          </tr>
 288  
 289  EOT;
 290  }
 291  
 292  function form_password($text, $name)
 293  {
 294    global $ALBUM_DATA;
 295    $value = $ALBUM_DATA[$name];
 296  
 297    echo <<<EOT
 298          <tr>
 299            <td width="40%" class="tableb">
 300                $text
 301            </td>
 302            <td width="60%" class="tableb" valign="top">
 303              <input type="password" name="$name" value="$value" class="textinput" maxlength="32" size="34" />
 304            </td>
 305          </tr>
 306  EOT;
 307  }
 308  
 309  function form_password_hint($text, $name)
 310  {
 311    global $ALBUM_DATA;
 312    $value = $ALBUM_DATA[$name];
 313  
 314    echo <<<EOT
 315          <tr>
 316            <td width="40%" class="tableb">
 317                $text
 318            </td>
 319            <td width="60%" class="tableb" valign="top">
 320              <input type="text" name="$name" value="$value" class="textinput" maxlength="32" size="34" />
 321            </td>
 322          </tr>
 323  EOT;
 324  }
 325  
 326  function form_visibility($text, $name)
 327  {
 328      global $CONFIG, $USER_DATA, $ALBUM_DATA, $lang_modifyalb_php, $cpg_udb;
 329  
 330      if (!$CONFIG['allow_private_albums']) {
 331          echo '        <input type="hidden" name="' . $name . '" value="0" />' . "\n";
 332          return;
 333      }
 334  
 335      if (GALLERY_ADMIN_MODE) {
 336          $options = array(0 => $lang_modifyalb_php['public_alb'], FIRST_USER_CAT + USER_ID => $lang_modifyalb_php['me_only']);
 337          if ($ALBUM_DATA['category'] > FIRST_USER_CAT) {
 338              //if (defined('UDB_INTEGRATION')) {

 339                  $owner_name = $cpg_udb->get_user_name($ALBUM_DATA['category'] - FIRST_USER_CAT);
 340              /*} else {

 341                  $result = cpg_db_query("SELECT user_name FROM {$CONFIG['TABLE_USERS']} WHERE user_id='" . ($ALBUM_DATA['category'] - FIRST_USER_CAT) . "'");

 342                  if (mysql_num_rows($result)) {

 343                      $user = mysql_fetch_array($result);

 344                      $owner_name = $user['user_name'];

 345                  }*/
 346              //}

 347              $options[$ALBUM_DATA['category']] = sprintf($lang_modifyalb_php['owner_only'], $owner_name);
 348          }
 349          $result = cpg_db_query("SELECT group_id, group_name FROM {$CONFIG['TABLE_USERGROUPS']} WHERE 1");
 350          while ($group = mysql_fetch_array($result)) {
 351              $options[$group['group_id']] = sprintf($lang_modifyalb_php['groupp_only'], $group['group_name']);
 352          } // while

 353      } else {
 354          $options = array(0 => $lang_modifyalb_php['public_alb'],
 355              FIRST_USER_CAT + USER_ID => $lang_modifyalb_php['me_only'],
 356              );
 357          $result = cpg_db_query("SELECT group_id, group_name FROM {$CONFIG['TABLE_USERGROUPS']} WHERE group_id IN " . USER_GROUP_SET);
 358          while ($group = mysql_fetch_array($result)) {
 359              $options[$group['group_id']] = sprintf($lang_modifyalb_php['groupp_only'], $group['group_name']);
 360          } // while

 361      }
 362      echo <<<EOT
 363          <tr>
 364                  <td class="tableb">
 365                          $text
 366                  </td>
 367                  <td class="tableb" valign="top">
 368                          <select name="$name" class="listbox">
 369  
 370  EOT;
 371      foreach ($options as $value => $caption) {
 372          echo '                                <option value ="' . $value . '"' . ($ALBUM_DATA['visibility'] == $value ? ' selected': '') . '>' . $caption . "</option>\n";
 373      }
 374      echo <<<EOT
 375                          </select>
 376                  </td>
 377          </tr>
 378  
 379  EOT;
 380  }
 381  
 382  function create_form(&$data)
 383  {
 384      foreach($data as $element) {
 385          if ((is_array($element))) {
 386              switch ($element[2]) {
 387                  case 0 :
 388                      form_input($element[0], $element[1]);
 389                      break;
 390                  case 1 :
 391                      form_yes_no($element[0], $element[1]);
 392                      break;
 393                  case 2 :
 394                      form_category($element[0], $element[1]);
 395                      break;
 396                  case 3 :
 397                      form_textarea($element[0], $element[1]);
 398                      break;
 399                  case 4 :
 400                      form_alb_thumb($element[0], $element[1]);
 401                      break;
 402                  case 5 :
 403                      form_visibility($element[0], $element[1]);
 404                      break;
 405                  case 6:
 406                      form_password($element[0],$element[1]);
 407                      break;
 408                  case 7:
 409                      form_password_hint($element[0],$element[1]);
 410                      break;
 411                  default:
 412                      cpg_die(CRITICAL_ERROR, 'Invalid action for form creation', __FILE__, __LINE__);
 413              } // switch

 414          } else {
 415              form_label($element);
 416          }
 417      }
 418  }
 419  
 420  function alb_list_box()
 421  {
 422      global $CONFIG, $album, $cpg_udb; //, $PHP_SELF;

 423  
 424      if (GALLERY_ADMIN_MODE) {
 425          $result = cpg_db_query("SELECT aid, title FROM {$CONFIG['TABLE_ALBUMS']} WHERE category < '" . FIRST_USER_CAT . "' ORDER BY title");
 426          $rowset = cpg_db_fetch_rowset($result);
 427          mysql_free_result($result);
 428  
 429          //if (defined('UDB_INTEGRATION')) {

 430              $sql = $cpg_udb->get_admin_album_list();
 431          /*} else {

 432              $sql = "SELECT aid, CONCAT('(', user_name, ') ', title) AS title " . "FROM {$CONFIG['TABLE_ALBUMS']} AS a " . "INNER JOIN {$CONFIG['TABLE_USERS']} AS u ON category = (" . FIRST_USER_CAT . " + user_id) " . "ORDER BY title";

 433          }*/
 434          $result = cpg_db_query($sql);
 435          while ($row = mysql_fetch_array($result)) $rowset[] = $row;
 436          mysql_free_result($result);
 437      } else {
 438          $result = cpg_db_query("SELECT aid, title FROM {$CONFIG['TABLE_ALBUMS']} WHERE category = '" . (FIRST_USER_CAT + USER_ID) . "' ORDER BY title");
 439          $rowset = cpg_db_fetch_rowset($result);
 440          mysql_free_result($result);
 441      }
 442  
 443      if (count($rowset)) {
 444          $lb = "<select name=\"album_listbox\" class=\"listbox\" onChange=\"if(this.options[this.selectedIndex].value) window.location.href='{$_SERVER['PHP_SELF']}?album='+this.options[this.selectedIndex].value;\">\n";
 445          foreach ($rowset as $row) {
 446              $selected = ($row['aid'] == $album) ? "SELECTED" : "";
 447              $lb .= "        <option value=\"" . $row['aid'] . "\" $selected>" . $row['title'] . "</option>\n";
 448          }
 449          $lb .= "</select>\n";
 450          return $lb;
 451      }
 452  }
 453  
 454  if (!isset($_GET['album'])) {
 455      if (GALLERY_ADMIN_MODE) {
 456          $results = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_ALBUMS']} WHERE 1 LIMIT 1");
 457      } else {
 458          $results = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_ALBUMS']} WHERE category = " . (FIRST_USER_CAT + USER_ID) . " LIMIT 1");
 459      }
 460      if (mysql_num_rows($results) == 0) cpg_die(ERROR, $lang_modifyalb_php['err_no_alb_to_modify'], __FILE__, __LINE__);
 461      $ALBUM_DATA = mysql_fetch_array($results);
 462      $album = $ALBUM_DATA['aid'];
 463  } else {
 464      $album = (int)$_GET['album'];
 465      $results = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_ALBUMS']} WHERE aid='$album'");
 466      if (!mysql_num_rows($results)) cpg_die(CRITICAL_ERROR, $lang_errors['non_exist_ap'], __FILE__, __LINE__);
 467      $ALBUM_DATA = mysql_fetch_array($results);
 468  }
 469  
 470  $cat = $ALBUM_DATA['category'];
 471  $actual_cat = $cat;
 472  
 473  if (!GALLERY_ADMIN_MODE && $ALBUM_DATA['category'] != FIRST_USER_CAT + USER_ID) {
 474      cpg_die(ERROR, $lang_errors['perm_denied'], __FILE__, __LINE__);
 475  }
 476  
 477  
 478  //////////// main code start ///////////////////

 479  
 480  pageheader(sprintf($lang_modifyalb_php['upd_alb_n'], $ALBUM_DATA['title']));
 481  
 482  $album_lb = alb_list_box();
 483  $help = '&nbsp;'.cpg_display_help('f=index.htm&amp;as=album_prop&amp;ae=album_prop_end&amp;top=1', '600', '400');
 484  starttable("100%",$lang_modifyalb_php['update'].$help, 2);
 485  echo <<<EOT
 486          <tr>
 487              <td class="tableh2" align="center">
 488                  <a href="editpics.php?album=$album" class="admin_menu">{$lang_modifyalb_php['edit_files']}</a>
 489                  &nbsp;&nbsp;-&nbsp;&nbsp;
 490                  <a href="index.php?cat={$ALBUM_DATA['category']}" class="admin_menu">{$lang_modifyalb_php['parent_category']}</a>
 491                  &nbsp;&nbsp;-&nbsp;&nbsp;
 492                  <a href="thumbnails.php?album=$album" class="admin_menu">{$lang_modifyalb_php['thumbnail_view']}</a>
 493              </td>
 494              <td class="tableh2" align="right">
 495              $album_lb
 496              </td>
 497          </tr>
 498          <form method="post" name="modifyalbum" action="db_input.php">
 499          <input type="hidden" name="event" value="album_update" />
 500          <input type="hidden" name="aid" value="$album" />
 501  
 502  EOT;
 503  
 504  create_form($data);
 505  
 506  echo <<<EOT
 507  <tr>
 508          <td colspan="2" align="left" class="tablef">
 509  EOT;
 510  if (GALLERY_ADMIN_MODE) {
 511  printf($lang_modifyalb_php['notice1'],'<a href="groupmgr.php">','</a>');
 512  }
 513  else {
 514  printf($lang_modifyalb_php['notice1'],'','');
 515  }
 516  echo <<<EOT
 517          </td>
 518  </tr>
 519  <tr>
 520          <td colspan="2" align="center" class="tablef">
 521          <input type="submit" class="button" value="{$lang_modifyalb_php['update']}" />
 522          </td>
 523          </form>
 524  </tr>
 525  EOT;
 526  
 527  endtable();
 528  
 529  if (GALLERY_ADMIN_MODE) {
 530      // get the album stats

 531      $result = cpg_db_query("SELECT SUM(hits) FROM {$CONFIG['TABLE_PICTURES']} WHERE aid='$album'");
 532      $nbEnr = mysql_fetch_array($result);
 533      $hits = $nbEnr[0];
 534      if (!$hits) { $hits = 0; }
 535      mysql_free_result($result);
 536      $result = cpg_db_query("SELECT SUM(votes) FROM {$CONFIG['TABLE_PICTURES']} WHERE aid='$album' AND votes > 0");
 537      $nbEnr = mysql_fetch_array($result);
 538      $votes = $nbEnr[0];
 539      if (!$votes) { $votes = 0; }
 540      mysql_free_result($result);
 541      $result = cpg_db_query("SELECT COUNT(*) FROM {$CONFIG['TABLE_PICTURES']} WHERE aid='$album'");
 542      $nbEnr = mysql_fetch_array($result);
 543      $files = $nbEnr[0];
 544      if (!$files) { $files = 0; }
 545      mysql_free_result($result);
 546  
 547      echo <<<EOT
 548      <br />
 549      <form action="db_input.php" method="post" name="reset_views_form" onSubmit="return defaultagree(this)">
 550      <input type="hidden" name="event" value="album_reset" />
 551      <input type="hidden" name="aid" value="$album" />
 552  EOT;
 553  // set up the translation strings

 554  $translation_reset_views = sprintf($lang_modifyalb_php['reset_views'], '&quot;'.$ALBUM_DATA['title'].'&quot;');
 555  $translation_reset_rating = sprintf($lang_modifyalb_php['reset_rating'], '&quot;'.$ALBUM_DATA['title'].'&quot;');
 556  $translation_delete_comments = sprintf($lang_modifyalb_php['delete_comments'], '&quot;'.$ALBUM_DATA['title'].'&quot;');
 557  $translation_delete_files = sprintf($lang_modifyalb_php['delete_files'], '<span style="color:red;font-weight:bold">', '</span>', '&quot;'.$ALBUM_DATA['title'].'&quot;');
 558      starttable('100%',$lang_modifyalb_php['reset_album'], 2);
 559      echo <<<EOT
 560      <tr>
 561              <td align="left" class="tableb">
 562                  <b>$hits</b> {$lang_modifyalb_php['views']}
 563              </td>
 564              <td align="left" class="tableb">
 565                  <input type="Checkbox" name="reset_views" id="reset_views" value="1" class="checkbox" /><label for="reset_views" class="clickable_option">$translation_reset_views</label>
 566              </td>
 567      </tr>
 568      <tr>
 569              <td align="left" class="tableb">
 570                  <b>$votes</b> {$lang_modifyalb_php['votes']}
 571              </td>
 572              <td align="left" class="tableb">
 573                  <input type="Checkbox" name="reset_rating" id="reset_rating" value="1" class="checkbox" /><label for="reset_rating" class="clickable_option">$translation_reset_rating</label>
 574              </td>
 575      </tr>
 576      <!--not implemented yet
 577      <tr>
 578              <td align="left" class="tableb">
 579                  <b>$comments</b> {$lang_modifyalb_php['comments']}
 580              </td>
 581              <td align="left" class="tableb">
 582                  <input type="Checkbox" name="delete_comments" id="delete_comments" value="1" class="checkbox" /><label for="delete_comments" class="clickable_option">$translation_delete_comments</label>
 583              </td>
 584      </tr>
 585      -->
 586      <tr>
 587              <td align="left" class="tableb">
 588                  <b>$files</b> {$lang_modifyalb_php['files']}
 589              </td>
 590              <td align="left" class="tableb">
 591                  <input type="Checkbox" name="delete_files" id="delete_files" value="1" class="checkbox" /><label for="delete_files" class="clickable_option">$translation_delete_files</label>
 592              </td>
 593      </tr>
 594      <tr>
 595              <td class="tablef" colspan="2" align="center" valign="bottom">
 596                  <input type="submit" class="button" value="{$lang_modifyalb_php['submit_reset']}" disabled="disabled" />
 597                  <input name="agreecheck" type="checkbox" onClick="agreesubmit(this)" />{$lang_modifyalb_php['reset_views_confirm']}
 598              </td>
 599      </tr>
 600  EOT;
 601      endtable();
 602      print "</form>\n";
 603  }
 604  
 605  pagefooter();
 606  ob_end_flush();
 607  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]