Пример #1
0
        include dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . AC_FOLDER_CACHE . DIRECTORY_SEPARATOR . 'data_admin_options.php';
        $result = $db->execute("\n\t\t\t\tUPDATE arrowchat_status \n\t\t\t\tSET announcement='1'\n\t\t\t");
        if ($result) {
            $msg = "The chat announcement is now hidden.";
            if ($push_on == 1) {
                $arrowpush->publish(array('channel' => 'arrowchat', 'message' => array('announcement' => array("data" => "", "read" => "1"))));
            }
        } else {
            $error = "There was a database error.  Please try again.";
        }
    } else {
        $error = "There was a database error.  Please try again.";
    }
}
// Announcement Show Processor
if (var_check('announcement_show')) {
    $result = $db->execute("\n\t\t\tUPDATE arrowchat_config \n\t\t\tSET config_value = CASE \n\t\t\t\tWHEN config_name = 'announcement' THEN '" . get_var('announcement') . "'\n\t\t\tEND WHERE config_name IN ('announcement')\n\t\t");
    if ($result) {
        update_config_file();
        include dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . AC_FOLDER_CACHE . DIRECTORY_SEPARATOR . 'data_admin_options.php';
        $result = $db->execute("\n\t\t\t\tUPDATE arrowchat_status \n\t\t\t\tSET announcement='0'\n\t\t\t");
        if ($result) {
            $msg = "The chat announcement is now being shown.";
            if ($push_on == 1) {
                $arrowpush->publish(array('channel' => 'arrowchat', 'message' => array('announcement' => array("data" => $_POST['announcement'], "read" => "0"))));
            }
        } else {
            $error = "There was a database error.  Please try again.";
        }
    } else {
        $error = "There was a database error.  Please try again.";
Пример #2
0
			  "is_admin" tinyint(1) unsigned NOT NULL default \'0\',
			  "hash_id" varchar(20) NOT NULL,
			  PRIMARY KEY  ("userid"),
			  KEY "hash_id" ("hash_id"),
			  KEY "session_time" ("session_time")
			)
		');
    if ($result && $result2 && $result3) {
        update_config_file();
        $msg = "The repair has been successfully completed";
    }
}
$row = $db->fetch_row("\n\t\tSELECT email \n\t\tFROM arrowchat_admin\n\t");
$admin_email = $row->email;
// Admin Settings Submit Processor
if (var_check('admin_submit')) {
    $admin_new_password = get_var('admin_new_password');
    $admin_confirm_password = get_var('admin_confirm_password');
    $admin_email = get_var('admin_email');
    $admin_old_password = get_var('admin_old_password');
    if (!empty($admin_new_password) or !empty($admin_confirm_password)) {
        if ($admin_new_password != $admin_confirm_password) {
            $error = "Your new password and confirmation passwords do not match.";
        }
        if (!empty($admin_new_password) and empty($admin_confirm_password)) {
            $error = "You must supply a confirmation password.";
        }
        if (empty($admin_new_password) and !empty($admin_confirm_password)) {
            $error = "You must supply a new password.";
        }
    }
<?php

require_once "../inc/start.php";
if (var_check($_POST['id']) && var_check($_POST['caption_block_value']) && var_check($_POST['caption_block_start'])) {
    if (!var_check($_POST['id'])) {
        die($error_no_id['value']);
    }
    $id = $_POST['id'];
    $cue = array("start" => $_POST['caption_block_start'], "value" => $_POST['caption_block_value']);
    $video = new Youtube($id);
    echo $video->update_asr_cue($cue);
    return True;
}
Пример #4
0
}
?>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<?php 
if ($page == "index.php") {
    ?>
<script src="assets/js/index.js"></script>
<?php 
} elseif ($page == "go.php") {
    ?>
<script src="assets/js/script.js"></script>
<?php 
}
?>
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-22770104-6', 'auto');
  <?php 
if ($gaid = var_check($_GET['id'], True)) {
    echo "ga('set', 'YOUTUBE_ID', '" . $gaid . "');\n";
}
?>
  ga('send', 'pageview');
