31 lines
622 B
PHP
31 lines
622 B
PHP
<?php
|
|
|
|
defined ( 'IN_TS' ) or die ( 'Access Denied.' );
|
|
$userid = aac('user')->isLogin();
|
|
|
|
$attachid = intval ( $_POST ['attachid'] );
|
|
|
|
$stredit = $new ['attach']->find ( 'attach', array ('attachid' => $attachid ) );
|
|
|
|
if($stredit=='')
|
|
{
|
|
|
|
tsNotice('NO!');
|
|
}
|
|
if($userid!=$stredit['userid'])
|
|
{
|
|
tsNotice('NO');
|
|
|
|
}
|
|
|
|
|
|
$attachname = trim($_POST['attachname']);
|
|
|
|
$pay=intval($_POST['pay']);
|
|
|
|
$new['attach'] -> update('attach', array('attachid' => $attachid), array(
|
|
'attachname' => $attachname,
|
|
'pay' => $pay,
|
|
));
|
|
header("Location: " . tsUrl('attach', 'show', array('id' => $attachid)));
|
|
?>
|