Need stop/msg at set# of uploads

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
danjapro
Forum Commoner
Posts: 72
Joined: Mon Sep 27, 2004 10:56 am

Need stop/msg at set# of uploads

Post by danjapro »

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

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'));
         ?>

End row count

Code: Select all


	<?php
	$k = 1 - $k;
	

	}
	?>
Post Reply