1234567891011121314151617181920212223242526272829303132 |
- <?php
- header("Expires: 0");
- session_start();
- $response = $_SESSION['login'];
- if (!$response) {
- return;
- }
- include 'auth.php';
- include 'functions.php';
- foreach (array_keys($_REQUEST) as $var) {
- ${$var} = $_REQUEST[$var];
- // echo "<b>$var:</b> ${$var} <br>";
- }
- if ($actname == 'select_project_type')
- {
- // echo "select_project_type";
- $retarr = array();
- $algos = algoList('project_type', $pt_id);
- //echo $pt_id;
- echo json_encode($algos);
- }
- function algoList($condition_target, $target_id)
- {
- global $link;
- $str = "select * from algo a join algo_conditions ac on a.condition_id = ac.c_id and ac.condition_target='$condition_target' join algo_actions aa on aa.a_id=a.action_id where a.condition_value_id = $target_id";
- $query = mysqli_query($link, $str);
- for ($data = []; $row = mysqli_fetch_object($query); $data[] = $row);
- return $data;
- }
|