Пример #1
0
 private static function get_mysqi()
 {
     if (static::$mysqli == null) {
         static::$mysqli = new mysqli('localhost', 'root', '', 'events');
         //DB connection error
         if (static::$mysqli->connect_errno) {
             echo_error(DB_CONNECTION_ERROR);
         }
     }
     return static::$mysqli;
 }
Пример #2
0
function isValid_deprecrated($p_cn, $p_grpt_id)
{
    $Res = $p_cn->exec_sql("select jr_valid from jrn where jr_grpt_id={$p_grpt_id}");
    if (($M = Database::num_row($Res)) == 0) {
        return 0;
    }
    $a = Database::fetch_array($Res, 0);
    if ($a['jr_valid'] == 't') {
        return 1;
    }
    if ($a['jr_valid'] == 'f') {
        return 0;
    }
    echo_error("Invalid result = " . $a['result']);
}
Пример #3
0
function save_to_database($res)
{
    $mysqli = new mysqli('localhost', 'root', '', 'events');
    //DB connection error
    if (static::$mysqli->connect_errno) {
        echo_error(DB_CONNECTION_ERROR);
        return;
    }
    foreach ($arr as $item) {
        $start_end_time = get_start_end_timestamp($item['date'], $item['time']);
        $loc = get_location($item['location']);
        $res = $mysqli->query("INSERT INTO events VALUES({$item['event_id']}, {$item['event_title']}, {$item['event_subtitle']}, {$start_end_time[0]}), {$start_end_time[1]}, {$loc}, {$item['page_url']}, {$item['img_url']}");
        //
    }
}
Пример #4
0
function parse_data($arr)
{
    if (array_key_exists("fid", $arr) && array_key_exists("uid", $arr)) {
        //uid关键字是否存在
        $user_mn = new UserManager();
        if ($user_mn->ModLogin($arr["uid"], $arr["fid"])) {
            $fds = $user_mn->GetUsersToLogout();
            //if (is_array($fds))
            //{
            ////foreach ($fds as $i)
            ////{
            ////echo $i->fid."\n";
            ////}
            //}
            echo_success($fds);
        } else {
            echo $name . " " . $value . "\n";
            echo_error(20003);
        }
    } else {
        echo_error(10002);
        //缺少主要关键字
    }
}
Пример #5
0
 /**
  * \brief Save a "piece justificative"
  *
  * \param $seq jr_grpt_id
  * \return $oid of the lob file if success
  *         null if a error occurs
  *
  */
 function save_upload_document($seq)
 {
     /* there is
        no file to
        upload */
     if ($_FILES["pj"]["error"] == UPLOAD_ERR_NO_FILE) {
         return;
     }
     $new_name = tempnam($_ENV['TMP'], 'pj');
     if ($_FILES["pj"]["error"] > 0) {
         print_r($_FILES);
         echo_error(__FILE__ . ":" . __LINE__ . "Error: " . $_FILES["pj"]["error"]);
     }
     if (strlen($_FILES['pj']['tmp_name']) != 0) {
         if (move_uploaded_file($_FILES['pj']['tmp_name'], $new_name)) {
             // echo "Image saved";
             $oid = pg_lo_import($this->db, $new_name);
             if ($oid == false) {
                 echo_error('postgres.php', __LINE__, "cannot upload document");
                 $this->rollback();
                 return;
             }
             // Remove old document
             $ret = $this->exec_sql("select jr_pj from jrn where jr_grpt_id={$seq}");
             if (pg_num_rows($ret) != 0) {
                 $r = pg_fetch_array($ret, 0);
                 $old_oid = $r['jr_pj'];
                 if (strlen($old_oid) != 0) {
                     pg_lo_unlink($cn, $old_oid);
                 }
             }
             // Load new document
             $this->exec_sql("update jrn set jr_pj=\$1 , jr_pj_name=\$2,\n                                        jr_pj_type=\$3  where jr_grpt_id=\$4", array($oid, $_FILES['pj']['name'], $_FILES['pj']['type'], $seq));
             return $oid;
         } else {
             echo "<H1>Error</H1>";
             $this->rollback();
         }
     }
     return 0;
 }
