예제 #1
0
function houseInfo($name, $phone, $cardNumber)
{
    connectSql('', '', '', '');
    $sql = "select * from tb_membernew,tb_csthouseinfo where tb_numbernew.id = tb_csthouseinfo.fk_member ={$id}";
    if (checkVip($name, $phone, $cardNumber) == true) {
        $query = mssql_query($sql);
        return $query;
    }
}
예제 #2
0
function setDefaultConfig()
{
    global $con;
    if (!$con) {
        if (!connectSql()) {
            return false;
        }
    }
    $sql = "select * from wx_config where 1";
    if (mysql_num_rows(mysql_query($sql)) < 1) {
        $sql = "INSERT INTO `wx_config`(`appid`, `appsecrect`, `default_template`, `first_msg`, `url`, `ex_msg`, `access_token`, `createtime`) VALUES ('" . APPID . "','" . APPSECRECT . "','" . DEFAULT_TPL . "','" . FIRST_MSG . "','" . URL . "','" . EX_MSG . "','" . ACCESS_TOKEN . "',10000)";
        if (!mysql_query($sql)) {
            return false;
        }
    }
    return true;
}
예제 #3
0
$tmpquery = "WHERE org.id = '{$organization}'";
$detailOrganization = new request();
$detailOrganization->openOrganizations($tmpquery);
$comptDetailOrganization = count($detailOrganization->org_id);
if ($action == "delete") {
    $id = str_replace("**", ",", $id);
    $tmpquery1 = "DELETE FROM " . $tableCollab["members"] . " WHERE id IN({$id})";
    $tmpquery2 = "UPDATE " . $tableCollab["tasks"] . " SET assigned_to='{$at}' WHERE assigned_to IN({$id})";
    $tmpquery3 = "UPDATE " . $tableCollab["assignments"] . " SET assigned_to='{$at}',assigned='{$dateheure}' WHERE assigned_to IN({$id})";
    $tmpquery4 = "DELETE FROM " . $tableCollab["notifications"] . " WHERE member IN({$id})";
    $tmpquery5 = "DELETE FROM " . $tableCollab["teams"] . " WHERE member IN({$id})";
    connectSql("{$tmpquery1}");
    connectSql("{$tmpquery2}");
    connectSql("{$tmpquery3}");
    connectSql("{$tmpquery4}");
    connectSql("{$tmpquery5}");
    //if mantis bug tracker enabled
    if ($enableMantis == "true") {
        // Call mantis function to remove user
        include "../mantis/user_delete.php";
    }
    headerFunction("../clients/viewclient.php?id={$organization}&msg=delete&" . session_name() . "=" . session_id());
    exit;
}
include '../themes/' . THEME . '/header.php';
$blockPage = new block();
$blockPage->openBreadcrumbs();
$blockPage->itemBreadcrumbs($blockPage->buildLink("../clients/listclients.php?", $strings["clients"], in));
$blockPage->itemBreadcrumbs($blockPage->buildLink("../clients/viewclient.php?id=" . $detailOrganization->org_id[0], $detailOrganization->org_name[0], in));
$blockPage->itemBreadcrumbs($strings["delete_users"]);
$blockPage->closeBreadcrumbs();
예제 #4
0
        connectSql($tmpquery6);
    }
    if ($topics != '') {
        $tmpquery7 = 'DELETE FROM ' . $tableCollab['posts'] . ' WHERE topic IN(' . $topics . ')';
        connectSql($tmpquery7);
    }
    $tmpquery8 = 'DELETE FROM ' . $tableCollab['notes'] . ' WHERE project IN(' . $id . ')';
    connectSql($tmpquery8);
    $tmpquery9 = 'DELETE FROM ' . $tableCollab['support_requests'] . ' WHERE project IN(' . $id . ')';
    connectSql($tmpquery9);
    $tmpquery10 = 'DELETE FROM ' . $tableCollab['support_posts'] . ' WHERE project IN(' . $id . ')';
    connectSql($tmpquery10);
    $tmpquery11 = 'DELETE FROM ' . $tableCollab['phases'] . ' WHERE project_id IN(' . $id . ')';
    connectSql($tmpquery11);
    $tmpquery12 = 'DELETE FROM ' . $tableCollab['tasks_time'] . ' WHERE project IN(' . $id . ')';
    connectSql($tmpquery12);
    // if mantis bug tracker enabled
    if ($enableMantis == 'true') {
        // call mantis function to delete project
        require_once '../mantis/proj_delete.php';
    }
    header('Location: ../projects/listprojects.php?msg=delete');
    exit;
}
//--- header ----
$breadcrumbs[] = buildLink('../projects/listprojects.php?', $strings['projects'], LINK_INSIDE);
$breadcrumbs[] = $strings['delete_projects'];
$pageSection = 'projects';
require_once '../themes/' . THEME . '/header.php';
//--- content ---
$block1 = new block();
예제 #5
0
<?php

