phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: dj edit.php,1.8,1.9 show.php,1.9,1.10


From: Miles Lott <address@hidden>
Subject: [Phpgroupware-cvs] CVS: dj edit.php,1.8,1.9 show.php,1.9,1.10
Date: Mon, 12 Aug 2002 07:19:11 -0400

Update of /cvsroot/phpgroupware/dj
In directory subversions:/tmp/cvs-serv14599

Modified Files:
        edit.php show.php 
Log Message:
globals,etc.

Index: edit.php
===================================================================
RCS file: /cvsroot/phpgroupware/dj/edit.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** edit.php    7 Jul 2001 18:04:44 -0000       1.8
--- edit.php    12 Aug 2002 11:19:07 -0000      1.9
***************
*** 13,17 ****
    /* $Id$ */
  
!       $phpgw_info['flags'] = array(
                'currentapp' => 'dj',
                'noheader'   => True,
--- 13,18 ----
    /* $Id$ */
  
!       $phpgw_info = array();
!       $GLOBALS['phpgw_info']['flags'] = array(
                'currentapp' => 'dj',
                'noheader'   => True,
***************
*** 21,33 ****
        include('../header.inc.php');
  
!       if (!$song_id)
        {
!               Header('Location: ' . $phpgw->link('/dj/index.php'));
!               $phpgw->common->phpgw_exit();
        }
  
!       if ($submit && $song_id)
        {
!               $genre = $phpgw->categories->id2name($cat_id);
  
                if ($song_status)
--- 22,48 ----
        include('../header.inc.php');
  
!       $song_id      = get_var('song_id',array('POST','GET'));
!       $submit       = get_var('submit',array('POST'));
!       $song_status  = get_var('song_status',array('POST'));
!       $cat_id       = get_var('cat_id',array('POST','GET'));
!       $new_cat      = get_var('new_cat',array('POST','GET'));
! 
!       if(!$song_id)
        {
!               Header('Location: ' . $GLOBALS['phpgw']->link('/dj/index.php'));
!               $GLOBALS['phpgw']->common->phpgw_exit();
        }
  
!       if($submit && $song_id)
        {
!               $genre = $GLOBALS['phpgw']->categories->id2name($cat_id);
! 
!               $song_name    = get_var('song_name',array('POST'));
!               $song_title   = get_var('song_title',array('POST'));
!               $song_artist  = get_var('song_artist',array('POST'));
!               $song_album   = get_var('song_album',array('POST'));
!               $song_year    = get_var('song_year',array('POST'));
!               $song_comment = get_var('song_comment',array('POST'));
!               $song_size    = get_var('song_size',array('POST'));
  
                if ($song_status)
***************
*** 51,184 ****
                        . " WHERE song_id=" . $song_id;
  
!               $phpgw->db->query($sql);
  
!               Header('Location: ' . $phpgw->link('/dj/view.php',"song_id=" . 
$song_id));
!               $phpgw->common->phpgw_exit();
        }
  
!       $phpgw->common->phpgw_header();
!       echo parse_navbar();
  
!       $t = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
!       $t->set_file(array('edit' => 'edit.tpl'));
!       $t->set_block('edit','form','form');
!       $t->set_block('edit','footer','footer');
! 
!       $t->set_var('hidden_vars','');
! 
!       if ($new_cat) { $cat_id = $new_cat; }
! 
!       $t->set_var('lang_action',lang('Edit song'));
!       $t->set_var('action_url',$phpgw->link('/dj/edit.php'));
! 
!       $phpgw->db->query("SELECT * FROM phpgw_dj_songlist WHERE 
song_id='$song_id'");
!       $phpgw->db->next_record();
! 
!       $t->set_var('song_name',$phpgw->db->f('song_name'));
!       $t->set_var('song_title',$phpgw->db->f('song_title'));
!       $t->set_var('song_artist',$phpgw->db->f('song_artist'));
!       $t->set_var('song_album',$phpgw->db->f('song_album'));
!       $t->set_var('song_year',$phpgw->db->f('song_year'));
!       $t->set_var('song_comment',$phpgw->db->f('song_comment'));
!       $cat_id = $phpgw->categories->name2id($phpgw->db->f('song_genre'));
!       $t->set_var('genre_option',cat_option($cat_id,True,False));
!       $t->set_var('song_size',nicesize($phpgw->db->f('song_size')));
!       $t->set_var('song_length',date('i:s',$phpgw->db->f('song_length')));
!       $t->set_var('song_bitrate',$phpgw->db->f('song_bitsize') . 
lang('kb/s'));
!       $t->set_var('song_samplerate',$phpgw->db->f('song_samplerate') . 
lang('hz'));
!       $t->set_var('song_frames',$phpgw->db->f('song_frames'));
!       $t->set_var('song_emphasis',$phpgw->db->f('song_emphasis'));
!       $t->set_var('song_cmode',$phpgw->db->f('song_cmode'));
!       $t->set_var('song_version',$phpgw->db->f('song_version'));
!       $t->set_var('song_layer',$phpgw->db->f('song_layer'));
!       if ($phpgw->db->f('song_crc'))
        {
!               $t->set_var('song_crc',lang('disabled'));
        }
        else
        {
!               $t->set_var('song_crc',lang('enabled'));
        }
  
!       if ($phpgw->db->f('song_copyright'))
        {
!               $t->set_var('song_copyright',lang('Yes'));
        }
        else
        {
!               $t->set_var('song_copyright',lang('No'));
        }
  
!       if($phpgw->db->f('song_original'))
        {
!               $t->set_var('song_original',lang('Yes'));
        }
        else
        {
!               $t->set_var('song_original',lang('No'));
        }
  
!       if($phpgw->db->f('song_status') == 'A')
        {
!               $t->set_var('song_status',' checked');
!               $t->set_var('lang_status',lang('Unselect to make unavailable'));
        }
        else
        {
!               $t->set_var('song_status','');
!               $t->set_var('lang_status',lang('Select to make available'));
        }
!       if($phpgw->db->f('song_cycle_status') == 'A')
        {
!               $t->set_var('song_cycle_status',lang('Available'));
        }
        else
        {
!               $t->set_var('song_cycle_status',lang('Played'));
        }
  
!       $t->set_var('lang_name',lang('File Name'));
!       $t->set_var('lang_title',lang('Title'));
!       $t->set_var('lang_artist',lang('Artist'));
!       $t->set_var('lang_album',lang('Album'));
!       $t->set_var('lang_year',lang('Year'));
!       $t->set_var('lang_comment',lang('Comment'));
!       $t->set_var('lang_genre',lang('Genre'));
!       $t->set_var('lang_size',lang('File Size'));
!       $t->set_var('lang_length',lang('Length'));
!       $t->set_var('lang_bitrate',lang('Bitrate'));
!       $t->set_var('lang_samplerate',lang('Sample Rate'));
!       $t->set_var('lang_frames',lang('Frames'));
!       $t->set_var('lang_emphasis',lang('Emphasis'));
!       $t->set_var('lang_cmode',lang('Channel Mode'));
!       $t->set_var('lang_version',lang('Version'));
!       $t->set_var('lang_layer',lang('Layer'));
!       $t->set_var('lang_crc',lang('Error Correction'));
!       $t->set_var('lang_copyright',lang('Copyright'));
!       $t->set_var('lang_original',lang('Original'));
!       //$t->set_var('lang_status',lang('Status'));
!       $t->set_var('lang_cycle_status',lang('Cycle Status'));
! 
!       $t->set_var('song_id',$song_id);
!       $t->set_var('sort',$sort);
!       $t->set_var('order',$order);
!       $t->set_var('filter',$filter);
!       $t->set_var('query',$query);
!       $t->set_var('start',$start);
!       $t->set_var('cat_id',$cat_id);
!       $t->set_var('lang_done',lang('Done'));
!       $t->set_var('lang_edit',lang('Edit'));
!       $t->set_var('lang_cancel',lang('cancel'));
!       $t->set_var('lang_request',lang('request'));
!       $t->set_var('lang_submit',lang('submit'));
!       $t->set_var('cancel_link','<form method="POST" action="' . 
$phpgw->link('/dj/index.php') . '">');
!       $t->set_var('request_link',$phpgw->link('/dj/request.php','song_id=' . 
$song_id));
  
!       $t->set_var('delete_link','<form method="POST" 
action="'.$phpgw->link('/dj/delete.php','song_id=' . $song_id) . '">');
!       $t->set_var('delete_button','<input type="submit" name="delete" 
value="' . lang('Delete') . '">');
  
!       $t->pparse('out','form');
!       $t->pparse('out','footer');
  
!       $phpgw->common->phpgw_footer();
  ?>
--- 66,200 ----
                        . " WHERE song_id=" . $song_id;
  
!               $GLOBALS['phpgw']->db->query($sql);
  
!               Header('Location: ' . 
$GLOBALS['phpgw']->link('/dj/view.php',"song_id=" . $song_id));
!               $GLOBALS['phpgw']->common->phpgw_exit();
        }
  
!       $GLOBALS['phpgw']->common->phpgw_header();
! 
!       $GLOBALS['phpgw']->template->set_file(array('edit' => 'edit.tpl'));
!       $GLOBALS['phpgw']->template->set_block('edit','form','form');
!       $GLOBALS['phpgw']->template->set_block('edit','footer','footer');
! 
!       $GLOBALS['phpgw']->template->set_var('hidden_vars','');
! 
!       if($new_cat)
!       {
!               $cat_id = $new_cat;
!       }
! 
!       $GLOBALS['phpgw']->template->set_var('lang_action',lang('Edit song'));
!       
$GLOBALS['phpgw']->template->set_var('action_url',$GLOBALS['phpgw']->link('/dj/edit.php'));
! 
!       $GLOBALS['phpgw']->db->query("SELECT * FROM phpgw_dj_songlist WHERE 
song_id='$song_id'");
!       $GLOBALS['phpgw']->db->next_record();
  
!       
$GLOBALS['phpgw']->template->set_var('song_name',$GLOBALS['phpgw']->db->f('song_name'));
!       
$GLOBALS['phpgw']->template->set_var('song_title',$GLOBALS['phpgw']->db->f('song_title'));
!       
$GLOBALS['phpgw']->template->set_var('song_artist',$GLOBALS['phpgw']->db->f('song_artist'));
!       
$GLOBALS['phpgw']->template->set_var('song_album',$GLOBALS['phpgw']->db->f('song_album'));
!       
$GLOBALS['phpgw']->template->set_var('song_year',$GLOBALS['phpgw']->db->f('song_year'));
!       
$GLOBALS['phpgw']->template->set_var('song_comment',$GLOBALS['phpgw']->db->f('song_comment'));
!       $cat_id = 
$GLOBALS['phpgw']->categories->name2id($GLOBALS['phpgw']->db->f('song_genre'));
!       
$GLOBALS['phpgw']->template->set_var('genre_option',cat_option($cat_id,True,False));
!       
$GLOBALS['phpgw']->template->set_var('song_size',nicesize($GLOBALS['phpgw']->db->f('song_size')));
!       
$GLOBALS['phpgw']->template->set_var('song_length',date('i:s',$GLOBALS['phpgw']->db->f('song_length')));
!       
$GLOBALS['phpgw']->template->set_var('song_bitrate',$GLOBALS['phpgw']->db->f('song_bitsize')
 . lang('kb/s'));
!       
$GLOBALS['phpgw']->template->set_var('song_samplerate',$GLOBALS['phpgw']->db->f('song_samplerate')
 . lang('hz'));
!       
$GLOBALS['phpgw']->template->set_var('song_frames',$GLOBALS['phpgw']->db->f('song_frames'));
!       
$GLOBALS['phpgw']->template->set_var('song_emphasis',$GLOBALS['phpgw']->db->f('song_emphasis'));
!       
$GLOBALS['phpgw']->template->set_var('song_cmode',$GLOBALS['phpgw']->db->f('song_cmode'));
!       
$GLOBALS['phpgw']->template->set_var('song_version',$GLOBALS['phpgw']->db->f('song_version'));
!       
$GLOBALS['phpgw']->template->set_var('song_layer',$GLOBALS['phpgw']->db->f('song_layer'));
!       if ($GLOBALS['phpgw']->db->f('song_crc'))
        {
!               
$GLOBALS['phpgw']->template->set_var('song_crc',lang('disabled'));
        }
        else
        {
!               
$GLOBALS['phpgw']->template->set_var('song_crc',lang('enabled'));
        }
  
!       if ($GLOBALS['phpgw']->db->f('song_copyright'))
        {
!               
$GLOBALS['phpgw']->template->set_var('song_copyright',lang('Yes'));
        }
        else
        {
!               
$GLOBALS['phpgw']->template->set_var('song_copyright',lang('No'));
        }
  
!       if($GLOBALS['phpgw']->db->f('song_original'))
        {
!               
$GLOBALS['phpgw']->template->set_var('song_original',lang('Yes'));
        }
        else
        {
!               
$GLOBALS['phpgw']->template->set_var('song_original',lang('No'));
        }
  
!       if($GLOBALS['phpgw']->db->f('song_status') == 'A')
        {
!               $GLOBALS['phpgw']->template->set_var('song_status',' checked');
!               
$GLOBALS['phpgw']->template->set_var('lang_status',lang('Unselect to make 
unavailable'));
        }
        else
        {
!               $GLOBALS['phpgw']->template->set_var('song_status','');
!               $GLOBALS['phpgw']->template->set_var('lang_status',lang('Select 
to make available'));
        }
!       if($GLOBALS['phpgw']->db->f('song_cycle_status') == 'A')
        {
!               
$GLOBALS['phpgw']->template->set_var('song_cycle_status',lang('Available'));
        }
        else
        {
!               
$GLOBALS['phpgw']->template->set_var('song_cycle_status',lang('Played'));
        }
  
!       $GLOBALS['phpgw']->template->set_var('lang_name',lang('File Name'));
!       $GLOBALS['phpgw']->template->set_var('lang_title',lang('Title'));
!       $GLOBALS['phpgw']->template->set_var('lang_artist',lang('Artist'));
!       $GLOBALS['phpgw']->template->set_var('lang_album',lang('Album'));
!       $GLOBALS['phpgw']->template->set_var('lang_year',lang('Year'));
!       $GLOBALS['phpgw']->template->set_var('lang_comment',lang('Comment'));
!       $GLOBALS['phpgw']->template->set_var('lang_genre',lang('Genre'));
!       $GLOBALS['phpgw']->template->set_var('lang_size',lang('File Size'));
!       $GLOBALS['phpgw']->template->set_var('lang_length',lang('Length'));
!       $GLOBALS['phpgw']->template->set_var('lang_bitrate',lang('Bitrate'));
!       $GLOBALS['phpgw']->template->set_var('lang_samplerate',lang('Sample 
Rate'));
!       $GLOBALS['phpgw']->template->set_var('lang_frames',lang('Frames'));
!       $GLOBALS['phpgw']->template->set_var('lang_emphasis',lang('Emphasis'));
!       $GLOBALS['phpgw']->template->set_var('lang_cmode',lang('Channel Mode'));
!       $GLOBALS['phpgw']->template->set_var('lang_version',lang('Version'));
!       $GLOBALS['phpgw']->template->set_var('lang_layer',lang('Layer'));
!       $GLOBALS['phpgw']->template->set_var('lang_crc',lang('Error 
Correction'));
!       
$GLOBALS['phpgw']->template->set_var('lang_copyright',lang('Copyright'));
!       $GLOBALS['phpgw']->template->set_var('lang_original',lang('Original'));
!       //$GLOBALS['phpgw']->template->set_var('lang_status',lang('Status'));
!       $GLOBALS['phpgw']->template->set_var('lang_cycle_status',lang('Cycle 
Status'));
! 
!       $GLOBALS['phpgw']->template->set_var('song_id',$song_id);
!       $GLOBALS['phpgw']->template->set_var('sort',$sort);
!       $GLOBALS['phpgw']->template->set_var('order',$order);
!       $GLOBALS['phpgw']->template->set_var('filter',$filter);
!       $GLOBALS['phpgw']->template->set_var('query',$query);
!       $GLOBALS['phpgw']->template->set_var('start',$start);
!       $GLOBALS['phpgw']->template->set_var('cat_id',$cat_id);
!       $GLOBALS['phpgw']->template->set_var('lang_done',lang('Done'));
!       $GLOBALS['phpgw']->template->set_var('lang_edit',lang('Edit'));
!       $GLOBALS['phpgw']->template->set_var('lang_cancel',lang('cancel'));
!       $GLOBALS['phpgw']->template->set_var('lang_request',lang('request'));
!       $GLOBALS['phpgw']->template->set_var('lang_submit',lang('submit'));
!       $GLOBALS['phpgw']->template->set_var('cancel_link','<form method="POST" 
action="' . $GLOBALS['phpgw']->link('/dj/index.php') . '">');
!       
$GLOBALS['phpgw']->template->set_var('request_link',$GLOBALS['phpgw']->link('/dj/request.php','song_id='
 . $song_id));
  
!       $GLOBALS['phpgw']->template->set_var('delete_link','<form method="POST" 
action="'.$GLOBALS['phpgw']->link('/dj/delete.php','song_id=' . $song_id) . 
'">');
!       $GLOBALS['phpgw']->template->set_var('delete_button','<input 
type="submit" name="delete" value="' . lang('Delete') . '">');
  
!       $GLOBALS['phpgw']->template->pparse('out','form');
!       $GLOBALS['phpgw']->template->pparse('out','footer');
  
!       $GLOBALS['phpgw']->common->phpgw_footer();
  ?>

Index: show.php
===================================================================
RCS file: /cvsroot/phpgroupware/dj/show.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** show.php    30 Apr 2002 18:27:02 -0000      1.9
--- show.php    12 Aug 2002 11:19:07 -0000      1.10
***************
*** 32,36 ****
  
        $GLOBALS['phpgw']->common->phpgw_header();
-       echo parse_navbar();
  
        if ($addshow)
--- 32,35 ----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]