Need stop/msg at set# of uploads
Posted: Fri Mar 23, 2012 12:39 am
I need some quick help with this, This is my file upload row loop,
I want to add the if <b>k = 4</b>, then you have reached the maximum upload.
Or something to that Effect.
PRetty much only allowing 4-upload per user, before stoping the upload feature..
row count
End row count
I want to add the if <b>k = 4</b>, then you have reached the maximum upload.
Or something to that Effect.
PRetty much only allowing 4-upload per user, before stoping the upload feature..
row count
Code: Select all
<?php
$k = 4;
//$n=5;
for ($i=0, $n=count( $this->songs ); $i < $n; $i++)
//for ($i=0, $n=count( $this->songs ); $i < $n; $i++)
{
$song = &$this->songs[$i];
$checked = JHTML::_('grid.id', $i, $song->id );
$link_edit = JRoute::_( 'index.php?userid='.$this->xxx->user_id.'&layout=form&id=' . $song->id .'&from=xxx');
$tick = JHTML::image("images/tick.png",JText::_('Yes'));
$tick_file = JHTML::image("images/tick.png",JText::_('Yes'),array("title" => $xxx->filename));
$cross = JHTML::image("images/publish_x.png",JText::_('No'));
?>
Code: Select all
<?php
$k = 1 - $k;
}
?>