Exemplo n.º 1
0
/**
 * Function used to display flag type
 */
function flag_type($id)
{
    $flag_opts = get_flag_options();
    return $flag_opts[$id];
}
Exemplo n.º 2
0
     break;
 case "getConfigs":
 case "get_configs":
 case "configs":
     $upload_path = '';
     if (function_exists('get_file_uploader_path')) {
         $upload_path = get_file_uploader_path();
     }
     $array = array('baseurl' => BASEURL, 'title' => TITLE, 'file_upload_url' => BASEURL . '/api/file_uploader.php', 'session' => session_id());
     echo json_encode($array);
     break;
 case "videoFlagOptions":
 case "video_flag_options":
     $type = $request['type'];
     $type = $type ? $type : 'v';
     $flags = get_flag_options($type);
     echo json_encode($flags);
     break;
 case "getSubscribers":
     $uid = $request['userid'];
     if (!$uid) {
         $uid = userid();
     }
     if (!$uid) {
         exit(json_encode(array('err' => lang('Please login'))));
     }
     $subscribers = $userquery->get_user_subscribers_detail($uid);
     if ($subscribers) {
         $the_subscribers = array();
         foreach ($subscribers as $subscriber) {
             foreach ($blacklist_fields as $field) {
Exemplo n.º 3
0
 private function videoFlagOptions()
 {
     $request = $_REQUEST;
     $type = $request['type'];
     $type = $type ? $type : 'v';
     $flags = get_flag_options($type);
     //echo json_encode($flags);
     $data = array('code' => "200", 'status' => "success", "msg" => "Success", "data" => $flags);
     $this->response($this->json($data));
 }
    function content_55e4485e971fb3_11738153($_smarty_tpl)
    {
        ?>
<!-- Flag This <?php 
        echo $_smarty_tpl->tpl_vars['type']->value;
        ?>
 -->
<div id="flag_item" class="action_box" >
    <div class="form_container">
        <div class="form_result" id="flag_form_result" ></div>

        <form id="flag_form" name="flag_form"  method="post" action="#">
            <div class="alert alert-info">
                <?php 
        echo sprintf(lang("Please select the category that most closely reflects your concern about the %s, so that we can review it and determine whether it violates our Community Guidelines or isn't appropriate for all viewers. Abusing this feature is also a violation of the Community Guidelines, so don't do it."), $_smarty_tpl->tpl_vars['params']->value['type']);
        ?>

            </div>
            <?php 
        if (isset($_smarty_tpl->tpl_vars['flag_options'])) {
            $_smarty_tpl->tpl_vars['flag_options'] = clone $_smarty_tpl->tpl_vars['flag_options'];
            $_smarty_tpl->tpl_vars['flag_options']->value = get_flag_options($_smarty_tpl->tpl_vars['type']->value);
            $_smarty_tpl->tpl_vars['flag_options']->nocache = null;
            $_smarty_tpl->tpl_vars['flag_options']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['flag_options'] = new Smarty_variable(get_flag_options($_smarty_tpl->tpl_vars['type']->value), null, 0);
        }
        ?>

            <div class="form-group mtm mbm">
                <label for="flag_type"><?php 
        echo lang("Choose a category");
        ?>
</label>
                <select class="form-control" name="flag_type" id="flag_type">
                    <?php 
        $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['item']->_loop = false;
        $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['flag_options']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
            $_smarty_tpl->tpl_vars['item']->_loop = true;
            $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['item']->key;
            ?>
                    <option value="<?php 
            echo $_smarty_tpl->tpl_vars['key']->value;
            ?>
"><?php 
            echo $_smarty_tpl->tpl_vars['item']->value;
            ?>
</option>
                    <?php 
        }
        ?>
                </select>
            </div>
            <input type="button" name="send_content" value="<?php 
        echo sprintf(lang("Flag this %s"), $_smarty_tpl->tpl_vars['params']->value['type']);
        ?>
" class="btn btn-primary" onclick="flag_object('flag_form','<?php 
        echo $_smarty_tpl->tpl_vars['params']->value['id'];
        ?>
','<?php 
        echo $_smarty_tpl->tpl_vars['params']->value['type'];
        ?>
')"/>
        </form>
    </div>
</div>
<!-- Flag This <?php 
        echo $_smarty_tpl->tpl_vars['type']->value;
        ?>
 -->
<?php 
    }