first commit

This commit is contained in:
bing
2026-04-03 11:32:07 +08:00
commit 003be19522
1142 changed files with 185854 additions and 0 deletions

31
doc/php/add_download.php Normal file
View File

@@ -0,0 +1,31 @@
<html>
<head>
<meta http-equiv="refresh" content="0; url=../version/QxOrm_1.5.0.zip">
<?php
settype($nb_errors, "integer");
settype($try_count, "integer");
/*
if ($_POST['created_by'] == "") { $errors = $errors . "\nYou must write your name or compagny name."; $nb_errors++; }
*/
if ($nb_errors != 0) { echo "<script type='text/javascript'>alert('" . $errors . "');</script>"; }
if ($nb_errors == 0)
{
$_POST['created_by'] = nl2br(htmlentities(stripslashes($_POST['created_by'])));
$_POST['message_text'] = nl2br(htmlentities(stripslashes($_POST['message_text'])));
$createdby = "<h3>**** Downloaded by " . $_POST['created_by'] . " (" . date(d."/".m."/"."Y") . " " . date(H.":".i) . ")</h3>";
$msg = "<p>" . $_POST['message_text'] . "</p>";
$filename = "./version_1.5.0.php";
while ((file_exists($filename)) && (! is_writable($filename)) && ($try_count < 200)) { usleep(100000); $try_count++; }
$fp = fopen($filename, "a");
fputs($fp, "\n");
fputs($fp, $createdby);
fputs($fp, "\n");
fputs($fp, $msg);
fclose($fp);
}
echo "<script type='text/javascript'>document.location.href='../version/QxOrm_1.5.0.zip';</script>";
?>
</head>
<body>
</body>
</html>

39
doc/php/add_download.php5 Normal file
View File

@@ -0,0 +1,39 @@
<html>
<body>
<?php
$file_to_download = '../version/' . $_GET["file_path"];
$file_description = $_GET["file_desc"];
$is_valid = ((substr($_GET["file_path"], 0, 2) === 'Qx') && (substr($_GET["file_desc"], 0, 2) === 'Qx'));
if (($is_valid) && (file_exists($file_to_download)))
{
try
{
settype($try_count, "integer");
$file_log = "./download_log/" . $file_description . ".php";
$text_log = "<h3>**** " . date(d."/".m."/"."Y") . " " . date(H.":".i) . " ****</h3>";
while ((file_exists($file_log)) && (! is_writable($file_log)) && ($try_count < 200))
{ usleep(100000); $try_count++; }
$fp = fopen($file_log, "a");
fputs($fp, "\n");
fputs($fp, $text_log);
fclose($fp);
}
catch (Exception $exc) { echo '<p>' . $exc->getMessage() . '</p>'; }
echo '<p>If your download does not start automatically within 5 seconds, <a href="' . $file_to_download . '">please click here to manually download the file</a>.</p>';
echo '<br/>';
echo '<p><a href="../qxorm_en/home.html"><img alt="QxOrm and QxEntityEditor home page" src="../qxorm_en/resource/logo_qxorm_and_qxee.png" align="left" border="0"></a></p>';
echo '<script type="text/javascript">';
echo 'document.location.href = "' . $file_to_download . '";';
echo '</script>';
}
else if ($is_valid)
{
echo '<p>File to download <b>' . $file_to_download . '</b> does not exist !</p>';
echo '<br/>';
echo '<p><a href="../qxorm_en/home.html"><img alt="QxOrm and QxEntityEditor home page" src="../qxorm_en/resource/logo_qxorm_and_qxee.png" align="left" border="0"></a></p>';
}
?>
</body>
</html>