include "core.php";
$input = file_get_contents("php://input");
$data = json_decode($input, true);
if ($_SERVER["REQUEST_METHOD"] == "GET") {
    //if (strlen($_GET["course_id"]) <= 4) {
    $id = mysqli_real_escape_string(connectSql(), $_GET["id"]);
    echo json_encode(db_select("TutorCoursesRelation", "email", $id));
    //}
} else {
    if ($_SERVER["REQUEST_METHOD"] == "POST") {
        db_insert("Request", $data);
    } else {
        if ($_SERVER["REQUEST_METHOD"] == "PUT") {
            db_update("Request", $data, "to_email");
        }
    }
}
예제 #6
0
function taskComputeCompletion($taskid, $tableTask)
{
    $tmpquery = "WHERE subtas.tasks = '{$taskid}'";
    $subtaskList = new request();
    $subtaskList->openAvgTasks($taskid);
    $avg = $subtaskList->tas_avg[0];
    settype($avg, "integer");
    $tmpquery6 = "UPDATE " . $tableTask . " set completion = {$avg} where id='{$taskid}'";
    connectSql($tmpquery6);
}
예제 #7
0
    // make sure we have the required information
    if (!empty($hr)) {
        if (!is_numeric($hr)) {
            // we need this to be numeric
            $msgLabel = '<b>' . $strings['attention'] . '</b> : ' . $strings['worked_hours'] . ' ' . $strings['error_numerical'];
        }
    } else {
        // we need this to be numeric
        $msgLabel = '<b>' . $strings['attention'] . '</b> : ' . $strings['worked_hours'] . ' ' . $strings['error_required'];
    }
    // insert task time in database
    if (empty($msgLabel)) {
        $comm = addSlashes($comm);
        // resolves bug #768688
        $tmpquery1 = 'INSERT INTO ' . $tableCollab['tasks_time'] . " (project,task,owner,date,hours,comments,created,modified) VALUES ('" . $projectDetail->pro_id[0] . "', '{$id}','{$owner}','{$ld}','{$hr}','{$comm}',NOW(),NOW())";
        connectSql($tmpquery1);
        $ld = null;
        $hr = null;
        $comm = null;
        // successful insert
        $msgLabel = '<b>' . $strings['success'] . '</b> : ' . $strings['hours_updated'];
    }
    $msg = $msgLabel;
}
//--- header ---
$breadcrumbs[] = buildLink("../projects/listprojects.php?", $strings["projects"], LINK_INSIDE);
$breadcrumbs[] = buildLink("../projects/viewproject.php?id=" . $projectDetail->pro_id[0], $projectDetail->pro_name[0], LINK_INSIDE);
$breadcrumbs[] = buildLink("../tasks/listtasks.php?project=" . $projectDetail->pro_id[0], $strings["tasks"], LINK_INSIDE);
$breadcrumbs[] = buildLink("../tasks/viewtask.php?id=" . $taskDetail->tas_id[0], $taskDetail->tas_name[0], LINK_INSIDE);
$breadcrumbs[] = $strings["add_task_time"];
require_once "../themes/" . THEME . "/header.php";
예제 #8
0
            if ($pw != $pwa || $pw == "") {
                $error = $strings["new_password_error"];
            } else {
                // replace quotes by html code in name and address
                $fn = convertData($fn);
                $tit = convertData($tit);
                $c = convertData($c);
                $pw = get_password($pw);
                $tmpquery1 = "INSERT INTO " . $tableCollab["members"] . "(organization,login,name,title,email_work,phone_work,phone_home,mobile,fax,comments,password,profil,created,timezone) VALUES('{$clod}','{$un}','{$fn}','{$tit}','{$em}','{$wp}','{$hp}','{$mp}','{$fax}','{$c}','{$pw}','3','{$dateheure}','0')";
                connectSql("{$tmpquery1}");
                $tmpquery = $tableCollab["members"];
                last_id($tmpquery);
                $num = $lastId[0];
                unset($lastId);
                $tmpquery3 = "INSERT INTO " . $tableCollab["notifications"] . "(member,taskAssignment,removeProjectTeam,addProjectTeam,newTopic,newPost,statusTaskChange,priorityTaskChange,duedateTaskChange,clientAddTask) VALUES ('{$num}','0','0','0','0','0','0','0','0','0')";
                connectSql("{$tmpquery3}");
                // if mantis bug tracker enabled
                if ($enableMantis == "true") {
                    // Call mantis function for new user creation!!!
                    $f_access_level = $client_user_level;
                    // Reporter
                    require_once "../mantis/create_new_user.php";
                }
                header("Location: ../clients/viewclient.php?id={$clod}&msg=add");
                exit;
            }
        }
    }
}
//--- header ---
$breadcrumbs[] = buildLink("../clients/listclients.php?", $strings["clients"], LINK_INSIDE);
예제 #9
0
            $tmpquery = "WHERE tea.member = '{$pieces[$j]}'";
            $listTeams = new request();
            $listTeams->openTeams($tmpquery);
            $comptListTeams = count($listTeams->tea_id);
            for ($i = 0; $i < $comptListTeams; $i++) {
                cvs_delete_user($listTeams->tea_mem_login[$i], $listTeams->tea_pro_id[$i]);
            }
        }
    }
    connectSql("{$tmpquery1}");
    connectSql("{$tmpquery2}");
    connectSql("{$tmpquery3}");
    connectSql("{$tmpquery4}");
    connectSql("{$tmpquery5}");
    connectSql("{$tmpquery6}");
    connectSql("{$tmpquery7}");
    // if mantis bug tracker enabled
    if ($enableMantis == "true") {
        // Call mantis function to remove user
        require_once "../mantis/user_delete.php";
    }
    header("Location: ../users/listusers.php?msg=delete");
    exit;
}
//--- header -----
$breadcrumbs[] = buildLink("../administration/admin.php?", $strings["administration"], LINK_INSIDE);
$breadcrumbs[] = buildLink("../users/listusers.php?", $strings["user_management"], LINK_INSIDE);
$breadcrumbs[] = $strings["delete_users"];
require_once "../themes/" . THEME . "/header.php";
//--- content -----
$block1 = new block();
예제 #10
0
    $tmpquery2 = "DELETE FROM " . $tableCollab["attendants"] . " WHERE meeting IN({$id})";
    $tmpquery3 = "DELETE FROM " . $tableCollab["meetings_attachment"] . " WHERE meeting IN({$id})";
    $tmpquery4 = "DELETE FROM " . $tableCollab["meetings_time"] . " WHERE meeting IN({$id})";
    $tmpquery = "WHERE mee.id IN({$id})";
    $listMeetings = new request();
    $listMeetings->openMeetings($tmpquery);
    $comptListMeetings = count($listMeetings->mee_id);
    for ($i = 0; $i < $comptListMeetings; $i++) {
        if ($fileManagement == "true") {
            delDir("../files/" . $listMeetings->mee_project[$i] . "/meetings/" . $listMeetings->mee_id[$i]);
        }
    }
    connectSql("{$tmpquery1}");
    connectSql("{$tmpquery2}");
    connectSql("{$tmpquery3}");
    connectSql("{$tmpquery4}");
    if ($project != "") {
        header("Location: ../projects/viewproject.php?id={$project}&msg=delete");
        exit;
    } else {
        header("Location: ../general/home.php?msg=delete");
        exit;
    }
}
$tmpquery = "WHERE pro.id = '{$project}'";
$projectDetail = new request();
$projectDetail->openProjects($tmpquery);
// ---- header -----------------
if ($project != "") {
    $breadcrumbs[] = buildLink("../projects/listprojects.php?", $strings["projects"], LINK_INSIDE);
    $breadcrumbs[] = buildLink("../projects/viewproject.php?id=" . $projectDetail->pro_id[0], $projectDetail->pro_name[0], LINK_INSIDE);
예제 #11
0
    $listSubtasks->openSubtasks($tmpquery);
    $tmpquery1 = "DELETE FROM " . $tableCollab["subtasks"] . " WHERE id IN({$id})";
    $tmpquery2 = "DELETE FROM " . $tableCollab["assignments"] . " WHERE subtask IN({$id})";
    /*
    $tmpquery = "WHERE tas.id IN($id)";
    $listTasks = new request();
    $listTasks->openTasks($tmpquery);
    $comptListTasks = count($listTasks->tas_id);
    	for ($i=0;$i<$comptListTasks;$i++) {
    		if ($fileManagement == "true") {
    			delDir("../files/".$listTasks->tas_project[$i]."/".$listTasks->tas_id[$i]);
    		}
    	}
    */
    connectSql($tmpquery1);
    connectSql($tmpquery2);
    //recompute average completion of the task
    taskComputeCompletion($listSubtasks->subtas_task[0], $tableCollab["tasks"]);
    if ($task != "") {
        headerFunction("../tasks/viewtask.php?id={$task}&msg=delete&" . session_name() . "=" . session_id());
        exit;
    } else {
        headerFunction("../general/home.php?msg=delete&" . session_name() . "=" . session_id());
        exit;
    }
}
$tmpquery = "WHERE tas.id = '{$task}'";
$taskDetail = new request();
$taskDetail->openTasks($tmpquery);
$project = $taskDetail->tas_project[0];
$tmpquery = "WHERE pro.id = '{$project}'";
예제 #12
0
             $comptATSEL = count($S_ATSEL);
             for ($i = 0; $i < $comptATSEL; $i++) {
                 $mem_id1 = $S_ATSEL[$i];
                 $tmpquery3 = "INSERT INTO " . $tableCollab["attendants"] . "(project,meeting,member,published,authorized) VALUES('{$project}','{$num}','{$mem_id1}','{$pub}',1)";
                 connectSql("{$tmpquery3}");
                 if ($att_mem_id_list != "") {
                     $att_mem_id_list .= ", ";
                 }
                 $att_mem_id_list .= $mem_id1;
                 $mr = $mem_id1;
             }
         }
     }
     if ($mr != "0") {
         $tmpquery4 = "UPDATE " . $tableCollab["meetings"] . " SET recorder='{$mr}' WHERE id = '{$num}'";
         connectSql($tmpquery4);
     }
     if ($att_mem_id_list != "") {
         // send meeting assignment mail if notifications = true
         if ($notifications == "true") {
             require_once "../meetings/noti_meetingassignment.php";
         }
     }
     // create meeting sub-folder if filemanagement = true
     if ($fileManagement == "true") {
         createDir("files/{$project}/meetings");
         createDir("files/{$project}/meetings/{$num}");
     }
     header("Location: ../meetings/viewmeeting.php?id={$num}&msg=addMeeting");
     exit;
 }
