Jump to content

Flashden style site


james182

Recommended Posts

I'm trying to build a site with the below functions. Any help on ones that exist or help on building it would be great.

 

- Be able to Display files

- Browse Categories

- Rating system,

- Manager users/ verify email when registering

- be able to deposit money with Paypal

- Monitor sales

- money/credit left

- Affiliate program to give 50% for referals 1st time.

- Secure download of files bought

- Send email to the buyer when a file is updated

- Search box

- Similar website template

- Recent/popular/search at homepage

- Need installer

 

how would you do the pending queue of files waiting to be approved????

Link to comment
Share on other sites

Thats a lot ure asking and appart from telling a script which has some of the features, no one can really help u here. I would ask u how much knowledge u have on web development so u are willing to start on such a site? If not too much, then its time to learn i guess :).

 

For your question, i dont really understand the use of files to be approved, bought or sold. What files are u refering to? As for the pending queue, u can have a table for files which holds the filename, any extra data and a status field. Once the file is uploaded the status field is update to "status: approved". Thats the base concept.

 

If u want any other help on creating specific features feel free to ask, but telling how to create each of those u asked for would need a long essay.

Link to comment
Share on other sites

Ok point taken.

 

so how would you create a file approval queue, with progress in queue e.g: 53 out of 100, and is updated everytime a file is accepted or rejected.

 

process:

file upload to queue list > administrator approves (goes to new table of files) or rejects (gets deleted) file > queue is updated.

 

USER 1 might be 53 out of 100 and USER 2 might be 30 out of 100

 

After updated due to file being approved or rejected >

 

USER 1 might be 52 out of 100 and USER 2 might be 29 out of 100

Link to comment
Share on other sites

I think you should first start designing your project by outlining what functionality u will have. Keep it as simple as it can be as u can add more advanced features once u learn new stuff. I doubt this queue thing will block u from coding the site, so let that go and start the project as it has to be.

Link to comment
Share on other sites

You'll have alot of work cut out for you ...

 

If you're just starting with PHP i'd sugest using a ready made CMS or something.

From my experience using Joomla with certain modules (DOCman) would cover most of the features you need. Their free and easy to install and understand.

From what i remenber it does have a pending queue of files waiting to be approved.

Google it and see if it has all the features you'll be needing.

In my oppinion it might pe easier to customize the modules you suite your needs than to start from stratch.

 

 

Cheers.

(hope this isn't considered advertising)

 

Link to comment
Share on other sites

ok but how would you create a file approval queue, with progress in queue e.g: 53 out of 100, and is updated everytime a file is accepted or rejected.

 

USER 1 might be 53 out of 100 / USER 2 might be 30 out of 100 > After updated due to file being approved or rejected > USER 1 might be 52 out of 100 / USER 2 might be 29 out of 100

Link to comment
Share on other sites

Store information about pending files in mysql table (together with time when the file was submitted). When the file is accepted/rejected remove it from this table.

When displaying queue order files by submit time.

Link to comment
Share on other sites

Ok, if you insist on doing this yourself... :P

 

This part is about designing you DataBase.

 

You'll want to have a table for your users and the corresponding details and a table to store your file's information.

Each user shlould have and unique ID field (auto increment or auto generated) or something.

The file's table should have an "owner" and "approved" field so you can keep track of your stuff...

 

So... when a user Posts/Uploads a file, it's name and details go intro the files table along with the owner ID.

You will probably be using a form to let your users post the files.

You can include a hidden fiend with name="approved" and value="no" and one with the name="owner" value="username" (use SESSION to get username)

 

The idea behind this is that once the user submits the form the file will automatically be marked in your file's table as waiting to be approved .

 

To view the pending files you would then simply (pending.php)

SELECT * FROM `files` WHERE approved='no' ... (COUNT,GROUP...) whatever else you need to sort

 

Whis will then echo out all the files pending approval.

Once you have them echoed you cand simply echo a link next to each filename with actions (Edit, Delete, ..., Approve)

these links  might look somenthing like this:

<a href="actions.php?action=approve&id=$sql[id]">Approve</a>

In actions.php you simply use a CASE function based on the action variable in the URL and execute SQL stuff based on that.

After approving a file you could redirect yourself back to the pending.php and so on ...

 

 

Hope this helps (and makes sense).

I can give you an example of an actions.php i from one of my latest projects.

 

Cheers

Link to comment
Share on other sites

 

You can include a hidden fiend with name="approved" and value="no" and one with the name="owner" value="username" (use SESSION to get username)

 

 

Don't do that. How difficult would it be to hack this into name="approved" and value="yes"?

Such variables should be treated server-side.

Link to comment
Share on other sites

Don't do that. How difficult would it be to hack this into name="approved" and value="yes"?

Such variables should be treated server-side.

 

OK, don't do that. I'm not so good with security.

It was just an example.

 

@Mchl -- an example would probably be most welcomed.

Link to comment
Share on other sites

ok but who would you get it to display:

 

You are currently 22 out of 50.

 

my code:

<?
include ("connect.php");

$user = $_GET['user'];

$result = mysql_query("SELECT * FROM queueItems ");
$resultUser = mysql_query("SELECT * FROM queueItems WHERE user = '$user' ");
$num_rows = mysql_num_rows($result);
?>


<p>The following files of yours are awaiting approval:</p>
<table class="general_table" cellpadding="0" cellspacing="0">
<thead>
<tr class="">
  <td>Name</td>
  <td>Progress in Queue</td>
  <td>Uploaded</td>
  <td> </td>
</tr>
 </thead>
 
 <tbody>
 <?
 $i = 1;
while($r=mysql_fetch_array($resultUser)){
$user=$r["user"];
$file_name=$r["file_name"];
$qid=$r["qid"];

$curr_position = $i;
?>
<tr class="">
  <td><?=$file_name?></td>
  <td><?=$curr_position?> out of <?=$num_rows?></td>
  <td>1 day ago</td>
  <td><a href="#" onclick="return confirm('Are you sure?');">Delete</a></td>
</tr>
<? }
$i++;
?>

 

Any examples would be appreciated.

Link to comment
Share on other sites

Just an opinion as I'm not very sure how's the queue going to work. You can have a table for files, which stores the file's id, path, title, comments and whatever it needs to have. Add also a field for status, which can have 0: in queue, 1: approved, -1: declined. The queue can be determined by the file id, as normally the greater the id, the higher is the file on queue. To illustrate, a query like this should have the work done:

 

<?php
$fileid = 24;
$results = mysql_query("SELECT COUNT(id) AS queue FROM files WHERE file_id<$fileid AND status=0") or die();
$values = mysql_fetch_array($results);
echo $values['queue']; //or probably: echo $values['queue'] + 1
?>

 

Hope this helps.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.