예제 #1
0
파일: f.inc.php 프로젝트: patim/flogr
 function edit_album_form($id_alb, $alb_page, $ilink, $error = '')
 {
     //$edit_alb = $page->my_album($id_alb);
     $res = $this->q("SELECT `id_album`, `name`, `ascope`,`image`, DATE_FORMAT(`date`, '%e.%m.%Y') 'date'\n\t\t\t\t\t\t FROM `album` WHERE `id_album`=" . $id_alb . " AND `id_user`=" . $_SESSION['id_user']);
     $row_album = mysql_fetch_assoc($res);
     $num_photos = mysql_num_rows($this->q("SELECT `id_photo` FROM `photo` WHERE `id_album`=" . $row_album['id_album']));
     $edit_alb = new album($_SESSION['id_user'], $row_album['id_album'], $num_photos, $row_album['name'], $row_album['image'], $row_album['date'], true, true);
     $alb = '<td width="110" valign="bottom" class="text" height="169">' . $edit_alb->output() . '</td>
     <td colspan=6></td>
     </tr>
     <tr> 
       <td valign="top" width=25>&nbsp;</td>';
     $scope[0] = $row_album['ascope'];
     $t = $alb . sh_album_form($id_alb, 'edit_album', $scope, $row_album['name'], $error);
     $add_form_sec = new section("<span class=header1>Редактирование альбома</span>\n\t\t\t<span class='cin'>&nbsp;&raquo;&nbsp; <a href='index.php?go=albums&alb_num={$id_alb}' class='link'>Фото альбома</a>\n\t\t\t</span>", 5, 3, 1, $t);
     $emp = new content($add_form_sec);
     $this->set_content($emp);
     $this->left_albums($id_alb, $alb_page, $ilink, $_SESSION['id_user']);
 }