</script>
Пример #5
0
 $i = 1;
 // Mark user as no longer idle on load
 if ($status == "away" || $status == "busy") {
     $db->execute("\n\t\t\t\tUPDATE arrowchat_status \n\t\t\t\tSET status = 'available' \n\t\t\t\tWHERE userid = '" . $db->escape_string($userid) . "'\n\t\t\t");
     $status = "available";
 }
 // Show bar if hide bar is disabled
 if ($hide_bar_on != 1) {
     $hide_bar = 0;
 }
 // Show chat bar regardless of maintenance if user is admin
 if ($is_admin == 1 and $admin_view_maintenance == 1) {
     $chat_maintenance = 0;
 }
 // Load another language if lang GET value is set and exists
 if (var_check('lang')) {
     $lang = get_var('lang');
     if (preg_match("#^[a-z]{2,20}\$#i", $lang)) {
         if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_LANGUAGE . DIRECTORY_SEPARATOR . $lang . DIRECTORY_SEPARATOR . $lang . ".php")) {
             include dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_LANGUAGE . DIRECTORY_SEPARATOR . $lang . DIRECTORY_SEPARATOR . $lang . ".php";
         }
     }
 }
 // Get the language
 for ($i = 0; $i < count($language); $i++) {
     $settings .= 'lang[' . $i . '] = "' . $language[$i] . '";';
 }
 // Get the bar links
 for ($i = 0; $i < count($trayicon); $i++) {
     $settings .= "barLinks[" . $i . "] = ['" . implode("', '", $trayicon[$i]) . "'];";
 }
