Beispiel #1
0
function workstart()
{
    global $db, $locate, $config;
    $objResponse = new xajaxResponse();
    $row = astercrm::getDialNumByAgent($_SESSION['curuser']['extension']);
    if ($row['id'] == '') {
    } else {
        $sql = "SELECT * FROM dnc_list WHERE number='" . $row['dialnumber'] . "' AND (campaignid=0 OR campaignid = '" . $row['campaignid'] . "') AND (groupid = 0 OR groupid='" . $row['groupid'] . "')  LIMIT 1";
        $dnc_row = $db->getRow($sql);
        if ($dnc_row['id'] > 0) {
            $row['callresult'] = 'dnc';
            $phoneNum = $row['dialnumber'];
            astercrm::deleteRecord($row['id'], "diallist");
            $row['trytime'] = $row['trytime'] + 1;
            $row['dialednumber'] = $phoneNum;
            $row['dialedby'] = $_SESSION['curuser']['extension'];
            $dialedlistid = astercrm::insertNewDialedlist($row);
            $objResponse->loadXML(getPrivateDialListNumber($_SESSION['curuser']['extension']));
            $objResponse->addScript("workctrl('start');");
            return $objResponse;
        }
        $objResponse->addAssign("btnWork", "value", $locate->Translate("Stop work"));
        if ($config['system']['stop_work_verify']) {
            $objResponse->addEvent("btnWork", "onclick", "workctrl('check');");
        } else {
            $objResponse->addEvent("btnWork", "onclick", "workctrl('stop');");
        }
        $objResponse->addAssign("btnWorkStatus", "value", "working");
        $objResponse->addAssign("divWork", "innerHTML", $locate->Translate("dialing to") . " " . $row['dialnumber']);
        $_SESSION['curuser']['WorkStatus'] = 'working';
        $phoneNum = $row['dialnumber'];
        astercrm::deleteRecord($row['id'], "diallist");
        $row['trytime'] = $row['trytime'] + 1;
        $row['dialednumber'] = $phoneNum;
        $row['dialedby'] = $_SESSION['curuser']['extension'];
        $dialedlistid = astercrm::insertNewDialedlist($row);
        $objResponse->loadXML(getContact($phoneNum, 0, $row['campaignid']));
        $objResponse->loadXML(getPrivateDialListNumber($_SESSION['curuser']['extension']));
        if ($row['callresult'] != 'dnc') {
            invite($_SESSION['curuser']['extension'], $phoneNum, $row['campaignid'], $dialedlistid);
        }
    }
    return $objResponse;
}
Beispiel #2
0
<?php

