start copy from cimac web

This commit is contained in:
2026-05-14 08:47:13 +02:00
commit dfc6ed40ae
3624 changed files with 899295 additions and 0 deletions
+54
View File
@@ -0,0 +1,54 @@
<?php
# FileName="WADYN_MYSQLI_CONN.htm"
# Type="MYSQL"
# HTTP="true"
@session_start();
/*
|--------------------------------------------------------------------------
| Load Composer and .env
|--------------------------------------------------------------------------
| This file is inside: cmccopiaoriginale/Connections/
| vendor and .env are inside: cmccopiaoriginale/
*/
require_once __DIR__ . '/../vendor/autoload.php';
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/../');
$dotenv->safeLoad();
/*
|--------------------------------------------------------------------------
| Database configuration from .env
|--------------------------------------------------------------------------
*/
$hostname_cmctrfdb = $_ENV['DB_HOST'] ?? getenv('DB_HOST') ?? 'localhost';
$database_cmctrfdb = $_ENV['DB_DATABASE'] ?? getenv('DB_DATABASE') ?? '';
$username_cmctrfdb = $_ENV['DB_USERNAME'] ?? getenv('DB_USERNAME') ?? '';
$password_cmctrfdb = $_ENV['DB_PASSWORD'] ?? getenv('DB_PASSWORD') ?? '';
$servername = $hostname_cmctrfdb;
$username = $username_cmctrfdb;
$password = $password_cmctrfdb;
$dbname = $database_cmctrfdb;
/*
|--------------------------------------------------------------------------
| MySQLi connection
|--------------------------------------------------------------------------
*/
$cmctrfdb = mysqli_init();
if (defined("MYSQLI_OPT_INT_AND_FLOAT_NATIVE")) {
$cmctrfdb->options(MYSQLI_OPT_INT_AND_FLOAT_NATIVE, true);
}
$cmctrfdb->real_connect(
$hostname_cmctrfdb,
$username_cmctrfdb,
$password_cmctrfdb,
$database_cmctrfdb
) or die("Connect Error: " . mysqli_connect_error());
+15
View File
@@ -0,0 +1,15 @@
<?php
# FileName="WADYN_MYSQLI_CONN.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_cmctrfdb = "localhost";
$database_cmctrfdb = "acscuips_cmcdb";
$username_cmctrfdb = "acscuips_cmc";
$password_cmctrfdb = "HcU4gm6zzx=~";
@session_start();
$cmctrfdb = mysqli_init();
if (defined("MYSQLI_OPT_INT_AND_FLOAT_NATIVE")) $cmctrfdb->options(MYSQLI_OPT_INT_AND_FLOAT_NATIVE, TRUE);
$cmctrfdb->real_connect($hostname_cmctrfdb, $username_cmctrfdb, $password_cmctrfdb, $database_cmctrfdb) or die("Connect Error: " . mysqli_connect_error());
?>
+14
View File
@@ -0,0 +1,14 @@
<?php
include('include/headscript.php'); ?>
<?php
$country_id = mysqli_real_escape_string($_POST['idarticletype']);
if($idarticletype!='')
{
$states_result = $conn->query('select * from modelarticle where idarticletype='.$idarticletype.'');
$options = "<option value=''>Select State</option>";
while($row = $states_result->fetch_assoc()) {
$options .= "<option value='".$row['idmodelarticle']."'>".$row['namemodelarticle']."</option>";
}
echo $options;
}?>