Пример #6
0
        $guest_name_change = get_var('guest_name_change');
        $guest_name_duplicates = get_var('guest_name_duplicates');
        $guests_chat_with = get_var('guests_chat_with');
        $users_chat_with = get_var('users_chat_with');
        $show_full_username = get_var('show_full_username');
        $us_time = get_var('us_time');
        $hide_admins_buddylist = get_var('hide_admins_buddylist');
        update_config_file();
        include_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . AC_FOLDER_CACHE . DIRECTORY_SEPARATOR . 'data_admin_options.php';
        $msg = "Your settings were successfully saved.";
    } else {
        $error = "There was a database error.  Please try again.";
    }
}
// Chat Style Submit Processor
if (var_check('chatstyle_submit')) {
    if (!is_numeric(get_var('width_applications')) or !is_numeric(get_var('width_buddy_list')) or !is_numeric(get_var('width_chatrooms'))) {
        $error = "You input a non numerical value for one of the widths.  Please enter a number only not including the px.";
    }
    if (empty($error)) {
        if (get_var('width_applications') > 200 or get_var('width_applications') < 16) {
            $error = "Your applications width is either above 200px or under 16px.  Please correct the value.";
        }
        if (get_var('width_buddy_list') > 200 or get_var('width_buddy_list') < 16) {
            $error = "Your buddy list width is either above 200px or under 16px.  Please correct the value.";
        }
        if (get_var('width_chatrooms') > 200 or get_var('width_chatrooms') < 16) {
            $error = "Your chatrooms width is either above 200px or under 16px.  Please correct the value.";
        }
    }
    if (empty($error)) {
Пример #7
0
    if ($result and $db->count_select() > 0) {
        $error = "You may not delete a default theme.";
    }
    if (empty($error)) {
        $db->execute("\n\t\t\t\tUPDATE arrowchat_status \n\t\t\t\tSET theme = NULL \n\t\t\t\tWHERE theme = '" . get_var('delete') . "'\n\t\t\t");
        $result = $db->execute("\n\t\t\t\tDELETE FROM arrowchat_themes \n\t\t\t\tWHERE id = '" . get_var('delete') . "'\n\t\t\t");
        update_config_file();
        if ($result) {
            $msg = "Your theme was deleted successfully.";
        } else {
            $error = "There was a database error.  Please try again.";
        }
    }
}
// Save Template Processor
if (var_check('save_template_submit')) {
    if (file_exists(get_var('template_file')) and is_writable(get_var('template_file'))) {
        $template_data = str_replace("\\r\\n", "\n", get_var('template_data'));
        $fh = @fopen(get_var('template_file'), 'w');
        fwrite($fh, stripslashes($template_data));
        fclose($fh);
        $msg = "The file was been updated successfully.";
    } else {
        $error = "The file does not exist or is not writable.";
    }
}
$smarty->assign('msg', $msg);
$smarty->assign('error', $error);
$smarty->display(dirname(__FILE__) . DIRECTORY_SEPARATOR . "layout/pages_header.tpl");
require dirname(__FILE__) . DIRECTORY_SEPARATOR . "layout/pages_themes.php";
$smarty->display(dirname(__FILE__) . DIRECTORY_SEPARATOR . "layout/pages_footer.tpl");
Пример #8
0
    die($error_invalid_id['value']);
}
if (!var_check($_GET['type'])) {
    die($error_no_caption_format['value']);
}
$type = strtolower($_GET['type']);
if (!in_array($type, $caption_format)) {
    die($error_caption_format_not_exist['value']);
}
$edit = var_check($_GET['edit'], True);
$video = new Youtube($id);
$data = $video->get_asr_caption($edit);
if ($data == False) {
    die("No captions");
}
if (var_check($_GET['dl'])) {
    // Download it.
    header('Content-Transfer-Encoding: binary');
    if ($edit) {
        header(sprintf("Content-Disposition: attachment; filename=\"asr_%s_corrected.%s\"", $id, $type));
    } else {
        header(sprintf("Content-Disposition: attachment; filename=\"asr_%s.%s\"", $id, $type));
    }
}
switch ($type) {
    case "vtt":
        header("Content-Type: text/vtt");
        echo $video->convert_json_to_VTT($data);
        break;
    case "sbv":
        header("Content-Type: text/sbv");
Пример #9
0
            $result = $db->execute("\n\t\t\t\t\tSELECT ban_userid \n\t\t\t\t\tFROM arrowchat_banlist \n\t\t\t\t\tWHERE ban_userid = '" . $db->escape_string($row['report_about']) . "'\n\t\t\t\t");
            if ($result and $db->count_select() > 0) {
                // Ban already exists
            } else {
                $db->execute("\n\t\t\t\t\t\tINSERT INTO arrowchat_banlist (\n\t\t\t\t\t\t\tban_userid,\n\t\t\t\t\t\t\tbanned_by,\n\t\t\t\t\t\t\tbanned_time\n\t\t\t\t\t\t) \n\t\t\t\t\t\tVALUES (\n\t\t\t\t\t\t\t'" . $db->escape_string($row['report_about']) . "',\n\t\t\t\t\t\t\t'" . $db->escape_string($userid) . "',\n\t\t\t\t\t\t\t'" . $db->escape_string(time()) . "'\n\t\t\t\t\t\t)\n\t\t\t\t\t");
                require_once dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . AC_FOLDER_ADMIN . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'functions' . DIRECTORY_SEPARATOR . 'functions_update.php';
                update_config_file();
            }
        }
    }
    echo "1";
    close_session();
    exit(0);
}
// ######################## START POST WARN USER ########################
if (var_check('report_warn')) {
    if ($is_mod == 1 || $is_admin == 1) {
        $result = $db->execute("\n\t\t\t\tSELECT report_about\n\t\t\t\tFROM arrowchat_reports\n\t\t\t\tWHERE id = '" . $db->escape_string($report_warn) . "'\n\t\t\t");
        if ($row = $db->fetch_array($result)) {
            $result = $db->execute("\n\t\t\t\t\tSELECT id\n\t\t\t\t\tFROM arrowchat_warnings\n\t\t\t\t\tWHERE user_id = '" . $db->escape_string($row['report_about']) . "'\n\t\t\t\t\t\tAND warning_time > (" . time() . " - 86400)\n\t\t\t\t");
            if ($result and $db->count_select() > 0 and $report_warn_confirm != 1) {
                // User has been warned in the past 24 hours, let the reporter handler know that before processing
                echo "2";
                close_session();
                exit(0);
            } else {
                $db->execute("\n\t\t\t\t\t\tUPDATE arrowchat_reports\n\t\t\t\t\t\tSET completed_by = '" . $db->escape_string($userid) . "',\n\t\t\t\t\t\t\tcompleted_time = '" . $db->escape_string(time()) . "'\n\t\t\t\t\t\tWHERE report_about = '" . $db->escape_string($row['report_about']) . "'\n\t\t\t\t\t\t\tAND completed_time = 0\n\t\t\t\t\t");
                $db->execute("\n\t\t\t\t\t\tINSERT INTO arrowchat_warnings (\n\t\t\t\t\t\t\tuser_id,\n\t\t\t\t\t\t\twarn_reason,\n\t\t\t\t\t\t\twarned_by,\n\t\t\t\t\t\t\twarning_time,\n\t\t\t\t\t\t\tuser_read\n\t\t\t\t\t\t) \n\t\t\t\t\t\tVALUES (\n\t\t\t\t\t\t\t'" . $db->escape_string($row['report_about']) . "',\n\t\t\t\t\t\t\t'" . $db->escape_string($report_warn_reason) . "',\n\t\t\t\t\t\t\t'" . $db->escape_string($userid) . "',\n\t\t\t\t\t\t\t'" . $db->escape_string(time()) . "',\n\t\t\t\t\t\t\t'0'\n\t\t\t\t\t\t)\n\t\t\t\t\t");
                if ($push_on == 1) {
                    $arrowpush->publish(array('channel' => 'u' . $row['report_about'], 'message' => array('warning' => array("data" => $report_warn_reason, "read" => "0"))));
                }
Пример #10
0
<?php

$required = array("name" => "Name", "c_name" => "Contact Name (First, Middle Initial, Last)", "address1" => "Address", "city" => "City", "state" => "State", "zip" => "Zip", "p1" => "Phone", "p2" => "Phone", "p3" => "Phone", "pa1" => "Alternate Phone", "pa2" => "Alternate Phone", "pa3" => "Alternate Phone", "email" => "E-mail", "password" => "Password", "pwconfirm" => "Confirm Password", "pin" => "PIN");
foreach ($required as $field => $label) {
    if (!$_POST[$field]) {
        $err .= "{$label} is a required field <br>";
    }
}
if (!var_check2($tax, $ssn)) {
    $err .= "You must enter your Social Security Number or Federal Tax ID<br>";
}
if (!var_check($tax, $ssn)) {
    $err .= "Please only enter your Social Security Number <em>or</em> Federal Tax ID, not both<br>";
}
if (!check_email_address($email)) {
    $err .= "{$email} is not a valid email address <br>";
}
if (strlen($password) < 6) {
    $err .= "Your password must be at least 6 characters <br>";
}
if ($password != $pwconfirm) {
    $err .= "Your passwords must match <br>";
}
if (!eregi('^[0-9]+$', $pin)) {
    $err .= "Your PIN can only contain numbers <Br>";
}
if (strlen($pin) < 4) {
    $err .= "Your PIN must be 4 digits <br>";
}
if (char_check($ssn)) {
    $err .= "Your social security number can only contain numbers <Br>";
Пример #11
0
<?php

require_once "inc/start.php";
$title = Config::Get("index.title");
$description = Config::Get("index.description");
$keywords = Config::Get("index.keywords");
$error_message = var_check($_GET['error'], True);
$id = var_check($_GET['youtube-id'], True);
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
    <?php 
require_once "inc/head.php";
?>

    <body>
        <div class="wrapper">
            <?php 
require_once "inc/header.php";
if ($error_message) {
    echo '<div class="row"><div class="bg-danger col-md-offset-3 col-md-6 text-center"><span class="text-danger"><big><b>' . $error_message . '</b></big></span></div></div>';
    echo '<div class="row"><div class="col-md-12"><hr class="low-margin"/></div></div>';
}
?>
            <div class="row">
                <div class="col-md-offset-3 col-md-6 text-center">
                    <form role="form">
                        <div class="form-group row">
                            <label for="youtube-id"><p class="lead">It's so easy to get started and fix the automatic craptioning on YouTube videos.</p> 
                                                    <p class="lead">Why should I bother? Well unless they're corrected they don't provide accessibility outcomes for users who rely on good quality captioning.</p></label>
                            <input type="text" class="form-control input-lg text-center" id="youtube-id" placeholder="Simply paste the YouTube URL or Video ID here" name="youtube-id" value="<?php 
Пример #12
0
    $result = $db->execute("\n\t\t\tUPDATE arrowchat_status\n\t\t\tSET hide_bar = '" . get_var('hide_bar') . "',\n\t\t\t\tplay_sound = '" . get_var('play_sound') . "', \n\t\t\t\twindow_open = '" . get_var('window_open') . "', \n\t\t\t\tonly_names = '" . get_var('only_names') . "', \n\t\t\t\tannouncement = '" . get_var('announcement') . "', \n\t\t\t\tis_admin = '" . get_var('is_admin') . "',\n\t\t\t\tis_mod = '" . get_var('is_mod') . "'\n\t\t\tWHERE userid = '" . get_var('user_id') . "'\n\t\t");
    if ($result) {
        $hide_bar = get_var('hide_bar');
        $play_sound = get_var('play_sound');
        $window_open = get_var('window_open');
        $only_names = get_var('only_names');
        $announcement = get_var('announcement');
        $is_admin = get_var('is_admin');
        $is_mod = get_var('is_mod');
        if (empty($is_mod)) {
            $db->execute("\n\t\t\t\t\tUPDATE arrowchat_chatroom_users\n\t\t\t\t\tSET is_mod = '0'\n\t\t\t\t\tWHERE user_id = '" . get_var('user_id') . "'\n\t\t\t\t");
        }
        $msg = "User settings successfully saved.";
    } else {
        $error = "There was an error saving the user's settings.";
    }
}
// Delete Guest Name
if (var_check('guest_name')) {
    $db->execute("\n\t\t\tUPDATE arrowchat_status\n\t\t\tSET guest_name = NULL\n\t\t\tWHERE userid = '" . get_var('id') . "'\n\t\t");
    if ($result) {
        $msg = "The user's name was deleted.";
    } else {
        $error = "There was an error deleting the user's name.";
    }
}
$smarty->assign('msg', $msg);
$smarty->assign('error', $error);
$smarty->display(dirname(__FILE__) . DIRECTORY_SEPARATOR . "layout/pages_header.tpl");
require dirname(__FILE__) . DIRECTORY_SEPARATOR . "layout/pages_users.php";
$smarty->display(dirname(__FILE__) . DIRECTORY_SEPARATOR . "layout/pages_footer.tpl");
Пример #13
0
<?php

require_once "../inc/start.php";
if (!var_check($_GET['id'])) {
    die(json_encode($error_no_id));
}
$id = $_GET['id'];
if (!youtube_validate_id($id)) {
    die(json_encode($error_invalid_id));
}
$video = new Youtube($id);
$info = $video->retrieve_info();
if ($info == False) {
    die(json_encode(array("error" => True, "value" => $video->info['reason'])));
}
if ($video->has_asr_caption() == False) {
    die(json_encode($error_no_asr));
}
$data = array("error" => False, "title" => $info['title']);
echo json_encode($data);
Пример #14
0
    if ($result) {
        $group_disable_arrowchat = $group_disable_arrowchat_new;
        $group_disable_video = $group_disable_video_new;
        $group_disable_apps = $group_disable_apps_new;
        $group_disable_rooms = $group_disable_rooms_new;
        $group_disable_uploads = $group_disable_uploads_new;
        $group_disable_sending_private = $group_disable_sending_private_new;
        $group_disable_sending_rooms = $group_disable_sending_rooms_new;
        update_config_file();
        $msg = "Your settings were successfully saved.";
    } else {
        $error = "There was a database error.  Please try again.";
    }
}
// Group Permissions Settings Submit Processor
if (var_check('group_settings_submit')) {
    $result = $db->execute("\n\t\t\tUPDATE arrowchat_config \n\t\t\tSET config_value = CASE \n\t\t\t\tWHEN config_name = 'group_enable_mode' THEN '" . $db->escape_string(get_var('group_enable_mode')) . "'\n\t\t\tEND WHERE config_name IN ('group_enable_mode')\n\t\t");
    $result = $db->execute("\n\t\t\tUPDATE arrowchat_config \n\t\t\tSET config_value = CASE \n\t\t\t\tWHEN config_name = 'group_disable_arrowchat' THEN ''\n\t\t\t\tWHEN config_name = 'group_disable_video' THEN ''\n\t\t\t\tWHEN config_name = 'group_disable_apps' THEN ''\n\t\t\t\tWHEN config_name = 'group_disable_rooms' THEN ''\n\t\t\t\tWHEN config_name = 'group_disable_uploads' THEN ''\n\t\t\t\tWHEN config_name = 'group_disable_sending_private' THEN ''\n\t\t\t\tWHEN config_name = 'group_disable_sending_rooms' THEN ''\n\t\t\tEND WHERE config_name IN ('group_disable_arrowchat', 'group_disable_video', 'group_disable_apps', 'group_disable_rooms', 'group_disable_uploads', 'group_disable_sending_private', 'group_disable_sending_rooms')\n\t\t");
    if ($result) {
        $group_enable_mode = get_var('group_enable_mode');
        update_config_file();
        $msg = "Your settings were successfully saved.";
    } else {
        $error = "There was a database error.  Please try again.";
    }
}
$smarty->assign('msg', $msg);
$smarty->assign('error', $error);
$smarty->display(dirname(__FILE__) . DIRECTORY_SEPARATOR . "layout/pages_header.tpl");
require dirname(__FILE__) . DIRECTORY_SEPARATOR . "layout/pages_users.php";
$smarty->display(dirname(__FILE__) . DIRECTORY_SEPARATOR . "layout/pages_footer.tpl");
Пример #15
0
<?php

require_once "inc/start.php";
if (!var_check($_GET['id'])) {
    redirect("index.php?error=No+Video+ID");
}
$id = $_GET['id'];
if (!youtube_validate_id($id)) {
    redirect("index.php?error=Invalid+Video+ID");
}
$edit = var_check($_GET['edit']);
$video = new Youtube($id);
$info = $video->retrieve_info();
if ($info == False) {
    redirect("index.php?error=Video+Doesn%27t+Exist");
}
$title = format_string(Config::Get("go.title"), array("ID" => $id, "TITLE" => $info['title']));
$description = format_string(Config::Get("go.description"), array("ID" => $id, "TITLE" => $info['title']));
$keywords = format_string(Config::Get("go.keywords"), array("ID" => $id, "TITLE" => $info['title']));
$stream = $video->get_best_stream();
$caption_url = sprintf("ajax/get_caption.php?id=%s&type=vtt%s", $id, $edit ? "&edit=True" : "");
$caption = "<span class=\"text-success\"><b>Caption</b></span>";
$craption = "<span class=\"text-danger\"><b>Craption</b></span>";
$caption_type = $edit ? $caption : $craption;
#$button_go_craption = "<a href=\"go.php?id=".$id."&edit=True\" id=\"caption\" class=\"btn btn-default btn-block btn-success\" title=\"Edit this Craption\">Edit this Craption</a>";
#$button_go_edit = "<a href=\"go.php?id=".$id."\" id=\"caption\" class=\"btn btn-default btn-block btn-danger\" title=\"Take a look at the original Craption\">Take a look at the original Craption</a>";
?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
    <?php 
Пример #16
0
        echo "16";
    }
    ?>
" />
								<p class="explain">
									Sets the width of the bar link button to allow for text instead of just an icon.  Entering 16 will display the icon only. Default: 16
								</p>
							</dd>
						</dl>
						<dl class="selectionBox">
							<dt>
								<label for="link_tab_name">Button Name</label>
							</dt>
							<dd>
								<input type="text" id="link_tab_name" class="selectionText" name="link_tab_name" value="<?php 
    if (var_check('link_tab_name')) {
        echo get_var('link_tab_name');
    }
    ?>
" />
								<p class="explain">
									Sets the text for the bar link button to display next to the icon.  This will only display if the button width is wide enough to display the text.
								</p>
							</dd>
						</dl>
					</fieldset>
					<dl class="selectionBox submitBox">
						<dt></dt>
						<dd>
							<div class="floatr">
								<a class="fwdbutton" onclick="document.forms['add-bar-link'].submit(); return false">
Пример #17
0
					<script type="text/javascript">
						$(document).ready(function() {
							$("#template_data").tabby();
						});
					</script>
					<dl class="selectionBox">
						<dt>
							<label for="theme_edit">Theme to Edit</label>
						</dt>
						<dd>
							<select name="edit_theme" onChange="this.form.submit();">
<?php 
    if (!var_check('edit_theme')) {
        $_POST['edit_theme'] = "";
    }
    if (!var_check('edit_template')) {
        $_POST['edit_template'] = "";
    }
    $result = $db->execute("\n\t\tSELECT * \n\t\tFROM arrowchat_themes\n\t");
    while ($row = $db->fetch_array($result)) {
        ?>
									<option value="<?php 
        echo $row['folder'];
        ?>
" <?php 
        if (get_var('edit_theme') == $row['folder'] and !empty($_POST['edit_theme']) or empty($_POST['edit_theme']) and $row['default'] == 1) {
            echo "selected";
        }
        ?>
><?php 
        echo $row['name'];
Пример #18
0
 function convert_json_to_VTT($input)
 {
     // Convert from JSON to VTT format
     $output = "WEBVTT\n\n";
     foreach ($input as $cue) {
         $extra = var_check($cue['extra']);
         $end = $cue['start'] + $cue['dur'];
         $start_ms = str_pad(explode(".", $cue['start'])[1], 3, 0);
         $end_ms = str_pad(explode(".", $end)[1], 3, '0');
         $output .= sprintf($this->format_VTT_header, gmdate("H:i:s", $cue['start']), $start_ms, gmdate("H:i:s", $end), $end_ms, $extra, $cue['value']);
     }
     return $output;
 }
Пример #19
0
    if ($usernames) {
        foreach ($usernames as $unbans) {
            $result = $db->execute("\n\t\t\t\t\tDELETE FROM arrowchat_banlist \n\t\t\t\t\tWHERE ban_id = '" . $db->escape_string($unbans) . "'\n\t\t\t\t");
            if ($result) {
                $msg = "The Usernames were successfully unbaned.";
                update_config_file();
            } else {
                $error = "There was a database error";
            }
        }
    } else {
        $error = "You did not select any IPs";
    }
}
// User Edit Submit Processor
if (var_check('user_submit')) {
    $result = $db->execute("\n\t\t\tUPDATE arrowchat_status\n\t\t\tSET hide_bar = '" . get_var('hide_bar') . "',\n\t\t\t\tplay_sound = '" . get_var('play_sound') . "', \n\t\t\t\twindow_open = '" . get_var('window_open') . "', \n\t\t\t\tonly_names = '" . get_var('only_names') . "', \n\t\t\t\tannouncement = '" . get_var('announcement') . "', \n\t\t\t\tis_admin = '" . get_var('is_admin') . "'\n\t\t\tWHERE userid = '" . get_var('user_id') . "'\n\t\t");
    if ($result) {
        $hide_bar = get_var('hide_bar');
        $play_sound = get_var('play_sound');
        $window_open = get_var('window_open');
        $only_names = get_var('only_names');
        $announcement = get_var('announcement');
        $is_admin = get_var('is_admin');
        $msg = "User settings successfully saved.";
    } else {
        $error = "There was an error saving the user's settings.";
    }
}
$smarty->assign('msg', $msg);
$smarty->assign('error', $error);
Пример #20
0
if (var_check('delete') and $do == "notificationsettings") {
    if (empty($_GET['delete'])) {
        $error = "There was no notification ID to delete.";
    }
    if (empty($error)) {
        $result = $db->execute("\n\t\t\t\tDELETE FROM arrowchat_notifications_markup \n\t\t\t\tWHERE id = '" . get_var('delete') . "'\n\t\t\t");
        if ($result) {
            $msg = "Your notification was deleted successfully.  You should delete the mySQL query when this action is called to avoid unnecessary database calls.";
            update_config_file();
        } else {
            $error = "There was a database error.  Please try again.";
        }
    }
}
// Edit Notifications Processor
if (var_check('notification_edit_submit')) {
    if (empty($_POST['edit_notification_name'])) {
        $error = "You must enter a name for this notification.";
    }
    if (empty($_POST['edit_notification_markup'])) {
        $error = "You must enter markup for this notification.";
    }
    if (empty($error)) {
        $markup_data = str_replace("\\r\\n", "\n", get_var('edit_notification_markup'));
        $result = $db->execute("\n\t\t\t\tUPDATE arrowchat_notifications_markup \n\t\t\t\tSET name = '" . get_var('edit_notification_name') . "', \n\t\t\t\t\tmarkup = '" . stripslashes($markup_data) . "' \n\t\t\t\tWHERE id = '" . get_var('notification_id') . "'\n\t\t\t");
        if ($result) {
            $msg = "Your notification was updated successfully.";
        } else {
            $error = "There was a database error.  Please try again.";
        }
    }
|| #################################################################### ||
*/
// ########################## INCLUDE BACK-END ###########################
require_once dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'bootstrap.php';
require_once dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . AC_FOLDER_INCLUDES . DIRECTORY_SEPARATOR . 'init.php';
// ########################### INITILIZATION #############################
$response = array();
$messages = array();
$buddyList = array();
$time = time();
if (var_check('popout')) {
    $popout = true;
} else {
    $popout = false;
}
if (var_check('mobile')) {
    if ($status != 'busy') {
        $db->execute("\n\t\t\t\tUPDATE arrowchat_status \n\t\t\t\tSET status = 'busy' \n\t\t\t\tWHERE userid = '" . $db->escape_string($userid) . "'\n\t\t\t");
    }
}
// ###################### START BUDDY LIST RECEIVE #######################
if (logged_in($userid)) {
    // Refresh the user's session
    updateUserSession();
    if ($disable_buddy_list == 1 or check_if_guest($userid) or NO_FREIND_SYSTEM == 1 or $is_admin == 1 and $admin_chat_all == 1 or $is_mod == 1 and $admin_chat_all == 1) {
        $sql = get_online_list($userid, $time);
    } else {
        $sql = get_friend_list($userid, $time);
    }
    $result = $db->execute($sql);
    while ($chat = $db->fetch_array($result)) {
|| # ---------------------------------------------------------------- # ||
|| #    Copyright ©2010-2012 ArrowSuites LLC. All Rights Reserved.    # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- ARROWCHAT IS NOT FREE SOFTWARE ---------------- # ||
|| #   http://www.arrowchat.com | http://www.arrowchat.com/license/   # ||
|| #################################################################### ||
*/
// ########################## INCLUDE BACK-END ###########################
require_once dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'bootstrap.php';
require_once dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . AC_FOLDER_INCLUDES . DIRECTORY_SEPARATOR . 'init.php';
// ########################### INITILIZATION #############################
$response = array();
$messages = array();
$buddyList = array();
$time = time();
if (var_check('popout')) {
    $popout = true;
} else {
    $popout = false;
}
// ###################### START BUDDY LIST RECEIVE #######################
if (logged_in($userid)) {
    // Refresh the user's session
    updateUserSession();
    if ($disable_buddy_list == 1 or check_if_guest($userid) or NO_FREIND_SYSTEM == 1 or $is_admin == 1 and $admin_chat_all == 1) {
        $sql = get_online_list($userid, $time);
    } else {
        $sql = get_friend_list($userid, $time);
    }
    $result = $db->execute($sql);
    while ($chat = $db->fetch_array($result)) {
Пример #23
0
				<div class="module_content">
					<div id="container" style="width: 100%; height: 300px; margin-bottom: 15px;"></div>
				</div>
			</div>
			
      <div class="title_bg" id="content-recent"> 
            <div class="title">Recent Chat</div> 
            <div class="module_content">          
		<?php 
$numrows = $db->count_all("\n\t\t\t\tarrowchat\n\t\t\t");
$pagenum = 1;
$self = $_SERVER['PHP_SELF'];
$nav = 'Page ';
$maxpage = 10;
$total_pages = ceil($numrows / $maxpage);
if (var_check('page')) {
    $pagenum = get_var('page');
}
for ($i = 1; $i <= $total_pages; $i++) {
    if ($i == $pagenum) {
        $nav .= " {$i} ";
    } else {
        if ($i <= 5) {
            $nav .= " <a href=\"{$self}?page={$i}\">" . floor($i) . "</a> ";
        }
    }
}
$offset = ($pagenum - 1) * $maxpage;
$result = $db->execute("\n\t\t\t\tSELECT * \n\t\t\t\tFROM arrowchat \n\t\t\t\tORDER BY id DESC \n\t\t\t\tLIMIT " . $db->escape_string($offset) . ", " . $db->escape_string($maxpage) . "\n\t\t\t");
if ($result and $db->count_select() > 0) {
    ?>
Пример #24
0
$smarty = new Smarty();
// Fix undefined variables notices
$error = NULL;
$applications_have_update = NULL;
$applications_update_count = NULL;
$msg = NULL;
$arrowchat_has_update = false;
$themes_have_update = false;
$themes_update_count = 0;
if (empty($_GET['do'])) {
    $_GET['do'] = NULL;
}
// Get do variable
$do = get_var('do');
// Admin Login
if (var_check('login')) {
    $error = admin_login(get_var('username'), get_var('password'));
}
// Admin logout
if ($do == "logout") {
    admin_logout();
}
$smarty->assign('username_post', htmlspecialchars(get_var('username')));
$smarty->assign('password_post', htmlspecialchars(get_var('password')));
$smarty->assign('login_post', get_var('login'));
// Check if logged in as admin
admin_check_login($error);
//session_write_close();
// Various admin checks
$result = $db->execute("\n\t\tSELECT arrowchat_themes.folder \n\t\tFROM arrowchat_themes\n\t\tWHERE arrowchat_themes.default = 1\n\t");
$row = $db->fetch_array($result);
Пример #25
0
            $block_chat_array = array();
        }
    } else {
        $block_chat_array = array();
    }
    foreach ($block_chat_array as $key => $value) {
        if ($unblock_chat == $value) {
            unset($block_chat_array[$key]);
        }
    }
    $block_chat_serialized = serialize($block_chat_array);
    $db->execute("\n\t\t\tUPDATE arrowchat_status \n\t\t\tSET block_chats = '" . $db->escape_string($block_chat_serialized) . "' \n\t\t\tWHERE userid = '" . $db->escape_string($userid) . "'\n\t\t");
    echo "1";
    close_session();
    exit(0);
}
// ################# START UNBLOCK CHAT ##################
if (var_check('app_keep')) {
    if ($app_keep == "-1") {
        $app_keep = "0";
    }
    if (!is_numeric($app_keep)) {
        echo "-1";
        close_session();
        exit(0);
    }
    $db->execute("\n\t\t\tUPDATE arrowchat_status \n\t\t\tSET apps_open = '" . $db->escape_string($app_keep) . "' \n\t\t\tWHERE userid = '" . $db->escape_string($userid) . "'\n\t\t");
    echo "1";
    close_session();
    exit(0);
}