require_once './config/require.php';
// функция закрыта
if (!_settings_show_tournament_menu) {
    fail(_error_function_is_restricted);
}
redirect(ServerRoot . 'qualification.php?code=' . invite(isset($teamid) ? $teamid : -1, isset($mode) ? $mode : 1));
Beispiel #3
0
     } elseif ($p == "signup") {
         header("Location: signup.php");
     } elseif ($p == "signin") {
         header("Location: signin.php");
     } elseif ($p == "forgotpassword") {
         include "forgotpassword.php";
         $embedcode = forgotpassword($wavephoto);
     } elseif ($p == "statistics") {
         include "statistics.php";
         $embedcode = statistics($wavephoto);
     } elseif ($p == "faq") {
         include "faq.php";
         $embedcode = faq($wavephoto);
     } elseif ($p == "invite") {
         include "invite.php";
         $embedcode = invite($wavephoto, $myid);
     } elseif ($p == "random") {
         include "random.php";
         $p = randomsite();
         $pagetype = "project";
         include "autoembed.php";
         $embedcode = autoembed($p);
     }
 } elseif ($pagetype == "profile") {
     include "profile.php";
     $embedcode = profile($p);
 } elseif ($pagetype == "myprofile") {
     include "myprofile.php";
     $embedcode = myprofile($p);
 } elseif ($pagetype == "project") {
     include "autoembed.php";
     found_alliance();
     show_menu();
     show_alliance();
     break;
 case "mailforms":
     mailforms();
     break;
 case "edit_mailform":
     edit_mailform();
     break;
 case "proc_edit_mailform":
     proc_edit_mailform();
     show_menu();
     break;
 case "invite":
     invite();
     break;
 case "proc_invite":
     proc_invite();
     show_menu();
     show_alliance();
     break;
 case "join":
     join_alliance();
     show_menu();
     show_alliance();
     break;
 case "kick":
     kick();
     show_menu();
     show_alliance();
Beispiel #5
0
function readFromStream($fp)
{
    global $last_ping;
    $rdata = fgets($fp, 4096);
    $rdata = preg_replace('/\\s+/', ' ', $rdata);
    // log for reports (if enabled via command line (-log)
    if (IRC_LOGGING && strlen($rdata) > 0) {
        write_log_message($rdata);
    }
    // remember the last time we got something from the server
    if (strlen($rdata) > 0) {
        $last_ping = time();
    }
    // timeout detection!
    if ($last_ping < time() - 300) {
        echo_r('TIMEOUT detected!');
        fclose($fp);
        // close socket
        throw new TimeoutException();
    }
    // we simply do some poll stuff here
    check_planet_builds($fp);
    check_events($fp);
    check_sms_dlr($fp);
    check_sms_response($fp);
    if (strlen($rdata) == 0) {
        return false;
    }
    // required!!! otherwise timeout!
    if (server_ping($fp, $rdata)) {
        return;
    }
    // server msg
    if (server_msg_307($fp, $rdata)) {
        return;
    }
    if (server_msg_318($fp, $rdata)) {
        return;
    }
    if (server_msg_352($fp, $rdata)) {
        return;
    }
    if (server_msg_401($fp, $rdata)) {
        return;
    }
    //Are they using a linked nick instead
    if (notice_nickserv_registered_user($fp, $rdata)) {
        return;
    }
    if (notice_nickserv_unknown_user($fp, $rdata)) {
        return;
    }
    // some nice things
    if (ctcp_version($fp, $rdata)) {
        return;
    }
    if (ctcp_finger($fp, $rdata)) {
        return;
    }
    if (ctcp_time($fp, $rdata)) {
        return;
    }
    if (ctcp_ping($fp, $rdata)) {
        return;
    }
    if (invite($fp, $rdata)) {
        return;
    }
    // join and part
    if (channel_join($fp, $rdata)) {
        return;
    }
    if (channel_part($fp, $rdata)) {
        return;
    }
    // nick change and quit
    if (user_nick($fp, $rdata)) {
        return;
    }
    if (user_quit($fp, $rdata)) {
        return;
    }
    if (channel_action_slap($fp, $rdata)) {
        return;
    }
    // channel msg (!xyz) without registration
    if (channel_msg_help($fp, $rdata)) {
        return;
    }
    if (channel_msg_seedlist($fp, $rdata)) {
        return;
    }
    if (channel_msg_op($fp, $rdata)) {
        return;
    }
    if (channel_msg_timer($fp, $rdata)) {
        return;
    }
    if (channel_msg_8ball($fp, $rdata)) {
        return;
    }
    if (channel_msg_seen($fp, $rdata)) {
        return;
    }
    if (channel_msg_sd($fp, $rdata)) {
        return;
    }
    if (channel_msg_sms($fp, $rdata)) {
        return;
    }
    // channel msg (!xyz) with registration
    if (channel_msg_with_registration($fp, $rdata)) {
        return;
    }
    // MrSpock can use this to send commands as caretaker
    if (query_command($fp, $rdata)) {
        return;
    }
    // debug
    if (IRC_DEBUGGING) {
        echo_r('[UNKNOWN] ' . $rdata);
        return;
    }
}
Beispiel #6
0
<?
  include_once('../database/userFunc.php'); 
  include_once('../database/eventFunc.php'); 
  
  $name = $_POST['name'];
  $evento = $_POST['evento']; 

  $idEvent = getEventId($evento);
  if (!existUser($name)){
    echo "user_not_exist";
    return false;
  }
  $idUser = getUserID($name);

  try {
    $invite = invite($idUser, $idEvent);
    if ($invite === false){
      echo "fail";
    }
    else if ($invite === true){
      echo "success";
    }
  } catch (PDOException $e) {
    die($e->getMessage());
  }
?>
Beispiel #7
0
        }
    } elseif ($_POST['delete']) {
        $res = sql_query("SELECT * FROM invitebox WHERE Id IN (" . implode(", ", $_POST[invitebox]) . ")");
        while ($arr = mysql_fetch_assoc($res)) {
            $file = str_replace("%20", " ", "{$arr['pic']}");
            unlink("{$file}");
            sql_query("DELETE from invitebox WHERE Id = {$arr['Id']}") or sqlerr();
        }
    } elseif ($_POST['invite']) {
        $res = sql_query("SELECT * FROM invitebox WHERE dealt_by='no' AND Id IN (" . implode(", ", $_POST[invitebox]) . ")");
        while ($arr = mysql_fetch_assoc($res)) {
            if ($arr['dealt_by'] == 'no') {
                sql_query("UPDATE invitebox SET dealt_by = '邀请-" . $CURUSER[username] . "' WHERE Id = {$arr['Id']}") or sqlerr();
                $email = $arr['email'];
                $email0 = unesc(htmlspecialchars(trim($email)));
                invite($email0);
                print "邀请'" . $email0 . "'成功";
            } else {
                print "邀请'" . $email0 . "'失败,该申请已处理";
            }
        }
    }
}
?>
<h1>邀请申请区</h1>
<h1><a href=viewinvitebox.php>查看未处理</a>++++++++<a href=viewinvitebox.php?view=all>查看全部</a></h1>
<br/><h2>说明:</h2><table width="100%"><tbody><tr><td class="text" valign="top"><div style="margin-left: 16pt;">1.点击右面的复选框,勾选要处理的申请;<br/>2.“设为已处理”将忽略此申请;“邀请”将向该申请邮箱发送邀请码(不会占用你的邀请名额);尽量不要一次勾选多个申请同时邀请,以免其中一个邮箱有问题而影响其他邮箱。<br/>3.请认真审核,仔细处理。优先考虑网络、硬盘条件较好以及经验丰富的用户加入。<br/></div></td></tr></tbody></table>
<table border="1" cellspacing="0" cellpadding="5" align="center" width="1100"><tbody><tr>
<form method=post action=viewinvitebox.php>
<td class="colhead">欲申请用户名</td>
<td class="colhead">IP地址</td>