Beispiel #1
0
    //$ouv = @$_POST['ouv']=='true'? true : false;
    //$hf = @$_POST['hf']=='true'? true : false;
    $scode = @$_POST['shortcode'];
    $opt = @$_POST;
    if ($surl->update_opt($scode, $opt) === true) {
        $data["status"] = true;
        $data["msg"] = "Save Successful";
        //$data['thepost'] = $_POST['country_not_on_list'];
    } else {
        $data["status"] = false;
        $data["msg"] = "Save failed try again";
    }
    echo json_encode($data);
}
/* URL DETAILS GET STATS */
if (isset($_GET['details'])) {
    $d_act = $_GET['details'];
    //CBC click by Country | CBO click by os
    $Stats = new StatsUrl($_POST['sc']);
    if ($d_act == 'CBC') {
    } else {
        if ($d_act == 'CBO') {
            $data['cols'] = array(array("id" => 'os', 'label' => 'Platforms', 'type' => 'string'), array("id" => 'click', 'label' => 'Click', 'type' => 'number'), array("id" => 'click', 'label' => 'Click', 'type' => 'string', 'role' => 'style'));
            $data['rows'] = array();
            foreach ($Stats->ClickByOs() as $key => $out) {
                array_push($data['rows'], array('c' => array(array('v' => $key), array('v' => $out))));
            }
            print json_encode($data);
        }
    }
}
<?php

$short_code = @$_GET['s_c'];
$Link = new Link($short_code);
$Details = new StatsUrl($short_code);
?>

<div class="main-item">
  <?php 
if ($Link->getLongUrl()) {
    ?>
  <div id="url_details_header" class="d_box">
    <div class="track_url">
      <input readonly="readonly" value="<?php 
    echo SITE_URL . $short_code;
    ?>
" onclick="$(this).select()" />
      <span> <b>ctrl+c</b> kalau mo kopi</span> </div>
    <div class="long_url">
      <div>
        <?php 
    echo $Link->getLongUrl();
    ?>
      </div>
    </div>
  </div>
  <?php 
    if (user::loggedin()) {
        ?>
  <div class="d_box track_url_settings" style="margin-top:5px;">
        <form method="post">