Пример #6
0
require_once NOALYSS_INCLUDE . '/class_database.php';
set_language();
$jr_grpt_id = $_GET['jr_grpt_id'];
$cn = new Database($gDossier);
require_once NOALYSS_INCLUDE . '/class_user.php';
global $g_user;
$g_user = new User($cn);
$g_user->Check();
$g_user->check_dossier($gDossier);
if (isNumber($jr_grpt_id) != 1) {
    die(_('Données invalides'));
}
// retrieve the jrn
$r = $cn->exec_sql("select jr_def_id from jrn where jr_grpt_id={$jr_grpt_id}");
if (Database::num_row($r) == 0) {
    echo_error("Invalid operation id jr_grpt_id={$jr_grpt_id}");
    exit;
}
$a = Database::fetch_array($r, 0);
$jrn = $a['jr_def_id'];
if ($g_user->check_jrn($jrn) == 'X') {
    /* Cannot Access */
    NoAccess();
    exit - 1;
}
$cn->start();
$ret = $cn->exec_sql("select jr_pj,jr_pj_name,jr_pj_type from jrn where jr_grpt_id={$jr_grpt_id}");
if (Database::num_row($ret) == 0) {
    return;
}
$row = Database::fetch_array($ret, 0);
Пример #7
0
/**
 * Compare the two schemas and echo the results.
 *
 * @param string $schema1 The first schema (serialized).
 * @param string $schema2 The second schema (serialized).
 * @return void
 */
function do_compare($schema1, $schema2)
{
    if (empty($schema1) || empty($schema2)) {
        echo_error('Both schemas must be given.');
        return;
    }
    $unserialized_schema1 = unserialize(strip_nl($schema1));
    $unserialized_schema2 = unserialize(strip_nl($schema2));
    $results = DbDiff::compare($unserialized_schema1, $unserialized_schema2);
    if (count($results) > 0) {
        echo '<h3>Found differences in ' . count($results) . ' table' . s(count($results)) . ':</h3>';
        echo '<ul id="differences">';
        foreach ($results as $table_name => $differences) {
            echo '<li><strong>' . $table_name . '</strong><ul>';
            foreach ($differences as $difference) {
                echo '<li>' . $difference . '</li>';
            }
            echo '</ul></li>';
        }
        echo '</ul>';
    } else {
        echo '<p>No differences found.</p>';
    }
}
Пример #8
0
 static function check()
 {
     if (!isset($_REQUEST['gDossier'])) {
         echo_error('Dossier inconnu ');
         exit('Dossier invalide ');
     }
     $id = $_REQUEST['gDossier'];
     if (is_numeric($id) == 0 || strlen($id) > 6 || $id > 999999) {
         exit('gDossier Invalide : ' . $id);
     }
 }