예제 #13
0
    if (ctype_digit($_GET["id"])) {
        echo json_encode(db_select("StudentTutor", "google_id", $_GET["id"]));
    } else {
        echo "ERROR!!! You have included something strange with your request.";
    }
} else {
    if ($_SERVER["REQUEST_METHOD"] == "POST") {
        if (db_select("StudentTutor", "google_id", $data["google_id"]) == NULL) {
            db_insert("StudentTutor", $data);
        }
    } else {
        if ($_SERVER["REQUEST_METHOD"] == "PUT") {
            //db_update("StudentTutor", $data, "google_id");
            if ($data["accept"] == true) {
                //db_update("Request", $data, "id");
                //queryrun("UPDATE Request SET accept=1 WHERE to_email='".$data["to_email"]."' AND from_email='".$data["from_email"]."' AND subject='".$data["subject"]."';", connectSql());
                queryrun("UPDATE Request SET accept=1 WHERE id='" . $data["id"] . "';", connectSql());
            } else {
                if ($data["accept"] == false) {
                    //db_update("Request", $data, "id");
                    //queryrun("UPDATE Request SET accept=0 WHERE to_email='".$data["to_email"]."' AND from_email='".$data["from_email"]."' AND subject='".$data["subject"]."';", connectSql());
                    queryrun("UPDATE Request SET accept=0 WHERE id='" . $data["id"] . "';", connectSql());
                } else {
                    //db_update("Request", $data, "id");
                    //queryrun("UPDATE Request SET accept=null WHERE to_email='".$data["to_email"]."' AND from_email='".$data["from_email"]."' AND subject='".$data["subject"]."';", connectSql());
                    queryrun("UPDATE Request SET accept=NULL WHERE id='" . $data["id"] . "';", connectSql());
                }
            }
        }
    }
}
예제 #14
0
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Background</title>
</head>
<body>
<?php 
include "sql.php";
include "class.php";
connectSql();
$seats = array();
$seats[0] = new bangku("A1", "Jonathan", "Taken", "4-Maret-2012", "lalalala");
echo $seats[0]->getNama();
$seats[0]->setNama("Hosea");
echo $seats[0]->getNama();
?>
</body>
</html>
예제 #15
0
    $logoDel = $_POST['logoDel'];
    if ($logoDel == 'on') {
        $tmpquery = 'UPDATE ' . $tableCollab['organizations'] . " SET extension_logo='' WHERE id='1'";
        connectSql($tmpquery);
        @unlink("../logos_clients/1.{$extensionOld}");
    }
    $extension = strtolower(substr(strrchr($_FILES['upload']['name'], '.'), 1));
    if (@move_uploaded_file($_FILES['upload']['tmp_name'], "../logos_clients/1.{$extension}")) {
        $tmpquery = 'UPDATE ' . $tableCollab['organizations'] . " SET extension_logo='{$extension}' WHERE id='1'";
        connectSql($tmpquery);
    }
    $cn = convertData($cn);
    $add = convertData($add);
    $c = convertData($c);
    $tmpquery = 'UPDATE ' . $tableCollab['organizations'] . " SET name='{$cn}',address1='{$add}',phone='{$wp}',url='{$url}',email='{$email}',comments='{$c}' WHERE id = '1'";
    connectSql($tmpquery);
    header('Location: ../administration/mycompany.php');
}
$tmpquery = "WHERE org.id='1'";
$clientDetail = new request();
$clientDetail->openOrganizations($tmpquery);
$cn = $clientDetail->org_name[0];
$add = $clientDetail->org_address1[0];
$wp = $clientDetail->org_phone[0];
$url = $clientDetail->org_url[0];
$email = $clientDetail->org_email[0];
$c = $clientDetail->org_comments[0];
//--- header ---------
$breadcrumbs[] = buildLink('../administration/admin.php?', $strings['administration'], LINK_INSIDE);
$breadcrumbs[] = $strings['company_details'];
$bodyCommand = 'onLoad="document.adminDForm.cn.focus();"';
예제 #16
0
#Application name: PhpCollab
#Status page: 0
$checkSession = "true";
include "../includes/library.php";
$tmpquery = "WHERE topic.id = '{$id}'";
$detailTopic = new request();
$detailTopic->openTopics($tmpquery);
if ($detailTopic->top_published[0] == "1" || $detailTopic->top_project[0] != $projectSession) {
    headerFunction("index.php");
}
if ($action == "delete") {
    $detailTopic->top_posts[0] = $detailTopic->top_posts[0] - 1;
    $tmpquery = "DELETE FROM " . $tableCollab["posts"] . " WHERE id = '{$post}'";
    connectSql("{$tmpquery}");
    $tmpquery2 = "UPDATE " . $tableCollab["topics"] . " SET posts='" . $detailTopic->top_posts[0] . "' WHERE id = '{$id}'";
    connectSql("{$tmpquery2}");
    headerFunction("showallthreads.php?id={$id}&" . session_name() . "=" . session_id());
    exit;
}
$bouton[5] = "over";
$titlePage = $strings["bulletin_board_topic"];
include "include_header.php";
$tmpquery = "WHERE pos.topic = '" . $detailTopic->top_id[0] . "' ORDER BY pos.created DESC";
$listPosts = new request();
$listPosts->openPosts($tmpquery);
$comptListPosts = count($listPosts->pos_id);
$idStatus = $detailTopic->top_status[0];
echo "<table cellspacing='0' width='90%' cellpadding='3'>\n<tr><th colspan='4'>" . $strings["information"] . ":</th></tr>\n<tr><th>" . $strings["subject"] . ":</th><td>" . $detailTopic->top_subject[0] . "</td><th>" . $strings["posts"] . ":</th><td>" . $detailTopic->top_posts[0] . "</td></tr>\n<tr><th>" . $strings["project"] . ":</th><td>" . $projectDetail->pro_name[0] . "</td><th>" . $strings["last_post"] . ":</th><td>" . createDate($detailTopic->top_last_post[0], $timezoneSession) . "</td></tr>\n<tr><th>&nbsp;</th><td>&nbsp;</td><th>" . $strings["retired"] . ":</th><td>{$statusTopicBis[$idStatus]}</td></tr>\n<tr><th>" . $strings["owner"] . ":</th><td colspan='3'><a href='mailto:" . $detailTopic->top_mem_email_work[0] . "'>" . $detailTopic->top_mem_login[0] . "</a></td></tr>\n<tr><td colspan='4'>&nbsp;</td></tr>\n<tr><th colspan='4'>" . $strings["discussion"] . ":</th></tr>";
if ($detailTopic->top_status[0] == "1") {
    echo "<tr><td colspan='4' align='right'><a href='threadpost.php?id={$id}&" . session_name() . "=" . session_id() . "'>" . $strings["post_reply"] . "</a></td></tr>";
}
예제 #17
0
파일: core.php 프로젝트: jorwsmit/BlueJays
function db_delete($table, $idcol, $idval)
{
    $q = "DELETE FROM " . $table . " WHERE " . $idcol . "='" . $idval . "'";
    queryrun($q, connectSql());
}
예제 #18
0
<?php

