first commit

This commit is contained in:
CHIEFSOFT\ameye
2024-08-17 17:19:25 -04:00
commit 27aeffcfa3
904 changed files with 239087 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
<?php
class Backend_model extends CI_Model {
var $thisUser = 'sameye';
var $USER = '';
var $mermsemr;
function __construct() {
$this->USER = $_SERVER['SCRIPT_FILENAME'];
$this->USER = str_replace('/home', '', $this->USER);
$this->USER = strtok($this->USER, '/');
if ($this->USER == 'opt') {
$this->USER = 'root';
}
$this->thisUser = $this->USER;
}
public function mermsemr_api($in, $out = array()) {
$this->mermsemr_load();
$ret = $this->mermsemr->mermsemr_api($in, $out);
return $ret;
}
public function cfgReadChar($str) {
$this->wrenchboard_load();
$ret = $this->mermsemr->cfgReadChar($str);
return $ret;
}
private function mermsemr_load() {
// $this->$USER = $_SERVER['SCRIPT_FILENAME'];
$mermsemr_class = 'mermsemr_api_' . $this->USER . '\\MermsEmr';
if (!is_object($this->mermsemr)) {
$this->mermsemr = new $mermsemr_class();
}
}
}
//<? if (!array_key_exists("mermsemr", $GLOBALS)) $mermsemr = new mermsemr_api_sameye\MermsEmr(); ?>