Example #1
0
function registerPushUser()
{
    global $pushAPIKey;
    global $cookiefile;
    global $pushUsername;
    global $pushPassword;
    /********************************** REGISTER NEW USER FOR PUSH **********************************/
    $url = 'https://api.cloud.appcelerator.com/v1/users/create.json?key=' . $pushAPIKey;
    $params = "username="******"&first_name=" . $pushUsername . "&last_name=" . $pushUsername . "&password="******"&password_confirmation=" . $pushPassword;
    $response = checkcURL(0, $url, $params, 1, $cookiefile);
    loginPushNotification();
}
Example #2
0
    $cbfn = $_REQUEST['callbackfn'];
    $_SESSION['noguestmode'] = '1';
}
if ($action == 'endcall') {
    if (!empty($chatroommode)) {
        sendChatroomMessage($to, 'CC^CONTROL_BROADCAST_END_CHATROOM_CALL', 0);
    } else {
        sendMessage($to, 'CC^CONTROL_PLUGIN_BROADCAST_ENDCALL_' . $grp, 2);
        incrementCallback();
        sendMessage($to, 'CC^CONTROL_PLUGIN_BROADCAST_ENDCALL_' . $grp, 1);
    }
}
if ($p_ < 4) {
    exit;
}
if (!checkcURL() && $videoPluginType == '2') {
    echo "<div style='background:white;'>Please contact your site administrator to configure this plugin.</div>";
    exit;
}
if ($videoPluginType == '2') {
    if ($opentokApiSecret == '' || $opentokApiKey == '' || !file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'OpenTok' . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php')) {
        echo "<div style='background:white;'>The plugin has not been configured correctly. Please contact the site owner.</div>";
        exit;
    }
    include_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'OpenTok' . DIRECTORY_SEPARATOR . 'vendor/autoload.php';
    $apiKey = $opentokApiKey;
    $apiSecret = $opentokApiSecret;
    try {
        $apiObj = new OpenTok($apiKey, $apiSecret);
    } catch (Exception $e) {
        echo "<div style='background:white;padding:15px;'>Please ask your administrator to configure this plugin using administration panel.</div>";
Example #3
0
\t\t\t\t\talertelement.animate({height: '0'}, 200);
\t\t\t\t\talertelement.css('border-bottom','0px solid #333333');
\t\t\t\t});
\t\t\t}
\t\t};
\t})(\$);
</script>
EOD;
    unset($_SESSION['cometchat']['error']);
}
if (empty($_GET['process'])) {
    global $getstylesheet;
    include_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'config.php';
    $errorMsg = '';
    $innercontent = '"';
    if (!checkcURL()) {
        $errorMsg = "<h2 id='errormsg' style='font-size: 11px; color: rgb(255, 0, 0);'>cURL extension is disabled on your server. Please contact your webhost to enable it. cURL is required for Translate Conversations.</h2>";
        $innercontent = 'display:none;"';
    }
    echo <<<EOD
<!DOCTYPE html>

{$getstylesheet}
<style>
\t#alert {
\t\toverflow: hidden;
\t\twidth: 390px;
\t\ttext-align: center;
\t\tposition: fixed;
\t\ttop: 0;
\t\tleft: 0;
Example #4
0
            if ($user['email'] == $result['email']) {
                $flag = 0;
                break;
            }
            $flag++;
        }
        if ($flag != 0 && empty($chatroommode)) {
            $url = "https://api.zoom.us/v1/user/create";
            $params = "api_key=" . $zoomapplicationid . "&api_secret=" . $zoomappAuthSecret . "&data_type=JSON&email=" . $result['email'] . "&type=1";
            json_decode(checkcURL(0, $url, $params, 1), true);
            sendMessage($to, $avchat_language[27] . " " . $result['email'], 2);
        } else {
            if ($flag != 0 && !empty($chatroommode)) {
                $url = "//api.zoom.us/v1/user/create";
                $params = "api_key=" . $zoomapplicationid . "&api_secret=" . $zoomappAuthSecret . "&data_type=JSON&email=" . $result['email'] . "&type=1";
                json_decode(checkcURL(0, $url, $params, 1), true);
                $alertmessage = 1;
                $useremailid = $result['email'];
            }
        }
    }
    if (!empty($chatroommode)) {
        echo $alertmessage . '^' . $useremailid;
    }
}
function configCheck()
{
    global $to;
    $errorFlag = 0;
    if (!empty($to)) {
        global $connectUrl, $applicationid, $appAuthSecret, $zoomapplicationid, $zoomappAuthSecret, $videoPluginType, $opentokApiSecret, $opentokApiKey, $avchat_language;
Example #5
0
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
include_once dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . "modules.php";
include_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "lang" . DIRECTORY_SEPARATOR . "en.php";
if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lang" . DIRECTORY_SEPARATOR . $lang . ".php")) {
    include_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "lang" . DIRECTORY_SEPARATOR . $lang . ".php";
}
include_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'translate.php';
if (!checkcURL(1)) {
    echo "<div style='background:white;'>Please ask your webhost to install libcurl for PHP and configure it for HTTPs as well</div>";
    exit;
}
if (empty($bingClientID) && empty($googleKey)) {
    echo "<div style='background:white;'>Please configure this module using CometChat Administration Panel.</div>";
    exit;
}
$translatingtext = '';
if (!empty($_COOKIE[$cookiePrefix . 'lang'])) {
    $translatingtext = '<div class="current">' . $realtimetranslate_language[1] . strtoupper($_COOKIE[$cookiePrefix . 'lang']) . ' | <a href="javascript:void(0);" onclick="javascript:stoptranslating()">' . $realtimetranslate_language[2] . '</a></div>';
}
$languagescode = '';
if ($useGoogle == 0) {
    $languages = translate_languages();
    foreach ($languages as $code => $name) {
function configCheck()
{
    $errorFlag = 0;
    if (!empty($to)) {
        global $connectUrl, $applicationid, $appAuthSecret, $zoomapplicationid, $zoomappAuthSecret, $videoPluginType;
        $error = $avchat_language[47];
        switch ($videoPluginType) {
            case '1':
            case '2':
                if ($connectUrl === '') {
                    $errorFlag = 1;
                }
                break;
            case '3':
                if (!checkcURL()) {
                    $errorFlag = 1;
                }
            case '4':
                if ($applicationid === '' || $appAuthSecret === '') {
                    $errorFlag = 1;
                }
                break;
            case '5':
                if ($zoomapplicationid === '' || $zoomappAuthSecret === '') {
                    $errorFlag = 1;
                }
                break;
        }
        if ($errorFlag) {
            sendMessage($to, $error, 2);
            exit;
        }
    }
}