include "core.php";
$input = file_get_contents("php://input");
$data = json_decode($input, true);
if ($_SERVER["REQUEST_METHOD"] == "GET") {
    //if (strlen($_GET["course_id"]) <= 4) {
    $course_id = mysqli_real_escape_string(connectSql(), $_GET["course_id"]);
    echo json_encode(db_select("TutorCourses", $course_id, "1"));
    //}
} else {
    if ($_SERVER["REQUEST_METHOD"] == "POST") {
        db_insert("Request", $data);
    } else {
        if ($_SERVER["REQUEST_METHOD"] == "PUT") {
            db_update("Request", $data, "to_email");
        }
    }
}
예제 #19
0
     if ($at != '0') {
         $tmpquery6 = 'UPDATE ' . $tableCollab['tasks'] . " SET assigned='{$dateheure}' WHERE id = '{$num}'";
         connectSql($tmpquery6);
     }
     $tmpquery2 = 'INSERT INTO ' . $tableCollab['assignments'] . "(task,owner,assigned_to,assigned) VALUES('{$num}','" . $_SESSION['idSession'] . "','{$at}','{$dateheure}')";
     connectSql($tmpquery2);
     // if assigned_to not blank, add to team members (only if doesn't already exist)
     // add assigned_to in team members (only if doesn't already exist)
     if ($at != '0') {
         $tmpquery = "WHERE tea.project = '{$project}' AND tea.member = '{$at}'";
         $testinTeam = new request();
         $testinTeam->openTeams($tmpquery);
         $comptTestinTeam = count($testinTeam->tea_id);
         if ($comptTestinTeam == "0") {
             $tmpquery3 = "INSERT INTO " . $tableCollab["teams"] . "(project,member,published,authorized) VALUES('{$project}','{$at}','1','0')";
             connectSql($tmpquery3);
         }
         // send task assignment mail if notifications = true
         if ($notifications == "true") {
             require_once "../tasks/noti_taskassignment.php";
         }
     }
     // create task sub-folder if filemanagement = true
     if ($fileManagement == "true") {
         createDir("files/{$project}/{$num}");
     }
     header("Location: ../tasks/viewtask.php?id={$num}&msg=addAssignment");
     exit;
 }
 // set default values
 $taskDetail->tas_assigned_to[0] = $_SESSION['idSession'];
