In the submit.php, a process file is included for each $source
It isnt really an issue right now since phpdirector only uses 3 sources
but as the script grows and more websites become added, all the elseif(include)
lines could become a hassle.
I have over 10 sources which users can currently submit so I rewrote my submit.php like this:
Only an example for reference...
$source_sites = array('youtube','google','dailymotion','ETC');
if (in_array($source, $source_sites))
{
include("processes/process_".$source.".inc.php");
}else{
$error = $smarty->get_template_vars('LAN_22');
$smarty->assign_by_ref('error', $error);
$smarty->display('error.tpl');
exit;
}
This way, there is only one line needed for every website present or added in the future.
You may find this a better solution for the submit.php as any additional websites that
are added in the future simply need to be set to the array() and upload the process file.