Пример #9
0
function sql_filter_per($p_cn, $p_from, $p_to, $p_form = 'p_id', $p_field = 'jr_tech_per')
{
    if ($p_form != 'p_id' && $p_form != 'date') {
        echo_error(__FILE__, __LINE__, 'Mauvais parametres ');
        exit(-1);
    }
    if ($p_form == 'p_id') {
        // retrieve the date
        $pPeriode = new Periode($p_cn);
        $a_start = $pPeriode->get_date_limit($p_from);
        $a_end = $pPeriode->get_date_limit($p_to);
        if ($a_start == null || $a_end == null) {
            throw new Exception(__FILE__ . __LINE__ . sprintf(_('Attention periode 
		     non trouvee periode p_from= %s p_to_periode = %s'), $p_from, $p_to));
        }
        $p_from = $a_start['p_start'];
        $p_to = $a_end['p_end'];
    }
    if ($p_from == $p_to) {
        $periode = " {$p_field} = (select p_id from parm_periode " . " where " . " p_start = to_date('{$p_from}','DD.MM.YYYY')) ";
    } else {
        $periode = "{$p_field} in (select p_id from parm_periode " . " where p_start >= to_date('{$p_from}','DD.MM.YYYY') and p_end <= to_date('{$p_to}','DD.MM.YYYY')) ";
    }
    return $periode;
}
Пример #10
0
    $iFrameUri = $response->info['redirect_url'];
    $requestRdf = true;
} elseif ($response->info['http_code'] == 200) {
    echo_ok("Recieved 200 OK HTTP code.");
    $iFrameUri = $uri;
} elseif ($response->info['http_code'] == 404) {
    echo_error("Got HTTP response code of 404 Not Found.");
    $iFrameUri = false;
} else {
    echo_error("Unexpected response code: '" . $response->info['http_code'] . "'. Expecting 303 Redirect or 200 OK.");
    $iFrameUri = false;
}
if ($iFrameUri) {
    echo "<iframe id=\"herbal-html-response\" src=\"{$iFrameUri}\"></iframe>";
} else {
    echo_error("Errors prevent retrieval of HTML.");
}
if (!$requestRdf) {
    echo_info("No 303 redirect so stopping here.");
    echo_info("Check out 'Importance of 303 Redirect' in the <a href=\"/md.php?q=documentation\">documentation</a>.");
} else {
    echo_info("Had 303 redirect when asking for HTML so will request RDF format.");
    ?>
<script type="text/javascript">
    $('#request-rdf-results').html('Loading ...');
    $('#request-rdf-results').show('slow');
    $('#request-rdf-results').load('tests/request_rdf.php', 'uri=' + '<?php 
    echo $uri;
    ?>
' );
</script>
Пример #11
0
 function update($p_array)
 {
     $this->load();
     // if name is empty return immediately
     if (trim(strlen($p_array['md_name'])) == 0) {
         return;
     }
     try {
         // Start transaction
         $this->cn->start();
         $sql = "update document_modele set md_name=\$1,md_type=\$2,md_affect=\$3 where md_id=\$4";
         $this->cn->exec_sql($sql, array($p_array['md_name'], $p_array['md_type'], $p_array['md_affect'], $this->md_id));
         if ($p_array['seq'] != 0) {
             $this->cn->alter_seq('seq_doc_type_' . $p_array['md_type'], $p_array['seq']);
         }
         // Save the file
         $new_name = tempnam($_ENV['TMP'], 'document_');
         if (strlen($_FILES['doc']['tmp_name']) != 0) {
             if (move_uploaded_file($_FILES['doc']['tmp_name'], $new_name)) {
                 // echo "Image saved";
                 $oid = $this->cn->lo_import($new_name);
                 if ($oid == false) {
                     echo_error('class_document_modele.php', __LINE__, "cannot upload document");
                     $this->cn->rollback();
                     return;
                 }
                 // Remove old document
                 $ret = $this->cn->exec_sql("select md_lob from document_modele where md_id=" . $this->md_id);
                 if (Database::num_row($ret) != 0) {
                     $r = Database::fetch_array($ret, 0);
                     $old_oid = $r['md_lob'];
                     if (strlen($old_oid) != 0) {
                         $this->cn->lo_unlink($old_oid);
                     }
                 }
                 // Load new document
                 $this->cn->exec_sql("update document_modele set md_lob=" . $oid . ", md_mimetype='" . $_FILES['doc']['type'] . "' ,md_filename='" . $_FILES['doc']['name'] . "' where md_id=" . $this->md_id);
                 $this->cn->commit();
             } else {
                 echo "<H1>Error</H1>";
                 $this->cn->rollback();
                 throw new Exception("Erreur" . __FILE__ . __LINE__);
             }
         }
     } catch (Exception $e) {
         rollback($this->cn);
         return;
     }
     $this->cn->commit();
 }
Пример #12
0
<?php

require_once 'common.php';
?>
<h2>Requesting RDF Format Data</h2>
<?php 
$uri = $_GET['uri'];
// get default curl handle
$curl = get_curl_handle($uri);
// set other things here
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Accept: application/rdf+xml"));
$response = run_curl_request($curl);
echo_info("Requesting RDF by passing 'Accept: application/rdf+xml' header.");
if ($response->info['http_code'] != 303) {
    echo_error("Unexpected response code: '" . $response->info['http_code'] . "'. Expecting 303 Redirect to RDF.");
} else {
    echo_ok("Recieved 303 Redirect HTTP code.");
    echo_ok("Redirect to URI: <a target=\"_new\" href=\"" . $response->info['redirect_url'] . "\">" . $response->info['redirect_url'] . "</a>");
    echo_info("Had 303 redirect so will request RDF data for parsing.");
    $rdfUri = $response->info['redirect_url'];
    ?>
<script type="text/javascript">
    $('#parse-rdf-results').html('Loading ...');
    $('#parse-rdf-results').show('slow');
    $('#parse-rdf-results').load('tests/parse_rdf.php', 'rdf_uri=' + '<?php 
    echo $rdfUri;
    ?>
' + '&specimen_uri=' + '<?php 
    echo $uri;
    ?>
' );
Пример #13
0
 function get_row($p_from, $p_to)
 {
     if ($this->id == 0) {
         echo_error("class_fiche", __LINE__, "id is 0");
         return;
     }
     $qcode = $this->strAttribut(ATTR_DEF_QUICKCODE);
     $periode = sql_filter_per($this->cn, $p_from, $p_to, 'p_id', 'jr_tech_per');
     $Res = $this->cn->exec_sql("select j_date,to_char(j_date,'DD.MM.YYYY') as j_date_fmt,j_qcode," . "case when j_debit='t' then j_montant else 0 end as deb_montant," . "case when j_debit='f' then j_montant else 0 end as cred_montant," . " jr_comment as description,jrn_def_name as jrn_name," . "j_debit, jr_internal,jr_id " . " from jrnx left join jrn_def on jrn_def_id=j_jrn_def " . " left join jrn on jr_grpt_id=j_grpt" . " where j_qcode='" . $qcode . "' and " . $periode . " order by j_date::date");
     return $this->get_row_result($Res);
 }
Пример #14
0
            } else {
                echo_error(PARAMETER_NOT_SET);
            }
            break;
        case 'get_events_at':
            if (isset($_GET['location'])) {
                $location = $_GET['location'];
                Controller::get_events_at($location);
            } else {
                echo_error(PARAMETER_NOT_SET);
            }
            break;
        case 'get_events_keyword_location':
            if (isset($_GET['keyword']) and isset($_GET['location'])) {
                $keyword = $_GET['keyword'];
                $location = $_GET['location'];
                Controller::get_events_keyword_location($keyword, $location);
            } else {
                echo_error(PARAMETER_NOT_SET);
            }
            break;
        case 'test':
            Controller::test();
            break;
        default:
            # code...
            echo_error(ACTION_NOT_EXIST);
    }
} else {
    echo_error(ACTION_ERROR);
}
Пример #15
0
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
/**
 * Script to let a user edit the properties of a particular RSS feed.
 *
 * @package   moodlecore
 * @copyright 2009 Tim Hunt
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */
require_once dirname(__FILE__) . '/../../config.php';
require_once $CFG->libdir . '/simplepie/moodle_simplepie.php';
require_login();
if (isguest()) {
    echo_error('guestsarenotallowed');
}
$returnurl = optional_param('returnurl', '', PARAM_LOCALURL);
$courseid = optional_param('courseid', 0, PARAM_INTEGER);
$rssid = required_param('rssid', PARAM_INTEGER);
if ($courseid = SITEID) {
    $courseid = 0;
}
if ($courseid) {
    $course = $DB->get_record('course', array('id' => $courseid), '*', MUST_EXIST);
    $PAGE->set_course($course);
    $context = $PAGE->context;
} else {
    $context = get_context_instance(CONTEXT_SYSTEM);
    $PAGE->set_context($context);
}
Пример #16
0
    $class = addslashes($_POST['class']);
    //检查必填项和数据是否正确
    if (empty($name)) {
        echo_error("请输入姓名!");
    }
    if (check_phone($phone)) {
        echo_error("手机号码错误!");
    }
    if (check_no($no)) {
        echo_error("学号格式错误!");
    }
    //往数据库添加数据
    $time = time();
    $sql = "INSERT INTO `student` (`no`, `name`, `phone`, `class`, `add_time`) VALUES ('{$no}', '{$name}', '{$phone}', '{$class}', '{$time}')";
    include_once "conn.php";
    $arr = mysqli_query($conn, $sql);
    //执行SQL语句
    if ($arr) {
        header("location:index.php");
        echo "数据添加成功!";
        exit;
    } else {
        echo $sql;
        echo "<br>";
        echo mysqli_error($conn);
        echo "<br>";
        echo_error("数据库添加失败,内部错误!请联系管理员");
    }
} else {
    include_once 'template/add.php';
}
Пример #17
0
function get_buildgroupid()
{
    if (!isset($_GET['buildgroupid'])) {
        echo_error("buildgroupid not specified.");
        return false;
    }
    $buildgroupid = pdo_real_escape_numeric($_GET['buildgroupid']);
    return $buildgroupid;
}
Пример #18
0
<?php

require_once "conn.php";
require_once "function.php";
//这里不能使用intval因为数字里面包含0
$no = addslashes($_GET['no']);
if (empty($no)) {
    echo_error("请求参数错误");
}
$sql = "SELECT *  FROM `student` WHERE `no` = '{$no}'";
//echo $sql;echo "<br>";
$arr = mysqli_query($conn, $sql);
$conent = mysqli_fetch_assoc($arr);
if (empty($conent)) {
    if ($_GET['html'] == 1) {
        echo_ret("未找到相关人员!", 'home');
    } else {
        echo json_encode(array('status' => 400, 'msg' => '未找到相关人员'));
        exit;
    }
} else {
    $sql = "DELETE FROM `student` WHERE (`no`='{$no}')";
    $arr = mysqli_query($conn, $sql);
    if (empty($arr)) {
        echo json_encode(array('status' => 501, 'msg' => '删除失败'));
        exit;
    } else {
        if ($_GET['html'] == 1) {
            echo_ret("数据添加成功!", 'home');
        } else {
            echo json_encode(array('status' => 200, 'msg' => '删除成功'));
Пример #19
0
function get_subprojectid()
{
    if (!isset($_GET['subprojectid'])) {
        echo_error('subprojectid not specified.');
        return false;
    }
    $subprojectid = pdo_real_escape_numeric($_GET['subprojectid']);
    return $subprojectid;
}
Пример #20
0
    // it is unlikely people would do it all with subdomains.
    if (isset($parts['path'])) {
        echo_ok("The path component is '" . $parts['path'] . "'");
    } else {
        echo_warning("The URI lacks a path component. Are you sure this is what you intended?");
    }
    // they shouldn't have a query string
    // this stops the use of db queries
    if (isset($parts['query'])) {
        echo_error("The URI contains the query string: '" . $parts['query'] . "'. This is not permitted.");
        $proceed = false;
    } else {
        echo_ok("The URI lacks a query string component which is a good thing.");
    }
    //var_dump($parts);
}
if ($proceed) {
    echo_ok("Format of URI appears OK. Continuing test.");
    ?>
<script type="text/javascript">
    $('#request-html-results').html('Loading ...');
    $('#request-html-results').show('slow');
    $('#request-html-results').load('tests/request_html.php', 'uri=' + '<?php 
    echo $uri;
    ?>
' );
</script>
<?php 
} else {
    echo_error("Errors prevent further checking of URI.");
}
Пример #21
0
    if (isset($_POST['g-recaptcha-response'])) {
        $captcha = $_POST['g-recaptcha-response'];
    }
    $response = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=6LdDLwYTAAAAAHgrMLhgTJRZcuf5X3QQ8QFDvmPC&response=" . $captcha . "&remoteip=" . $_SERVER['REMOTE_ADDR']);
    $res = json_decode($response);
    if ($res->success == false) {
        echo_error();
    } elseif ($res->success == true) {
        $to = "*****@*****.**";
        $name = $_POST['name'];
        $email = $_POST['email'];
        if (isset($_POST['title'])) {
            $subject = $name . ": " . $_POST['title'];
        } else {
            $subject = $name . ": Devin inquiry";
        }
        $message = $_POST['content'];
        $headers = "From:" . $email;
        if (mail($to, $subject, $message, $headers)) {
            header('Location: http://devinfowler.x10.bz');
        } else {
            echo_error();
        }
    }
} else {
    echo_error();
}
function echo_error()
{
    echo "\n\t\t\t<!DOCTYPE html>\n\t\t\t<html lang=\"en\">\n\t\t\t\t<head>\n\t\t\t\t\t<link href='//fonts.googleapis.com/css?family=Roboto:500,900,300,700,400,100' rel='stylesheet'>\n\t\t\t\t\t<title>Submitting failed...</title>\n\t\t\t\t\t<meta charset=\"UTF-8\">\n\t\t\t\t\t<meta name=\"description\" content=\"\">\n\t\t\t\t\t<meta name=\"keywords\" content=\"\">\n\t\t\t\t\t<meta name=\"author\" content=\"Cryptocosm Developers, Samuel Steele, Devin Fowler\">\n\t\t\t\t\t<link rel=\"icon\" href=\"/img/apple-touch-icon.png\">\n\t\t\t\t\t<link rel=\"apple-touch-icon\" href=\"/img/apple-touch-icon.png\">\n\t\t\t\t\t<link href=\"/css/styles.css\" rel=\"stylesheet\">\n\t\t\t\t\t<script src=\"//cdnjs.cloudflare.com/ajax/libs/three.js/r70/three.min.js\"></script>\n\t\t\t\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, user-scalable=no\">\n\t\t\t\t\t<style>\n\t\t\t\t\t\n\t\t\t\t\t\t#card {\n\t\t\t\t\t\t\twidth: 75%;\n\t\t\t\t\t\t\tbackground-color: #FAFAFA;\n\t\t\t\t\t\t\tbox-shadow: 0px 4px 12px #9E9E9E;\n\t\t\t\t\t\t\tborder-radius: 2px;\n\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\tpadding: 2%;\n\t\t\t\t\t\t\ttop: 35%;\n\t\t\t\t\t\t\tleft: 10.5%;\n\t\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\t\tmargin-bottom: 5%;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t#card img {\n\t\t\t\t\t\t\topacity: .88;\n\t\t\t\t\t\t\tborder-radius: 2px;\n\t\t\t\t\t\t\twidth: 50%;\n\t\t\t\t\t\t\theight: auto;\n\t\t\t\t\t\t}\n\t\t\t\t\t</style>\n\t\t\t\t\t\n\t\t\t\t\t<script>\n\t\t\t\t\t\tfunction goBack() {\n\t\t\t\t\t\t\twindow.history.back()\n\t\t\t\t\t\t}\n\t\t\t\t\t</script>\n\t\t\t\t\t\n\t\t\t\t</head>\n\t\t\t\t\n\t\t\t\t<body>\n\t\t\t\t\t<div class=\"banner\">\n\t\t\t\t\t\t<a id=\"title\" href=\"/index.html\">DEVIN FOWLER</a>\n\t\t\t\t\t\t<div id=\"canvas\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t<div id=\"card\">\n\t\t\t\t\t\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div>There was an error processing your message. Sorry.&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"\" onClick=\"goBack()\">Back</a></div>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t<div id=\"footercard\" style=\"margin-top:17%;\">\n\t\t\t\t\n\t\t\t\t\t\t\t<div id=\"ft-contact\" class=\"ft-el\">\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<p class=\"ft-heading\">CONTACT:</p>\n\t\t\t\t\t\t\t\t<p>&nbsp;<a href=\"mailto:fowlerd11@gmail.com?subject:Contact%20Cryptocosm\">E-Mail</a>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<p>&nbsp;<a href=\"http://twitter.com/DevinFowler11\">Twitter</a>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<p>&nbsp;<a href=\"https://www.linkedin.com/pub/devin-fowler/b8/292/49\">LinkedIn</a>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<div id=\"ft-line\" class=\"ft-el\"></div>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<div id=\"ft-sitemap\" class=\"ft-el\">\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<div id=\"ft-sitemap-left\">\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<p class=\"ft-heading\">SITEMAP:</p>\n\t\t\t\t\t\t\t\t\t<p>&nbsp;<a href=\"/\">Home</a>\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t<p>&nbsp;<a href=\"/about\">About</a>\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t<p>&nbsp;<a href=\"/projects\">Projects</a>\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<div id=\"ft-sitemap-right\">\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<p><a href=\"/resume\">Resume</a>\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t<p><a href=\"/contact\">Instant Message</a>\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<p id=\"copyright\">© 2015 <a href=\"http://cryptocosm.x10.bz\">Cryptocosm Developers</a> | All Rights Reserved</p>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<script src=\"/js/animation.js\" type=\"text/javascript\"></script>\n\t\t\t\t\t\t\n\t\t\t\t</body>\n\t\t</html>";
}
Пример #22
0
require_once NOALYSS_INCLUDE . '/ac_common.php';
require_once NOALYSS_INCLUDE . '/class_dossier.php';
$gDossier = dossier::id();
$cn = new Database($gDossier);
require_once NOALYSS_INCLUDE . '/class_user.php';
global $g_user;
$g_user = new User($cn);
$g_user->Check();
set_language();
if ($g_user->check_module("CFGDOC") == 0) {
    exit;
}
// retrieve the document
$r = $cn->exec_sql("select md_id,md_lob,md_filename,md_mimetype\n                 from document_modele where md_id=\$1", array($_REQUEST['md_id']));
if (Database::num_row($r) == 0) {
    echo_error("Invalid Document");
    exit;
}
$row = Database::fetch_array($r, 0);
$cn->start();
$tmp = tempnam($_ENV['TMP'], 'document_');
$cn->lo_export($row['md_lob'], $tmp);
ini_set('zlib.output_compression', 'Off');
header("Pragma: public");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: must-revalidate");
header('Content-type: ' . $row['md_mimetype']);
header('Content-Disposition: attachment;filename="' . $row['md_filename'] . '"', FALSE);
header("Accept-Ranges: bytes");
$file = fopen($tmp, 'r');