<div class="text"><input type='submit' name='submit' id='submit' value='<?php echo T_("Add respondent"); ?> '/></div> </form> <div><a href="?"><?php echo T_("Go back"); ?> </a></div> <?php } else { print "<div class='text'>" . T_("Case id:") . " {$case_id}</div>"; print "<div class='text'>" . T_("Respondent:"); if (isset($_GET['respondent_id']) && $_GET['respondent_id'] != 0) { $respondent_id = bigintval($_GET['respondent_id']); $sql = "UPDATE `call_attempt` \r\n\t\t\tSET respondent_id = '{$respondent_id}'\r\n\t\t\tWHERE call_attempt_id = '{$call_attempt_id}'"; $db->Execute($sql); } /* List respondents * */ $sql = "SELECT r.firstName, r.lastName, r.respondent_id,r.Time_zone_name,CASE WHEN c.respondent_id = r.respondent_id THEN 'selected=\\'selected\\'' ELSE '' END AS selected\r\n\t\tFROM respondent AS r\r\n\t\tLEFT JOIN call_attempt AS c ON ( c.call_attempt_id = '{$call_attempt_id}' )\r\n\t\tWHERE r.case_id = '{$case_id}'"; $rs = $db->GetAll($sql); $timezone = ""; if (ALLOW_RESPONDENT_SELECTOR) { print "<select id='respondent' name='respondent' onchange=\"LinkUp('respondent')\"><option value='?respondent_id=0' class='addresp'>" . T_("Add respondent") . "</option>"; if (!empty($rs)) { foreach ($rs as $r) { if (!empty($r['selected'])) { $timezone = $r['Time_zone_name'];
} } else { $pw_meldung = _('Bitte gib mindestens 6 Zeichen für das Passwort ein!'); } } } if (isset($_POST['urlaub_ende']) && $cookie_id != CONFIG_DEMO_USER) { if ($cookie_team != '__' . $cookie_id) { if (!isset($_SESSION['urlaub_min'])) { $_SESSION['urlaub_min'] = 0; } if (!isset($_SESSION['urlaub_max'])) { $_SESSION['urlaub_max'] = 0; } $ul_meldung = _('Du kannst leider keinen Urlaub beantragen, der so lange dauert.'); $urlaub_ende = bigintval($_POST['urlaub_ende']); $temp = ceil(($urlaub_ende - time()) / 86400); if ($temp >= 1 && $temp <= 30 && $aktueller_urlaub == '') { // ART DES URLAUBS ANFANG if ($temp >= 1 && $temp <= 10 && $_SESSION['urlaub_min'] <= $temp && $_SESSION['urlaub_max'] >= $temp) { $sql1 = "UPDATE " . $prefix . "users SET last_urlaub_kurz = " . time() . " WHERE ids = '" . $cookie_id . "'"; $sql2 = mysql_query($sql1); } elseif ($temp >= 11 && $temp <= 30 && $_SESSION['urlaub_min'] <= $temp && $_SESSION['urlaub_max'] >= $temp) { $sql1 = "UPDATE " . $prefix . "users SET last_urlaub_lang = " . time() . " WHERE ids = '" . $cookie_id . "'"; $sql2 = mysql_query($sql1); } else { exit; } // ART DES URLAUBS ENDE $sql3 = "INSERT INTO " . $prefix . "urlaub (user, team, ende) VALUES ('" . $cookie_id . "', '" . $cookie_team . "', '" . $urlaub_ende . "')"; $sql4 = mysql_query($sql3);
$status_gambar_gs = isset($_REQUEST['status_gambar_gs']) ? to_number($_REQUEST['status_gambar_gs']) : '0'; $program = isset($_REQUEST['program']) ? to_number($_REQUEST['program']) : '0'; $luas_tanah = isset($_REQUEST['luas_tanah']) ? to_decimal($_REQUEST['luas_tanah']) : '0'; $disc_tanah = isset($_REQUEST['disc_tanah']) ? to_decimal($_REQUEST['disc_tanah'], 16) : '0'; $harga_disc_tanah = isset($_REQUEST['harga_disc_tanah']) ? to_number($_REQUEST['harga_disc_tanah']) : '0'; $ppn_tanah = isset($_REQUEST['ppn_tanah']) ? to_decimal($_REQUEST['ppn_tanah']) : '0'; $luas_bangunan = isset($_REQUEST['luas_bangunan']) ? to_decimal($_REQUEST['luas_bangunan']) : '0'; $disc_bangunan = isset($_REQUEST['disc_bangunan']) ? to_decimal($_REQUEST['disc_bangunan'], 16) : '0'; $ppn_bangunan = isset($_REQUEST['ppn_bangunan']) ? to_decimal($_REQUEST['ppn_bangunan']) : '0'; // HARGA DI TABEL SK $kode_sk = isset($_REQUEST['kode_sk']) ? $_REQUEST['kode_sk'] : ''; $harga_cash_keras = isset($_REQUEST['harga_cash_keras']) ? bigintval($_REQUEST['harga_cash_keras']) : '0'; $CB36X = isset($_REQUEST['harga_CB36X']) ? bigintval($_REQUEST['harga_CB36X']) : '0'; $CB48X = isset($_REQUEST['harga_CB48X']) ? bigintval($_REQUEST['harga_CB48X']) : '0'; $KPA24X = isset($_REQUEST['harga_KPA24X']) ? bigintval($_REQUEST['harga_KPA24X']) : '0'; $KPA36X = isset($_REQUEST['harga_KPA36X']) ? bigintval($_REQUEST['harga_KPA36X']) : '0'; $lokasi = ''; $jenis_unit = ''; $harga_tanah_sk = ''; $faktor_strategis = ''; $tipe_bangunan = ''; $harga_bangunan_sk = ''; $jenis_penjualan = ''; $tgl_bangunan = ''; $tgl_selesai = ''; $progress = ''; $base_harga_tanah = 0; $nilai_tambah = 0; $nilai_kurang = 0; $fs_harga_tanah = 0; $disc_harga_tanah = 0;
if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { die_login(); // die_app(''); // die_mod(''); $conn = conn($sess_db); die_conn($conn); $conn->begintrans(); $error = false; if ($act == 'Apply') { $query = "DELETE FROM RENCANA WHERE KODE_BLOK = '{$id}'"; ex_false($conn->execute($query), $query); for ($a = 1; $a <= $max; $a++) { $tgl_bayar = isset($_REQUEST['tanggal_bayar_' . $a]) ? clean($_REQUEST['tanggal_bayar_' . $a]) : ''; $nilai = isset($_REQUEST['nilai_' . $a]) ? bigintval($_REQUEST['nilai_' . $a]) : ''; $jb = isset($_REQUEST['jenis_bayar_' . $a]) ? bigintval($_REQUEST['jenis_bayar_' . $a]) : ''; $query = "INSERT INTO RENCANA (KODE_BLOK,TANGGAL,KODE_BAYAR, NILAI, KETERANGAN)\n\t\t\t\t\t\t\t\tVALUES('{$id}',\n\t\t\t\t\t\t\t\tCONVERT(DATETIME,'{$tgl_bayar}',105),\n\t\t\t\t\t\t\t\t'{$jb}',\n\t\t\t\t\t\t\t\t'{$nilai}',\n\t\t\t\t\t\t\t\t''\n\t\t\t\t\t\t\t)"; ex_false($conn->execute($query), $query); } $msg = 'Rencana pembayaran berhasil dibuat'; } $conn->committrans(); } catch (Exception $e) { $msg = $e->getmessage(); $error = TRUE; if ($conn) { $conn->rollbacktrans(); } } close($conn); $json = array('act' => $act, 'error' => $error, 'msg' => $msg);
mysql_query($vomTMrunter3); } $close7 = "INSERT INTO " . $prefix . "helferLog (helfer, managerBestrafen, zeit, chatSperre, transferSperre, geldStrafe, verstoss) VALUES ('" . $cookie_id . "', '" . $managerBestrafen . "', " . time() . ", " . $chatSperre . ", " . $transferSperre . ", " . $geldStrafe . ", " . $verstoss . ")"; $close8 = mysql_query($close7); } else { $close7 = "INSERT INTO " . $prefix . "helferLog (helfer, managerBestrafen, zeit, chatSperre, transferSperre, geldStrafe, verstoss) VALUES ('" . $cookie_id . "', '" . $managerBestrafen . "', " . time() . ", " . $chatSperre . ", " . $transferSperre . ", " . $geldStrafe . ", " . $verstoss . ")"; $close8 = mysql_query($close7); } $anzSanktionen1 = "UPDATE " . $prefix . "users SET anzSanktionen = anzSanktionen+1 WHERE ids = '" . $managerBestrafen . "'"; mysql_query($anzSanktionen1); addInfoBox('Die Strafe wurde ausgeführt.'); } } if (isset($_GET['un1']) && isset($_GET['un2'])) { $un1 = mysql_real_escape_string(trim(strip_tags($_GET['un1']))); $un2 = bigintval($_GET['un2']); $unData1 = "SELECT geldStrafe FROM " . $prefix . "helferLog WHERE managerBestrafen = '" . $un1 . "' AND zeit = " . $un2; $unData2 = mysql_query($unData1); if (mysql_num_rows($unData2) == 1) { $unData3 = mysql_fetch_assoc($unData2); $geldStrafeBack = intval($unData3['geldStrafe']); if ($geldStrafeBack != 0) { $unData1 = "SELECT team FROM " . $prefix . "users WHERE ids = '" . $un1 . "'"; $unData2 = mysql_query($unData1); if (mysql_num_rows($unData2) == 1) { $unData3 = mysql_fetch_assoc($unData2); $unGeld1 = "UPDATE " . $prefix . "teams SET konto = konto-" . $geldStrafeBack . " WHERE ids = '" . $unData3['team'] . "'"; mysql_query($unGeld1); } } $un3 = "UPDATE " . $prefix . "helferLog SET chatSperre = zeit, transferSperre = zeit, geldStrafe = -1 WHERE managerBestrafen = '" . $un1 . "' AND zeit = " . $un2;
/** * Display appropriate outcomes based on current call attempt status * * @param int $contacted 0 for not contacted, 1 for contacted (a person on the phone) * @param int $ca Call attempt id * @param int $case_id The Case id * */ function display_outcomes($contacted, $ca, $case_id) { global $db; $completed = limesurvey_is_completed($case_id); //see if the case is completed if ($completed) { $sql = "SELECT outcome_id,description\r\n\t\t\tFROM outcome\r\n\t\t\tWHERE outcome_id = 10"; } else { if (limesurvey_is_quota_full($case_id)) { $sql = "SELECT outcome_id,description\r\n\t\t\tFROM outcome\r\n\t\t\tWHERE outcome_id = 32"; } else { //see if we have made an appointment on this call attempt $sql = "SELECT appointment_id\r\n\t\t\tFROM appointment\r\n\t\t\tWHERE completed_call_id IS NULL\r\n\t\t\tAND call_attempt_id = '{$ca}'"; $rs = $db->GetAll($sql); $outcomes = $db->GetOne("SELECT q.outcomes FROM `questionnaire` as q JOIN `case` as c ON (c.questionnaire_id =q.questionnaire_id) WHERE c.case_id = {$case_id}"); if (!empty($rs)) { //we have an appointment made ... only select appointment ID's $sql = "SELECT outcome_id,description\r\n\t\t\t\tFROM outcome\r\n\t\t\t\tWHERE outcome_type_id = '5'\r\n\t\t\t\tAND outcome_id IN ({$outcomes})"; } else { if ($contacted === false) { $ctd = ""; } else { $contacted = bigintval($contacted); $ctd = "AND contacted = '{$contacted}'"; } $sql = "SELECT outcome_id,description\r\n\t\t\t\t\tFROM outcome\r\n\t\t\t\t\tWHERE outcome_type_id != '5'\r\n\t\t\t\t\t{$ctd}\r\n\t\t\t\t\tAND outcome_id IN ({$outcomes})\r\n\t\t\t\t\tAND outcome_id NOT IN(10,32,42,43,44,45)"; //don't show completed if not, Lime_Quota_full if not, hide max calls as they supposed to be automatic or admin-privileged } } } $rs = $db->GetAll($sql); print "<div>"; if (!empty($rs)) { $lime_sid = get_limesurvey_id(get_operator_id()); //Check to see if we have sent an email on this call and set the default outcome $sql = "SELECT 41\r\n\t\t\tFROM `case` as c, " . LIME_PREFIX . "tokens_{$lime_sid} as t\r\n\t\t\tWHERE t.sent = '{$ca}'\r\n\t\t\tAND c.case_id = {$case_id}\r\n\t\t\tAND t.token = c.token"; $do = $db->GetOne($sql); if (isset($_GET['defaultoutcome'])) { $do = bigintval($_GET['defaultoutcome']); } foreach ($rs as $r) { if ($do == $r['outcome_id']) { $selected = "checked='checked'"; } else { $selected = ""; } print "<div><label class='label'><input type='radio' class='radio' name='outcome' id='outcome-{$r['outcome_id']}' value='{$r['outcome_id']}' {$selected}/>" . T_($r['description']) . "</label></div>"; } } print "</div>"; }
function getChatroomData($chatroomid, $prelimit = 0, $lastMessages = 0) { global $guestsMode, $crguestsMode, $guestnamePrefix; global $language; global $userid; global $cookiePrefix; $usertable = TABLE_PREFIX . DB_USERTABLE; $usertable_username = DB_USERTABLE_NAME; $usertable_userid = DB_USERTABLE_USERID; $messages = array(); $moremessages = array(); $guestpart = ''; $prependCondition = ''; $limitClause = " limit " . mysqli_real_escape_string($GLOBALS['dbh'], $lastMessages) . " "; if (empty($prelimit) && empty($lastMessages)) { if (!empty($_SESSION['cometchat']['cometchat_chatroom_' . $chatroomid])) { $moremessages = $moremessages + $_SESSION['cometchat']['cometchat_chatroom_' . $chatroomid]; } $messages = $messages + $moremessages; krsort($messages); return $messages; } else { if ($prelimit != '-1') { $prelimit = bigintval($prelimit); $prependCondition = "and (cometchat_chatroommessages.id < '" . mysqli_real_escape_string($GLOBALS['dbh'], $prelimit) . "')"; } if ($guestsMode && $crguestsMode) { $guestpart = " UNION select DISTINCT cometchat_chatroommessages.id id, cometchat_chatroommessages.message, cometchat_chatroommessages.sent, CONCAT('" . $guestnamePrefix . "',m.name) `from`, cometchat_chatroommessages.userid fromid, m.id userid from cometchat_chatroommessages join cometchat_guests m on m.id = cometchat_chatroommessages.userid where cometchat_chatroommessages.chatroomid = '" . mysqli_real_escape_string($GLOBALS['dbh'], $chatroomid) . "' and cometchat_chatroommessages.message not like '%banned_%' and cometchat_chatroommessages.message not like '%kicked_%' and cometchat_chatroommessages.message not like '%deletemessage_%' " . $prependCondition; } $sql = "select DISTINCT cometchat_chatroommessages.id id, cometchat_chatroommessages.message, cometchat_chatroommessages.sent, m.{$usertable_username} `from`, cometchat_chatroommessages.userid fromid, m.{$usertable_userid} userid from cometchat_chatroommessages join {$usertable} m on m.{$usertable_userid} = cometchat_chatroommessages.userid where cometchat_chatroommessages.chatroomid = '" . mysqli_real_escape_string($GLOBALS['dbh'], $chatroomid) . "' and cometchat_chatroommessages.message not like '%banned_%' and cometchat_chatroommessages.message not like '%kicked_%' and cometchat_chatroommessages.message not like '%deletemessage_%' " . $prependCondition . $guestpart . " order by id desc " . $limitClause; $query = mysqli_query($GLOBALS['dbh'], $sql); if (defined('DEV_MODE') && DEV_MODE == '1') { echo mysqli_error($GLOBALS['dbh']); } while ($chat = mysqli_fetch_assoc($query)) { if (function_exists('processName')) { $chat['from'] = processName($chat['from']); } if ($lastMessages == 0) { $chat['message'] = ''; } if ($userid == $chat['userid']) { $chat['from'] = $language[10]; } else { if (!empty($_COOKIE[$cookiePrefix . 'lang']) && !(strpos($chat['message'], "CC^CONTROL_") > -1)) { $translated = text_translate($chat['message'], '', $_COOKIE[$cookiePrefix . 'lang']); if ($translated != '') { $chat['message'] = strip_tags($translated) . ' <span class="untranslatedtext">(' . $chat['message'] . ')</span>'; } } } $messages[$chat['id']] = array('id' => $chat['id'], 'from' => $chat['from'], 'fromid' => $chat['fromid'], 'message' => $chat['message'], 'sent' => $chat['sent']); } } header('Content-type: application/json; charset=utf-8'); echo json_encode($messages); }
if (substr($key, 0, 5) == "start") { $num = bigintval(substr($key, 6)); if (isset($_POST["use_{$num}"])) { $sql = "UPDATE shift as s, operator as o\r\n\t\t\t\t\tSET s.start = CONVERT_TZ(CONCAT(STR_TO_DATE(CONCAT({$year}, ' ',{$woy},' ', {$_POST["dow_{$num}"]}),'%x %v %w'),' ','" . $_POST["start_{$num}"] . "'), o.Time_zone_name, 'UTC'),\r\n\t\t\t\t\ts.end = CONVERT_TZ(CONCAT(STR_TO_DATE(CONCAT({$year}, ' ',{$woy},' ', {$_POST["dow_{$num}"]}),'%x %v %w'),' ','" . $_POST["end_{$num}"] . "'), o.Time_zone_name, 'UTC')\r\n\t\t\t\t\tWHERE o.operator_id = '{$operator_id}'\r\n\t\t\t\t\tAND shift_id = '{$num}'"; $db->Execute($sql); } else { $sql = "DELETE FROM shift\r\n\t\t\t\t\tWHERE shift_id = '{$num}'"; $db->Execute($sql); } } } //insert new shifts foreach ($_POST as $key => $val) { if (substr($key, 0, 7) == "NEW_use") { if ($val == "on") { $num = bigintval(substr($key, 8)); $sql = "INSERT INTO shift (shift_id,questionnaire_id,start,end)\r\n\t\t\t\t\tSELECT NULL,'{$questionnaire_id}', CONVERT_TZ(CONCAT(STR_TO_DATE(CONCAT({$year}, ' ',{$woy},' ', {$_POST["NEW_dow_{$num}"]}),'%x %v %w'),' ','" . $_POST["NEW_start_{$num}"] . "'), Time_zone_name, 'UTC') , CONVERT_TZ(CONCAT(STR_TO_DATE(CONCAT({$year}, ' ',{$woy},' ', {$_POST["NEW_dow_{$num}"]}),'%x %v %w'),' ','" . $_POST["NEW_end_{$num}"] . "'), Time_zone_name, 'UTC')\r\n\t\t\t\t\tFROM operator\r\n\t\t\t\t\tWHERE operator_id = '{$operator_id}'"; $db->Execute($sql); } } } } xhtml_head(T_("Shift management"), true, array("../include/bootstrap/css/bootstrap.min.css", "../include/clockpicker/dist/bootstrap-clockpicker.min.css", "../include/bootstrap-toggle/css/bootstrap-toggle.min.css", "../css/custom.css"), array("../include/jquery/jquery.min.js", "../include/bootstrap/js/bootstrap.min.js", "../include/clockpicker/dist/bootstrap-clockpicker.js", "../include/bootstrap-toggle/js/bootstrap-toggle.min.js", "../js/window.js")); //"../css/shifts.css", /** * Display warning if timezone data not installed * */ $sql = "SELECT CONVERT_TZ(NOW(),'SYSTEM','UTC') as t"; $rs = $db->GetRow($sql); if (empty($rs) || !$rs || empty($rs['t'])) {
<?php include 'zzserver.php'; session_start(); $hadresse = '/index.php?loggedout=1'; if (isset($_SESSION['loggedin'])) { if ($_SESSION['loggedin'] == 1) { $loggedOutTime = bigintval(getTimestamp('-301 seconds')); $last_login1 = "UPDATE " . $prefix . "users SET last_login = "******" WHERE ids = '" . $_SESSION['userid'] . "' AND last_login > " . $loggedOutTime; $last_login2 = mysql_query($last_login1); if ($_SESSION['status'] == 'Bigpoint' or isset($_SESSION['bigpoint'])) { $hadresse = 'http://de.bigpoint.com/'; } session_destroy(); unset($_SESSION['loggedin']); unset($_SESSION['userid']); unset($_SESSION['username']); unset($_SESSION['liga']); unset($_SESSION['team']); unset($_SESSION['teamname']); unset($_SESSION['anzeigen_wo']); unset($_SESSION['transferGesperrt']); } } $expired = getTimestamp('-1 hour'); setcookie("PHPSESSID", "", $expired, "/", str_replace('www.', '.', CONFIG_SITE_DOMAIN), FALSE, TRUE); header("Location: " . $hadresse);
//print "<h2>" . T_("Overall") . "</h2>"; //xhtml_table($rs,array("firstName","completions","totalcalls","time","callt","CPH","CALLSPH","effectiveness"),array(T_("Operator"),T_("Completions"),T_("Calls"),T_("Total time"),T_("Call time"),T_("Completions p/h"),T_("Calls p/h"),T_("Effectiveness"))); $questionnaire_id = false; print "<h3 class='form-inline pull-left'>" . T_("Please select a questionnaire") . " </h3>"; if (isset($_GET['questionnaire_id'])) { $questionnaire_id = bigintval($_GET['questionnaire_id']); } display_questionnaire_chooser($questionnaire_id, false, "form-inline clearfix", "form-control"); if ($questionnaire_id) { $rs = get_stats_total(get_stats_by_questionnaire($questionnaire_id)); print "<h2>" . T_("This project") . "</h2>"; xhtml_table($rs, array("firstName", "completions", "totalcalls", "time", "callt", "CPH", "CALLSPH", "effectiveness"), array(T_("Operator"), T_("Completions"), T_("Calls"), T_("Total time"), T_("Call time"), T_("Completions p/h"), T_("Calls p/h"), T_("Effectiveness"))); $operator_id = get_operator_id(); $shift_id = false; if (isset($_GET['shift_id'])) { $shift_id = bigintval($_GET['shift_id']); } $sql = "SELECT s.shift_id as value,CONCAT(DATE_FORMAT(CONVERT_TZ(s.start,'UTC',o.Time_zone_name),'" . DATE_TIME_FORMAT . "'),' " . TQ_("till") . " ',DATE_FORMAT(CONVERT_TZ(s.end,'UTC',o.Time_zone_name),'" . TIME_FORMAT . "')) as description,CASE WHEN s.shift_id = '{$shift_id}' THEN 'selected=\\'selected\\'' ELSE '' END AS selected\r\n\t\tFROM shift as s\r\n\t\tLEFT JOIN (operator as o) on (o.operator_id = '{$operator_id}')\r\n\t\tWHERE s.questionnaire_id = '{$questionnaire_id}'\r\n\t\tORDER BY s.start ASC"; $rs = $db->GetAll($sql); print "</br><h3 class='form-inline pull-left'>" . T_("Please select a shift") . " </h3>"; display_chooser($rs, "shift_id", "shift_id", true, "questionnaire_id={$questionnaire_id}", true, true, false, true, "form-inline form-group"); //,false,true,false,true,"pull-left" if ($shift_id) { $rs = get_stats_total(get_stats_by_shift($questionnaire_id, $shift_id)); print "<h2>" . T_("This shift") . "</h2>"; xhtml_table($rs, array("firstName", "completions", "totalcalls", "time", "callt", "CPH", "CALLSPH", "effectiveness"), array(T_("Operator"), T_("Completions"), T_("Calls"), T_("Total time"), T_("Call time"), T_("Completions p/h"), T_("Calls p/h"), T_("Effectiveness"))); } } xhtml_foot(); ?>
?> "></td> </tr> <tr> <?php ?> <td>Jumlah Diterima</td><td>:</td> <td>Rp. <input type="text" name="jumlah" id="jumlah" size="15" value="<?php echo to_money($jumlah); ?> "></td> </tr> <tr> <td>Terbilang </td><td>:</td> <td colspan="2"><input type="text" name="terbilang" id="terbilang" size="98" readonly="readonly" style="text-transform:uppercase" value="<?php echo ucfirst($terbilang->eja(bigintval($jumlah))); ?> rupiah"></td> </tr> <tr> <td>Koordinator</td><td>:</td> <td> <select name="koordinator" id="koordinator"> <option value=""> -- Koordinator -- </option> <?php $obj = $conn->execute("\t\t\n\t\t\t\t\tSELECT * FROM CLUB_PERSONAL\n\t\t\t\t\tWHERE JABATAN_KLUB = 4\n\t\t\t\t\tORDER BY NAMA \n\t\t\t\t\t"); while (!$obj->EOF) { $ov = $obj->fields['NOMOR_ID']; $oj = $obj->fields['NAMA']; echo "<option value='{$ov}'" . is_selected($ov, $koordinator) . "> {$oj} </option>"; $obj->movenext();
if (!empty($_GET['svar']) && empty($_GET['value'])) { $value = $svar; } $sql = "INSERT INTO questionnaire_prefill(questionnaire_id,lime_sgqa,value)\r\n\t\tVALUES('{$questionnaire_id}',{$sgqa},{$value})"; $db->Execute($sql); } if (isset($_GET['questionnaire_id']) && isset($_GET['questionnaire_prefill_id'])) { //need to remove prefill from questionnaire $questionnaire_id = bigintval($_GET['questionnaire_id']); $questionnaire_prefill_id = bigintval($_GET['questionnaire_prefill_id']); $sql = "DELETE FROM questionnaire_prefill\r\n\t\tWHERE questionnaire_prefill_id = '{$questionnaire_prefill_id}'"; $db->Execute($sql); } $questionnaire_id = false; if (isset($_GET['questionnaire_id'])) { $questionnaire_id = bigintval($_GET['questionnaire_id']); } $subtitle = T_("Set values for questionnaire to prefill"); xhtml_head(T_("Prefill questionnaire:"), true, array("../include/bootstrap/css/bootstrap.min.css", "../css/custom.css"), array("../js/window.js"), false, false, false, $subtitle); print "<h3 class='form-inline pull-left'>" . T_("Select a questionnaire") . ": </h3>"; $sql = "SELECT questionnaire_id as value,description, \r\n\tCASE WHEN questionnaire_id = '{$questionnaire_id}' THEN 'selected=\\'selected\\'' ELSE '' END AS selected\r\n \tFROM questionnaire\r\n\tWHERE enabled = 1"; display_chooser($db->GetAll($sql), "questionnaire", "questionnaire_id", true, false, true, true, false, true, "form-inline form-group"); if ($questionnaire_id != false) { print "<h2>" . T_("Current pre fills") . "</h2>"; $sql = "SELECT questionnaire_prefill_id,lime_sgqa,value\r\n\t\tFROM questionnaire_prefill\r\n\t\tWHERE questionnaire_id = '{$questionnaire_id}'"; $r = $db->GetAll($sql); if (empty($r)) { print "<p class='well text-info'>" . T_("Currently no pre fills") . "</p>"; } else { foreach ($r as $v) { print "<ul class='form-group clearfix'><p class='col-sm-2'>" . T_("SGQA code") . ": <b class='text-primary'>{$v['lime_sgqa']}</b></p><p class='col-sm-4'>" . T_("Sample variable") . ": <b class='text-primary'>{$v['value']}</b></p><a href='?questionnaire_id={$questionnaire_id}&questionnaire_prefill_id={$v['questionnaire_prefill_id']}'><i class='fa fa-lg text-danger'>" . T_("Delete") . "</i></a></ul>";
print "<h3 class='form-inline pull-left'>" . T_("Select a questionnaire") . ": </h3>"; $questionnaire_id = false; if (isset($_GET['questionnaire_id'])) { $questionnaire_id = bigintval($_GET['questionnaire_id']); } display_questionnaire_chooser($questionnaire_id, false, "form-inline form-group", "form-control"); if ($questionnaire_id) { print "<h3 class='form-inline pull-left'>" . T_("Select a sample") . ": </h3>"; $sample_import_id = false; if (isset($_GET['sample_import_id'])) { $sample_import_id = bigintval($_GET['sample_import_id']); } display_sample_chooser($questionnaire_id, $sample_import_id, false, "form-inline form-group clearfix", "form-control"); if ($sample_import_id) { if (isset($_GET['rowquota'])) { $qsq = bigintval($_GET['rowquota']); $qr = 0; if (isset($_GET['close'])) { $qr = 1; } $sql = "UPDATE questionnaire_sample_quota_row\r\n\t\t\t\tSET quota_reached = {$qr}\r\n\t\t\t\tWHERE questionnaire_sample_quota_row_id = '{$qsq}'"; $db->Execute($sql); if ($qr == 1) { close_row_quota($qsq); } else { open_row_quota($qsq, false); } } //Display report of quotas $report = array(); //Rows to display: Strata Status Quota Sample Sample Used Sample Remaining Completes % Complete
$act = isset($_REQUEST['act']) ? clean($_REQUEST['act']) : ''; $id = isset($_REQUEST['id']) ? clean($_REQUEST['id']) : ''; $kode = isset($_REQUEST['kode']) ? clean($_REQUEST['kode']) : ''; $kode_blok = isset($_REQUEST['kode_blok']) ? to_number($_REQUEST['kode_blok']) : ''; $no_va = isset($_REQUEST['no_va']) ? clean(trim($_REQUEST['no_va'])) : ''; $no_va_ph = isset($_REQUEST['no_va_ph']) ? clean($_REQUEST['no_va_ph']) : ''; $harga_awal = isset($_REQUEST['harga_awal']) ? bigintval($_REQUEST['harga_awal']) : ''; $no_ppjb_awal = isset($_REQUEST['no_ppjb_awal']) ? clean($_REQUEST['no_ppjb_awal']) : ''; $no_ppjb_hak = isset($_REQUEST['no_ppjb_hak']) ? clean($_REQUEST['no_ppjb_hak']) : ''; $tanggal_awal = isset($_REQUEST['tanggal_awal']) ? clean($_REQUEST['tanggal_awal']) : ''; $tanggal_sekarang = date("d-m-Y H:i:s"); $tanggal = isset($_REQUEST['tanggal']) ? clean($_REQUEST['tanggal']) : ''; $tanggal_permohonan = isset($_REQUEST['tanggal_permohonan']) ? clean($_REQUEST['tanggal_permohonan']) : ''; $tanggal_persetujuan = isset($_REQUEST['tanggal_persetujuan']) ? clean($_REQUEST['tanggal_persetujuan']) : ''; $harga_hak = isset($_REQUEST['harga_hak']) ? bigintval($_REQUEST['harga_hak']) : ''; $biaya = isset($_REQUEST['biaya']) ? bigintval($_REQUEST['biaya']) : ''; $masa_bangun = isset($_REQUEST['masa_bangun']) ? to_number($_REQUEST['masa_bangun']) : ''; $keterangan = isset($_REQUEST['keterangan']) ? clean($_REQUEST['keterangan']) : ''; $pihak_pertama = isset($_REQUEST['pihak_pertama']) ? clean($_REQUEST['pihak_pertama']) : ''; $no_id = isset($_REQUEST['no_id']) ? clean($_REQUEST['no_id']) : ''; $alamat = isset($_REQUEST['alamat']) ? clean($_REQUEST['alamat']) : ''; $tlp1 = isset($_REQUEST['tlp1']) ? clean($_REQUEST['tlp1']) : ''; $tlp3 = isset($_REQUEST['tlp3']) ? clean($_REQUEST['tlp3']) : ''; $email = isset($_REQUEST['email']) ? clean($_REQUEST['email']) : ''; $suami_istri = isset($_REQUEST['suami_istri']) ? clean($_REQUEST['suami_istri']) : ''; $no_fax = isset($_REQUEST['no_fax']) ? clean($_REQUEST['no_fax']) : ''; $pihak_kedua = isset($_REQUEST['pihak_kedua']) ? clean($_REQUEST['pihak_kedua']) : ''; $no_id_hak = isset($_REQUEST['no_id_hak']) ? clean($_REQUEST['no_id_hak']) : ''; $alamat_hak = isset($_REQUEST['alamat_hak']) ? clean($_REQUEST['alamat_hak']) : ''; $tlp1_hak = isset($_REQUEST['tlp1_hak']) ? clean($_REQUEST['tlp1_hak']) : ''; $tlp3_hak = isset($_REQUEST['tlp3_hak']) ? clean($_REQUEST['tlp3_hak']) : '';
if ($email_valide == TRUE) { $username = mysql_real_escape_string(trim(strip_tags($_POST['reg_benutzername']))); $username = str_replace('_', '', $username); $password = mt_rand(1, 9) . mt_rand(1, 9) . mt_rand(1, 9) . mt_rand(1, 9) . mt_rand(1, 9) . mt_rand(1, 9); $password_db = md5('1' . $password . '29'); $blackList1 = "SELECT COUNT(*) FROM " . $prefix . "blacklist WHERE email = '" . md5($email) . "' AND until > " . time(); $blackList2 = mysql_query($blackList1); $blackList3 = mysql_result($blackList2, 0); $schon_vorhandene_user = $blackList3; $sql1 = "SELECT COUNT(*) FROM " . $prefix . "users WHERE email = '" . $email . "' OR username = '******'"; $sql2 = mysql_query($sql1); $sql3 = mysql_result($sql2, 0); $schon_vorhandene_user += $sql3; if ($schon_vorhandene_user == 0) { $uniqueIDHash = md5($email . time()); $sql4 = "INSERT INTO " . $prefix . "users (email, username, password, regdate, last_login, last_ip, ids, liga, team) VALUES ('" . $email . "', '" . $username . "', '" . $password_db . "', " . time() . ", " . bigintval(getTimestamp('-14 days')) . ", '" . $last_ip . "', '" . $uniqueIDHash . "', '', '__" . $uniqueIDHash . "')"; $sql5 = mysql_query($sql4); if ($sql5 != FALSE) { if (isset($_SESSION['referralID'])) { $refID = mysql_real_escape_string(trim($_SESSION['referralID'])); if (mb_strlen($refID) == 32) { $addReferral1 = "INSERT INTO " . $prefix . "referrals (werber, geworben, zeit) VALUES ('" . $refID . "', '" . $uniqueIDHash . "', " . time() . ")"; $addReferral2 = mysql_query($addReferral1); } } $fehler_gemacht = FALSE; if (CONFIG_IS_LOCAL_INSTALLATION) { echo '<p><strong>' . _('Dein Passwort lautet:') . '</strong> ' . htmlspecialchars($password) . '</p>'; echo '<p>' . _('Du brauchst dieses Passwort unbedingt für den ersten Login. Danach kannst Du es in den Einstellungen ändern, wenn Du möchtest.') . '</p>'; } else { echo '<p>' . _('Vielen Dank, die Registrierung war erfolgreich! Wir senden Dir nun an die angegebene Adresse eine E-Mail mit Deinem Passwort zu. Mit dem Benutzernamen und dem zugeschickten Passwort kannst Du Dich danach einloggen.') . '</p>';
<?php include 'zz1.php'; ?> <title><?php echo _('Warteliste'); ?> - <?php echo CONFIG_SITE_NAME; ?> </title> <?php include 'zz2.php'; ?> <h1><?php echo _('Warteliste'); ?> </h1> <p><?php echo _('Zurzeit stehst Du noch auf der Warteliste. Es wird aber nicht lange dauern, bis Dir ein Team zugeteilt wird. Dann informieren wir Dich per E-Mail darüber und Du kannst sofort losspielen.'); ?> </p> <?php if (isset($_GET['since'])) { $since = bigintval($_GET['since']); echo '<p>' . __('Du hast Dich am %s Uhr registriert.', date('d.m.Y, H:i', $since)) . ' </p>'; } include 'zz3.php';
--> </style> <?php } include 'zz2.php'; if ($loggedin == 1) { ?> <h1><?php echo _('Spieltag auswählen'); ?> </h1> <form action="/lig_testspiele_liste.php" method="get" accept-charset="utf-8"> <p><select name="tag" size="1" style="width:200px"> <?php if (isset($_GET['tag'])) { $chosenStamp = bigintval($_GET['tag']); } else { $chosenStamp = mktime(23, 00, 00, date('m', time()), date('d', time()), date('Y', time())); } for ($i = 1; $i <= 22; $i++) { $abzugTemp = '-' . intval(GameTime::getMatchDay() - $i) . ' days'; $abzug = getTimestamp($abzugTemp); $abzugStamp = mktime(23, 00, 00, date('m', $abzug), date('d', $abzug), date('Y', $abzug)); $abzugStr = $i . '. Spieltag (' . date('d.m.Y', $abzugStamp) . ')'; echo '<option value="' . $abzugStamp . '"'; if (date('d.m.Y', $abzugStamp) == date('d.m.Y', $chosenStamp)) { echo ' selected="selected"'; } echo '>' . $abzugStr . '</option>'; } ?>
} if ($case_id != false) { if (isset($_GET['note'])) { $note = $db->qstr($_GET['note']); $sql = "INSERT INTO `case_note` (case_note_id,case_id,operator_id,note,datetime)\r\n\t\t\tVALUES (NULL,'{$case_id}','{$operator_id}',{$note},CONVERT_TZ(NOW(),'System','UTC'))"; $db->Execute($sql); } if (isset($_GET['outcome_id'])) { $outcome_id = bigintval($_GET['outcome_id']); if ($outcome_id > 0) { $sql = "UPDATE `case`\r\n\t\t\t\tSET current_outcome_id = {$outcome_id}\r\n\t\t\t\tWHERE case_id = '{$case_id}'"; $db->Execute($sql); } } if (isset($_GET['operator_id'])) { $case_operator_id = bigintval($_GET['operator_id']); if ($case_operator_id == 0) { //clear the next case if set to no operator $sql = "UPDATE `operator`\r\n\t\t\t\tSET next_case_id = NULL\r\n\t\t\t\tWHERE next_case_id = '{$case_id}'"; } else { $sql = "UPDATE `operator`\r\n\t\t\t\tSET next_case_id = '{$case_id}'\r\n\t\t\t\tWHERE operator_id = '{$case_operator_id}'"; } $db->Execute($sql); } if (isset($_GET['submitag'])) { $db->StartTrans(); $sql = "DELETE FROM case_availability\r\n\t\t\tWHERE case_id = '{$case_id}'"; $db->Execute($sql); foreach ($_GET as $key => $val) { if (substr($key, 0, 2) == "ag") { $sql = "INSERT INTO case_availability (case_id,availability_group_id)\r\n\t\t\t\t\tVALUES ({$case_id},'{$val}')";
if (!isset($cookie_team) OR $cookie_team == '') { echo 'Bitte melde den Fehler E5 im Forum oder unter <'.CONFIG_SITE_EMAIL.'>'; $phpf1 = "INSERT INTO ".$prefix."php_fehler (datei) VALUES ('transfermarkt_auktion KEIN Team')"; $phpf2 = mysql_query($phpf1); exit; } $sql8 = "INSERT INTO ".$prefix."transfermarkt (spieler, besitzer, gehalt, ende, betrag_highest, autorestart) VALUES ('".$spieler_id."', '".$cookie_team."', ".ceil($sql3['marktwert']/11).", ".getTimestamp('+'.$laenge.' hours').", ".$startgebot.", ".$autorestart.")"; $sql9 = mysql_query($sql8); if (mysql_affected_rows() != 0) { $sql4 = "UPDATE ".$prefix."spieler SET transfermarkt = 1, moral = moral-15 WHERE ids = '".$spieler_id."'"; $sql5 = mysql_query($sql4); } }*/ } elseif ($_POST['typ'] > 999998) { // Leihgabe $sql4 = "UPDATE " . $prefix . "spieler SET transfermarkt = " . bigintval($_POST['typ']) . ", moral = moral-10 WHERE ids = '" . $spieler_id . "'"; $sql5 = mysql_query($sql4); } } } } elseif (isset($_POST['abbrechen']) && $cookie_id != CONFIG_DEMO_USER) { if ($_POST['abbrechen'] == 'Ja') { $sql6 = "DELETE FROM " . $prefix . "transfermarkt WHERE spieler = '" . $spieler_id . "' AND ende > " . getTimestamp('+30 minutes') . " AND gebote = 0"; $sql7 = mysql_query($sql6); $sql6 = "DELETE FROM " . $prefix . "transfermarkt_leihe WHERE spieler = '" . $spieler_id . "' AND akzeptiert = 0"; $sql7 = mysql_query($sql6); $sql4 = "UPDATE " . $prefix . "spieler SET transfermarkt = 0 WHERE ids = '" . $spieler_id . "'"; $sql5 = mysql_query($sql4); } } }
function save_partner_meta($post_id, $post, $update) { global $meta_keys; global $wpdb; $file_id = null; $restrict_to = null; $new_settings = null; // If this isn't a 'partner' post, don't update it. if ('partner' != $post->post_type) { return; } // Delete any previous errors //error_log(print_R($_POST, true)); if (isset($_POST['registerforevent_nonce']) && !wp_verify_nonce($_POST['registerforevent_nonce'], 'registerforevent')) { return $post_id; } //error_log(print_R($_POST, true)); if (!current_user_can('edit_post', $post_id)) { return $post_id; } //error_log(print_R($_POST, true)); if (isset($_POST['event']) && !empty($_POST['event'])) { $new_settings = $_POST['event']; } else { return $post_id; } //error_log(print_R($_POST, true)); //error_log('new settings p '. print_R($_POST, true)); //error_log('new settings '. print_R($new_settings, true)); //error_log('meta '. print_R($meta_keys, true)); foreach ($meta_keys as $k) { if (isset($new_settings[$k])) { //error_log($k.' = '. $new_settings[$k].'||'. intval( $new_settings[$k] ) ); if (in_array($k, array('privacy', 'organizer_id', 'venue_id', 'venue_organizer_id', 'capacity'))) { if ($new_settings[$k] != '') { update_post_meta($post_id, $k, bigintval($new_settings[$k])); } else { update_post_meta($post_id, $k, ''); } } else { if (in_array($k, array('custom_header', 'custom_footer'))) { $new_settings[$k] = htmlspecialchars($new_settings[$k]); update_post_meta($post_id, $k, wp_filter_post_kses($new_settings[$k])); } elseif (in_array($k, array('organizer_logo'))) { $new_settings[$k] = str_replace(get_option('siteurl'), '', $new_settings[$k]); update_post_meta($post_id, $k, sanitize_text_field($new_settings[$k])); } else { update_post_meta($post_id, $k, sanitize_text_field($new_settings[$k])); } //error_log($k.' = '. $new_settings[$k] ) ; } } } // Save post template if (isset($_POST['post_template'])) { update_post_meta($post_id, '_post_template', sanitize_text_field($_POST['post_template'])); } // Make sure no cached data exists delete_transient('partners_' . $post_id); $settings = array(); foreach ($meta_keys as $k) { $settings[$k] = $_POST['event'][$k]; } set_transient('partners_' . $post_id, $settings, 86400); // Check if the template file is on place check_template(); $wpdb->update($wpdb->prefix . "posts", array('post_name' => sanitize_title_with_dashes($new_settings['organizer_shortname'])), array('ID' => $post_id)); /* wpdb->update( $wpdb->prefix . "posts", array( 'post_name' => sanitize_title_with_dashes( $new_settings['organizer_shortname'] ), ), array('ID' => $post_id)); $post = get_post($post_id); $post->post_name = sanitize_title_with_dashes( $new_settings['organizer_shortname'] ); wp_update_post( $post ); */ return $post_id; }
/** * Display appropriate outcomes based on current call attempt status * * @param int $contacted 0 for not contacted, 1 for contacted (a person on the phone) * @param int $ca Call attempt id * @param int $case_id The Case id * */ function display_outcomes($contacted, $ca, $case_id) { global $db; $completed = limesurvey_is_completed($case_id); //see if the case is completed if ($completed) { $sql = "SELECT outcome_id,description,contacted\r\n\t\t\tFROM outcome\r\n\t\t\tWHERE outcome_id = 10"; } else { if (limesurvey_is_quota_full($case_id)) { $sql = "SELECT outcome_id,description,contacted\r\n\t\t\tFROM outcome\r\n\t\t\tWHERE outcome_id = 32"; } else { //see if we have made an appointment on this call attempt $sql = "SELECT appointment_id\r\n\t\t\tFROM appointment\r\n\t\t\tWHERE completed_call_id IS NULL\r\n\t\t\tAND call_attempt_id = '{$ca}'"; $rs = $db->GetAll($sql); $outcomes = $db->GetOne("SELECT q.outcomes FROM `questionnaire` as q JOIN `case` as c ON (c.questionnaire_id =q.questionnaire_id) WHERE c.case_id = {$case_id}"); if (!empty($rs)) { //we have an appointment made ... only select appointment ID's $sql = "SELECT outcome_id,description,contacted\r\n\t\t\t\tFROM outcome\r\n\t\t\t\tWHERE outcome_type_id = '5'\r\n\t\t\t\tAND outcome_id IN ({$outcomes})"; } else { if ($contacted) { $contacted = bigintval($contacted); } else { print "<div class=\"form-group\" ><a href=\"?contacted=1\" class=\"btn btn-info\" style=\"margin-left: 15px; margin-right: 30px; min-width: 150px;\">" . T_("CONTACTED") . "</a>"; print "<a href=\"?contacted=0\" class=\"btn btn-default\" style=\"margin-left: 30px; margin-right: 15px; min-width: 150px;\">" . T_("NOT CONTACTED") . "</a></div>"; if (isset($_GET['contacted'])) { $contacted = bigintval($_GET['contacted']); } } if ($contacted == 1 || $contacted === 0) { $sql = "SELECT outcome_id,description,contacted\r\n\t\t\t\t\tFROM outcome\r\n\t\t\t\t\tWHERE outcome_type_id != '5'\r\n\t\t\t\t\tAND contacted = '{$contacted}'\r\n\t\t\t\t\tAND outcome_id IN ({$outcomes})\r\n\t\t\t\t\tAND outcome_id NOT IN(10,32,42,43,44,45)"; //don't show completed if not, Lime_Quota_full if not, hide max calls as they supposed to be automatic or admin-privileged } } } } $rs = $db->GetAll($sql); print "<div class=\"panel-body\">"; if (!empty($rs)) { $do = false; $lime_sid = get_limesurvey_id(get_operator_id()); //Check to see if we have sent an email on this call and set the default outcome $sql = "SELECT 41\r\n\t\t\tFROM `case` as c, " . LIME_PREFIX . "tokens_{$lime_sid} as t\r\n\t\t\tWHERE t.sent = '{$ca}'\r\n\t\t\tAND c.case_id = {$case_id}\r\n\t\t\tAND t.token = c.token"; $do = $db->GetOne($sql); if (isset($_GET['defaultoutcome'])) { $do = bigintval($_GET['defaultoutcome']); } foreach ($rs as $r) { if ($do == $r['outcome_id']) { $selected = "checked='checked'"; } else { $selected = ""; } if (isset($r['contacted']) && $r['contacted'] == 1) { $highlight = ""; } else { $highlight = "style='color:black;'"; } print "<div><a><label {$highlight} class='btn-link'><input type='radio' class='radio' name='outcome' id='outcome-{$r['outcome_id']}' value='{$r['outcome_id']}' {$selected} style='float:left'/> " . T_($r['description']) . "</label></a></div>"; } $_POST['confirm'] = true; //check that outcome selected } print "</div>"; }
$ac_spieler = mysql_real_escape_string(trim(strip_tags($_POST['spieler']))); $ac_besitzer = mysql_real_escape_string(trim(strip_tags($_POST['besitzer']))); $ac_aktion = mysql_real_escape_string(trim(strip_tags($_POST['aktion']))); $de1 = "DELETE FROM " . $prefix . "transfermarkt_leihe WHERE spieler = '" . $ac_spieler . "' AND besitzer = '" . $ac_besitzer . "' AND bieter = '" . mysql_real_escape_string($cookie_teamname) . "'"; mysql_query($de1); if (mysql_affected_rows() == 0) { addInfoBox(_('Der Spieler konnte nicht gefunden werden.')); } else { addInfoBox(_('Die Anfrage wurde zurückgezogen.')); } } if (isset($_POST['spieler']) && isset($_POST['aktion']) && isset($_POST['bieter']) && isset($_POST['praemie'])) { $ac_spieler = mysql_real_escape_string(trim(strip_tags($_POST['spieler']))); $ac_bieter = mysql_real_escape_string(trim(strip_tags($_POST['bieter']))); $ac_aktion = mysql_real_escape_string(trim(strip_tags($_POST['aktion']))); $ac_praemie = bigintval($_POST['praemie']); if ($ac_praemie > 350000) { $ac_praemie = 0; } if ($ac_aktion == 'Ja') { $bid1 = "SELECT ids FROM " . $prefix . "teams WHERE name = '" . $ac_bieter . "'"; $bid2 = mysql_query($bid1); if (mysql_num_rows($bid2) != 0) { $ac1 = "UPDATE " . $prefix . "transfermarkt_leihe SET akzeptiert = 1 WHERE spieler = '" . $ac_spieler . "' AND bieter = '" . $ac_bieter . "' AND akzeptiert = 0"; $ac2 = mysql_query($ac1); if (mysql_affected_rows() != 0) { $bid3 = mysql_fetch_assoc($bid2); $ac_bieter_id = $bid3['ids']; if (!isset($transfers_mit_team[$ac_bieter_id])) { $transfers_mit_team[$ac_bieter_id] = 0; }
<button type="button" class="btn btn-info" data-dismiss="modal"><?php echo T_("OK"); ?> </button> </div> </div> </div> </div> <?php $questionnaire_id = false; if (isset($_GET['questionnaire_id'])) { $questionnaire_id = bigintval($_GET['questionnaire_id']); } $sample_import_id = false; if (isset($_GET['sample_import_id']) && !empty($_GET['sample_import_id'])) { $sample_import_id = bigintval($_GET['sample_import_id']); } $outcome_id = false; print "<div class='form-group '><h3 class=' col-sm-2 text-right'>" . T_("Questionnaire") . ":</h3>"; display_questionnaire_chooser($questionnaire_id, false, "pull-left", "form-control"); if ($questionnaire_id) { print "<h3 class=' col-sm-2 text-right'>" . T_("Sample") . ":</h3>"; display_sample_chooser($questionnaire_id, $sample_import_id, false, "pull-left", "form-control", true); print "</div>\r\n\t <div class='clearfix'></div>"; case_status_report($questionnaire_id, $sample_import_id, $outcome_id); } xhtml_foot($js_foot); ?> <script type="text/javascript"> $('#bs-table').bdt(); $('input').iCheck({
$('#ttd').on('click', function(e) { e.preventDefault(); var url = base_marketing + 'ppjb/transaksi/ppjb/ttd.php?id=<?php echo $id; ?> &act=Ttd'; setPopup('Penandatangan PPJB', url, 450, 200); return false; }); $('#ppjb').on('click', function(e) { e.preventDefault(); var kode_jenis_ppjb = $('#kode_jenis_ppjb').val(); var jenis_ppjb = $('#jenis_ppjb').val(); var telah_bayar = <?php echo bigintval($telah_bayar); ?> ; var persentase_paijb = $('#persentase_paijb').val(); var persentase_ppjb = $('#persentase_ppjb').val(); var persentase_telah_bayar = $('#persentase_telah_bayar').val(); var url = base_marketing + 'ppjb/transaksi/ppjb/pilih_cetak.php?id=<?php echo $id; ?> &act=Ubah&kode_jenis_ppjb='+kode_jenis_ppjb+'&jenis_ppjb='+jenis_ppjb+'&telah_bayar='+telah_bayar+'&persentase_paijb='+persentase_paijb+'&persentase_ppjb='+persentase_ppjb+'&persentase_telah_bayar='+persentase_telah_bayar; setPopup('Cetak PAIJB/PPJB', url, 260, 100); return false; }); //addendum var addendum = $('#addendum').val();
?> </p> <h1><?php echo _('Anfragen durchsuchen'); ?> </h1> <form action="/support.php" method="get" accept-charset="utf-8"> <p><input type="text" name="q" style="width:200px" /> <input type="submit" value="<?php echo _('Suchen'); ?> " /></p> </form> <?php // ANFRAGE LÖSCHEN ANFANG if (isset($_GET['del']) && ($_SESSION['status'] == 'Admin' or $_SESSION['status'] == 'Helfer') && $cookie_id != CONFIG_DEMO_USER) { $delID = bigintval(secure2id($_GET['del'])); $sql1 = "SELECT author, pro, contra FROM " . $prefix . "supportRequests WHERE id = " . $delID; $sql2 = mysql_query($sql1) or die(mysql_error()); if (mysql_num_rows($sql2) == 1) { $delVoteCount = mysql_fetch_assoc($sql2); $sql1 = "UPDATE " . $prefix . "supportRequests SET visibilityLevel = 2 WHERE id = " . $delID . " AND open = 1"; $sql2 = mysql_query($sql1) or die(mysql_error()); if (mysql_affected_rows() == 1) { $sql1 = "DELETE FROM " . $prefix . "supportComments WHERE requestID = " . $delID; $sql2 = mysql_query($sql1) or die(mysql_error()); $sql1 = "DELETE FROM " . $prefix . "supportVotes WHERE request = " . $delID; $sql2 = mysql_query($sql1) or die(mysql_error()); addInfoBox(_('Die ausgewählte Anfrage wurde vollständig gelöscht.')); } } }
function getChatboxData($id) { global $messages; global $userid; global $chromeReorderFix; global $prependLimit; if (empty($_REQUEST['prepend'])) { if (USE_COMET == 1 && !empty($id)) { if (!empty($_SESSION['cometchat']['cometmessagesafter'])) { $limit = 10; $prelimit = ' limit ' . intval($limit); if (!empty($_REQUEST['callbackfn']) && $_REQUEST['callbackfn'] == 'mobileapp') { $prelimit = ' limit 10'; } if (!empty($_SESSION['cometchat']['cometchat_user_' . $id])) { $messages = array_merge($messages, $_SESSION['cometchat']['cometchat_user_' . $id]); } $moremessages = array(); $messagesafter = $_SESSION['cometchat']['cometmessagesafter']; if (!empty($_SESSION['cometchat']['cometchat_user_' . $id . '_clear']) && $_SESSION['cometchat']['cometchat_user_' . $id . '_clear']['timestamp'] > $_SESSION['cometchat']['cometmessagesafter']) { $messagesafter = $_SESSION['cometchat']['cometchat_user_' . $id . '_clear']['timestamp']; } $sql = "select * from cometchat where ((cometchat.from = " . mysqli_real_escape_string($GLOBALS['dbh'], $userid) . " and cometchat.to = " . mysqli_real_escape_string($GLOBALS['dbh'], $id) . " and direction <>1) or ( cometchat.from = " . mysqli_real_escape_string($GLOBALS['dbh'], $id) . " and cometchat.to = " . mysqli_real_escape_string($GLOBALS['dbh'], $userid) . " and direction <>2 )) order by cometchat.id desc " . mysqli_real_escape_string($GLOBALS['dbh'], $prelimit) . ";"; $query = mysqli_query($GLOBALS['dbh'], $sql); while ($message = mysqli_fetch_assoc($query)) { if ($message['from'] == $id && $message['sent'] >= intval($messagesafter / 1000)) { $self = 0; if ($message['from'] == $userid) { $message['from'] = $message['to']; $self = 1; } $moremessages[$chromeReorderFix . $message['id']] = array("id" => $message['id'], "from" => $message['from'], "message" => $message['message'], "self" => $self, "old" => 1, 'sent' => $message['sent']); } } if (!empty($id) && empty($_SESSION['cometchat']['cometchat_user_' . $id])) { getPrevMessages($id); } $messages = array_merge($messages, $moremessages); usort($messages, "cmp"); } else { if (!empty($id) && !empty($_SESSION['cometchat']['cometchat_user_' . $id])) { $messages = array_merge($messages, $_SESSION['cometchat']['cometchat_user_' . $id]); } } } else { if (!empty($id) && !empty($_SESSION['cometchat']['cometchat_user_' . $id])) { $messages = array_replace($messages, $_SESSION['cometchat']['cometchat_user_' . $id]); } if (!empty($id) && empty($_SESSION['cometchat']['cometchat_user_' . $id])) { getPrevMessages($id); $messages = array_reverse($messages); } } } else { $prelimit = intval($prependLimit); $messages = array(); if ($_REQUEST['prepend'] != '-1') { $prepend = bigintval($_REQUEST['prepend']); $sql = "select * from cometchat where ((cometchat.from = " . mysqli_real_escape_string($GLOBALS['dbh'], $userid) . " and cometchat.to = " . mysqli_real_escape_string($GLOBALS['dbh'], $id) . " and direction <>1) or ( cometchat.from = " . mysqli_real_escape_string($GLOBALS['dbh'], $id) . " and cometchat.to = " . mysqli_real_escape_string($GLOBALS['dbh'], $userid) . " and direction <> 2)) and (cometchat.id < {$prepend}) order by cometchat.id desc limit {$prelimit};"; } else { $sql = "select * from cometchat where ((cometchat.from = " . mysqli_real_escape_string($GLOBALS['dbh'], $userid) . " and cometchat.to = " . mysqli_real_escape_string($GLOBALS['dbh'], $id) . " and direction <>1) or ( cometchat.from = " . mysqli_real_escape_string($GLOBALS['dbh'], $id) . " and cometchat.to = " . mysqli_real_escape_string($GLOBALS['dbh'], $userid) . " and direction <>2 )) order by cometchat.id desc limit {$prelimit};"; } $query = mysqli_query($GLOBALS['dbh'], $sql); if (defined('DEV_MODE') && DEV_MODE == '1') { echo mysqli_error($GLOBALS['dbh']); } while ($chat = mysqli_fetch_assoc($query)) { $self = 0; $old = 0; if ($chat['from'] == $userid) { $chat['from'] = $chat['to']; $self = 1; $old = 1; } if ($chat['read'] == 1) { $old = 1; } $messages[$chromeReorderFix . $chat['id']] = array('id' => $chat['id'], 'from' => $chat['from'], 'message' => $chat['message'], 'self' => $self, 'old' => $old, 'sent' => $chat['sent']); } $messages = array_reverse($messages); } }
} display_questionnaire_chooser($questionnaire_id, array(-1, T_("Overall")), "form-inline clearfix", "form-control"); if ($questionnaire_id || $questionnaire_id == -1) { if (sample_call_attempt_report($questionnaire_id, false, false)) { if ($questionnaire_id != -1) { print "<h3 class='form-inline pull-left'>" . T_("Please select a sample") . " </h3>"; $sample_import_id = false; if (isset($_GET['sample_import_id'])) { $sample_import_id = bigintval($_GET['sample_import_id']); } display_sample_chooser($questionnaire_id, $sample_import_id, false, "form-inline clearfix", "form-control"); if ($sample_import_id) { if (sample_call_attempt_report($questionnaire_id, $sample_import_id, false)) { $questionnaire_sample_quota_row_id = false; if (isset($_GET['questionnaire_sample_quota_row_id'])) { $questionnaire_sample_quota_row_id = bigintval($_GET['questionnaire_sample_quota_row_id']); } print "<h3 class='form-inline pull-left'>" . T_("Please select a quota") . " </h3>"; display_quota_chooser($questionnaire_id, $sample_import_id, $questionnaire_sample_quota_row_id, "form-inline clearfix", "form-control"); if ($questionnaire_sample_quota_row_id) { if (!sample_call_attempt_report($questionnaire_id, $sample_import_id, $questionnaire_sample_quota_row_id)) { print "<p class='well text-danger'>" . T_("No calls for this quota") . "</p>"; } } } else { print "<p class='well text-danger'>" . T_("No calls for this sample") . "</p>"; } } } } else { print "<p class='well text-danger'>" . T_("No calls for this questionnaire") . "</p>";
$contact_phone_id = bigintval($_GET['contact_phone_id']); } else { $contact_phone_id = -1; } print "<div class=\"pull-left\"><select class=\"form-control\" id='phonenum' name='phonenum' onchange=\"LinkUp('phonenum')\"><option></option>"; foreach ($list as $l) { $id = $l['contact_phone_id']; $selected = ""; if ($id == $contact_phone_id) { $selected = "selected='selected'"; } print "<option value='?contact_phone_id={$id}&start={$_GET['start']}&end={$_GET['end']}&d={$day}&y={$year}&m={$month}&respondent_id={$respondent_id}' {$selected}>{$l['phone']} - {$l['description']}</option>"; } print "<option value='?contact_phone_id=0&start={$_GET['start']}&end={$_GET['end']}&d={$day}&y={$year}&m={$month}&respondent_id={$respondent_id}' class='addresp'>" . T_("Add new phone number") . "</option></select></div></div>"; if (isset($_GET['contact_phone_id'])) { $contact_phone_id = bigintval($_GET['contact_phone_id']); print "<div class=\"clearfix form-group\">"; if ($contact_phone_id == 0) { //ability to add a new one ?> <p><?php echo T_("Add new phone number (with area code, eg 0398761234):"); ?> </p> <form id="addPhone" method="get" action="" class="form-inline form-group"> <div class="pull-left"><input type="tel" maxlength="10" size="12" pattern="[0-9]{10}" class="form-control" name="phonenum"/></div>  <input type="submit" class="btn btn-info" value="<?php echo T_("Add this phone number"); ?> "/> <input type="hidden" name="start" value="<?php
$supplyDemandPrices2 = mysql_query($supplyDemandPrices1); while ($supplyDemandPrices3 = mysql_fetch_assoc($supplyDemandPrices2)) { $supplyDemandPrices[$supplyDemandPrices3['item']] = $supplyDemandPrices3['price']; } $_SESSION['supplyDemandPrices'] = serialize($supplyDemandPrices); } else { $supplyDemandPrices = unserialize($_SESSION['supplyDemandPrices']); } // WENN LETZTE AENDERUNG VOM ALTEN MANAGER DANN EGAL ANFANG $getRegdate1 = "SELECT regdate FROM " . $prefix . "users WHERE ids = '" . $cookie_id . "'"; $getRegdate2 = mysql_query($getRegdate1); if (mysql_num_rows($getRegdate2) == 0) { exit; } $getRegdate3 = mysql_fetch_assoc($getRegdate2); $getRegdate = bigintval($getRegdate3['regdate']); $timeout = getTimestamp('-22 days'); if ($timeout < $getRegdate) { $timeout = $getRegdate; } // WENN LETZTE AENDERUNG VOM ALTEN MANAGER DANN EGAL ENDE $getkonto1 = "SELECT konto FROM " . $prefix . "teams WHERE ids = '" . $cookie_team . "'"; $getkonto2 = mysql_query($getkonto1); $getkonto3 = mysql_fetch_assoc($getkonto2); $getkonto4 = $getkonto3['konto'] - einsatz_in_auktionen($cookie_team); if (isset($_POST['fitness_regeneration']) && $cookie_id != CONFIG_DEMO_USER) { $heute_string = date('Y-m-d', time()); $temp = intval($_POST['fitness_regeneration']); if ($temp == 1 || $temp == 2 || $temp == 3) { if ($getkonto4 > 0) { $ch1 = "SELECT letzte_regeneration FROM " . $prefix . "teams WHERE ids = '" . $cookie_team . "'";
$appointment_id = bigintval($_GET['appointment_id']); //Edit this appointment in the database $sql = "UPDATE appointment as a, respondent as r\r\n\t\tSET a.start = CONVERT_TZ({$start},r.Time_zone_name,'UTC'), a.end = CONVERT_TZ({$end},r.Time_zone_name,'UTC'), a.contact_phone_id = {$contact_phone_id}, a.respondent_id = {$respondent_id}, a.require_operator_id = {$require_operator_id}\r\n\t\tWHERE a.appointment_id = {$appointment_id}\r\n\t\tAND r.respondent_id = {$respondent_id}"; $db->Execute($sql); } unset($_GET['start'], $_GET['end'], $_GET['new'], $_GET['update'], $_GET['appointment_id'], $_GET['case_id'], $_GET['addphonenumber']); // } if (isset($_GET['appointment_id']) && isset($_GET['case_id']) || isset($_GET['new']) && isset($_GET['case_id'])) { if (isset($_GET['appointment_id'])) { $appointment_id = bigintval($_GET['appointment_id']); } else { $appointment_id = ""; } if (isset($_GET['case_id'])) { $case_id = bigintval($_GET['case_id']); } $require_operator_id = "NULL"; if (isset($_GET['delete'])) { $sql = "DELETE FROM appointment\r\n\t\t\tWHERE appointment_id = '{$appointment_id}'"; $db->Execute($sql); xhtml_head(T_("Now modify case outcome"), true, $css, $js_head); print "<div class='col-lg-6'><p class='well'>" . T_("The appointment has been deleted. Now you must modify the case outcome") . "</p>\r\n\t\t\t\t<a href='supervisor.php?case_id={$case_id}' class='btn btn-default'>" . T_("Modify case outcome") . "</a></div>"; } else { $sql = "SELECT CONVERT_TZ(NOW(),'SYSTEM',r.Time_zone_name) as startdate, \r\n\t\t\t\t\t\tCONVERT_TZ(DATE_ADD(NOW(), INTERVAL 10 YEAR),'SYSTEM',r.Time_zone_name) as enddate,\r\n\t\t\t\t\t\tr.respondent_id, ca.contact_phone_id\r\n\t\t\t\t\t\tFROM `case` as c, `respondent` as r, `call` as ca\r\n\t\t\t\t\t\tWHERE c.case_id = '{$case_id}'\r\n AND r.case_id = c.case_id\r\n AND c.last_call_id = ca.call_id"; $rs = $db->GetRow($sql); $startdate = $rs['startdate']; $enddate = $rs['enddate']; $respondent_id = $rs['respondent_id']; if (!isset($contact_phone_id)) { $contact_phone_id = $rs['contact_phone_id'];