<tr>
<td class="content">
-<form name='form1' enctype="multipart/form-data" method='post' onsubmit="return validate_testimonial(this)" action='?page=testimonial'>
+<form name='form1' enctype="multipart/form-data" method='post' action='?page=testimonial'>
<input type='hidden' name='page' value='testimonial'>
<table border='0' class='Content'>
<?
if ($_REQUEST['action'] == 'Modify') {
echo "<input type='hidden' title='testimonial id' id='id' name='id' class='ItemValue' value=''>";
- echo "<input type='submit' name='action' class='ItemValue' value='Save'>";
+ echo "<input type='submit' name='action' class='ItemValue' onclick='return validate_testimonial(this);' value='Save'>";
echo "<input type='submit' name='action' class='ItemValue' onclick='confirm(\"Are you sure ?\");' value='Delete'><br>";
echo "<input type='hidden' name='page' class='ItemValue' value='testimonial'><br>";
} else {
- echo "<input type='submit' name='action' class='ItemValue' value='Review Profile Submission'>";
+ echo "<input type='submit' name='action' class='ItemValue' onclick='return validate_testimonial(this);' value='Review Profile Submission'>";
}
?>
$form = load_formul($filename);
if ($form['org_logo'] && file_exists($form['org_logo'])) {
- rename($upload_dir + $form['org_logo'], $upload_dir + $form['org_logo'] + '.remove');
+ rename($upload_dir + $form['org_logo'], 'removed.' + $upload_dir + $form['org_logo']);
}
if (file_exists($filename)) {
- rename($filename, "$filename.remove");
+ rename($filename, "$filename-removed");
echo "Profile deleted";
}
/* Ceci est la facon correcte de traverser un dossier. */
$i = 0 ;
while (false !== ($file = readdir($handle))) {
- if (preg_match("/profile.[a-z0-9\.]+/", $file)) {
+ if (preg_match("/^profile.[a-z0-9\.]+$/", $file)) {
if (($i >= $offset) && ($i < $max)) {
- print_formul_file("$dat_dir/$file",$admin);
+ $i += print_formul_file("$dat_dir/$file",$admin);
+ } else {
+ $i++;
}
if ($i > $max) {
break;
- }
- $i++;
+ }
}
}
closedir($handle);
function export_form($formul)
{
- global $country_lst, $org_type_lst, $org_industry_lst, $os_lst, $catalog_lst;
+ global $country_lst, $org_type_lst, $org_industry_lst, $os_lst, $catalog_lst, $version_lst;
$attribs = array('contact_name','email_address', 'org_name','title','website',
'hardware_comments','comments',
";
- mail('testimonials@rt.baculasystems.com', $subject, $message, "From: $name <$email>");
+ mail('testimonial@rt.baculasystems.com', $subject, $message, "From: $name <$email>");
echo "The email has been sent for approval.<br/>";
}
if ($handle = opendir($dat_dir)) {
/* Ceci est la facon correcte de traverser un dossier. */
while (false !== ($file = readdir($handle))) {
- if (preg_match("/profile.[a-z0-9\.]+/", $file)) {
+ if (preg_match("/^profile.[a-z0-9\.]+$/", $file)) {
$tmpv = array();
$tmpk = array();
$form = load_formul("$dat_dir/$file");