예제 #20
0
<?php

#Application name: PhpCollab
#Status page: 0
#Path by root: ../tasks/assignmentcomment.php
$checkSession = "true";
include_once '../includes/library.php';
if ($action == "update") {
    $acomm = convertData($acomm);
    $tmpquery6 = "UPDATE " . $tableCollab["assignments"] . " SET comments='{$acomm}' WHERE id = '{$id}'";
    connectSql("{$tmpquery6}");
    headerFunction("../tasks/viewtask.php?id={$task}&msg=update&" . session_name() . "=" . session_id());
    exit;
}
$bodyCommand = "onLoad=\"document.assignment_commentForm.acomm.focus();\"";
include '../themes/' . THEME . '/header.php';
$tmpquery = "WHERE tas.id = '{$task}'";
$taskDetail = new request();
$taskDetail->openTasks($tmpquery);
$tmpquery = "WHERE pro.id = '" . $taskDetail->tas_project[0] . "'";
$projectDetail = new request();
$projectDetail->openProjects($tmpquery);
$blockPage = new block();
$blockPage->openBreadcrumbs();
$blockPage->itemBreadcrumbs($blockPage->buildLink("../projects/listprojects.php?", $strings["projects"], in));
$blockPage->itemBreadcrumbs($blockPage->buildLink("../projects/viewproject.php?id=" . $projectDetail->pro_id[0], $projectDetail->pro_name[0], in));
$blockPage->itemBreadcrumbs($blockPage->buildLink("../tasks/listtasks.php?project=" . $projectDetail->pro_id[0], $strings["tasks"], in));
$blockPage->itemBreadcrumbs($blockPage->buildLink("../tasks/viewtask.php?id=" . $taskDetail->tas_id[0], $taskDetail->tas_name[0], in));
$blockPage->itemBreadcrumbs($strings["assignment_comment"]);
$blockPage->closeBreadcrumbs();
$block1 = new block();
예제 #21
0
    } else {
        if ($_SERVER["REQUEST_METHOD"] == "PUT") {
            //db_update("StudentCoursesRelation", $data, "email");
            //queryrun($q, connectSql());
            //"UPDATE SCR SET is_active=0 WHERE email='' AND course_id=''"
            /*
            function db_update($table, $values, $idcol) {
            		date_default_timezone_set('America/New York');
            
            		$q = "UPDATE " . $table . " SET ";
            		foreach ($values as $key => $val) {
            			if ($key != $idcol) {
            				$d = DateTime::createFromFormat('m/d/Y', $val);
            				if ($d != false) {
            					$val = $d->format('Y-m-d');
            				}
            				$q .= $key . "='" . htmlspecialchars($val, ENT_QUOTES) . "',";
            			}
            		}
            		$q = rtrim($q, ",");
            		$q .= " WHERE " . $idcol . "='" . $values[$idcol] . "'";
            
            		queryrun($q, connectSql());
            	}
            */
            //queryrun("UPDATE StudentCoursesRelation SET is_active='".htmlspecialchars(false, ENT_QUOTES)."' WHERE email='".$data["email"]."' AND course_id='"+$data["course_id"]."'", connectSql());
            //queryrun("UPDATE StudentCoursesRelation SET is_active='".false."' WHERE email='".$data["email"]."' AND course_id='"+$data["course_id"]."'", connectSql());
            queryrun("UPDATE StudentCoursesRelation SET is_active=0 WHERE email='" . $data["email"] . "' AND course_id='" . $data["course_id"] . "';", connectSql());
        }
    }
}
예제 #22
0
    $tmpquery = "WHERE fil.id IN({$id}) OR fil.vc_parent IN({$id}) ORDER BY fil.name";
    $listFiles = new request();
    $listFiles->openFiles($tmpquery);
    $comptListFiles = count($listFiles->fil_id);
    for ($i = 0; $i < $comptListFiles; $i++) {
        if ($task != "0") {
            if (file_exists("../files/" . $project . "/" . $task . "/" . $listFiles->fil_name[$i])) {
                deleteFile("files/" . $project . "/" . $task . "/" . $listFiles->fil_name[$i]);
            }
        } else {
            if (file_exists("../files/" . $project . "/" . $listFiles->fil_name[$i])) {
                deleteFile("files/" . $project . "/" . $listFiles->fil_name[$i]);
            }
        }
    }
    connectSql("{$tmpquery1}");
    if ($sendto == "filedetails") {
        headerFunction("../linkedcontent/viewfile.php?id=" . $listFiles->fil_vc_parent[0] . "&msg=deleteFile&" . session_name() . "=" . session_id());
    } else {
        if ($task != "0") {
            headerFunction("../tasks/viewtask.php?id={$task}&msg=deleteFile&" . session_name() . "=" . session_id());
            exit;
        } else {
            headerFunction("../projects/viewproject.php?id={$project}&msg=deleteFile&" . session_name() . "=" . session_id());
            exit;
        }
    }
}
$tmpquery = "WHERE pro.id = '{$project}'";
$projectDetail = new request();
$projectDetail->openProjects($tmpquery);
예제 #23
0
<?php

include "core.php";
$input = file_get_contents("php://input");
$data = json_decode($input, true);
if ($_SERVER["REQUEST_METHOD"] == "GET") {
    $to_email = mysqli_real_escape_string(connectSql(), $_GET["to_email"]);
    echo json_encode(db_select("Request", "to_email", $to_email));
} else {
    if ($_SERVER["REQUEST_METHOD"] == "POST") {
        db_insert("Request", $data);
    } else {
        if ($_SERVER["REQUEST_METHOD"] == "PUT") {
            db_update("Request", $data, "to_email");
        }
    }
}