Ejemplo n.º 1
0
                                <th>
                                    <div class="checkbox">
                                        <input id="checkbox1" type="checkbox" data-check-all>
                                        <label for="checkbox1"></label>
                                    </div>
                                </th>
                                <th>URL</th>
                                <th>Shared By</th>
                                <th>Date &amp; Time</th>
                            </tr>
                            </thead>
                            <tbody>
                                <?php 
if (re_db_num_rows($res_banner) > 0) {
    $i = 0;
    while ($row_banner = re_db_fetch_array($res_banner)) {
        $i++;
        ?>
                                        <tr>
                                            <td>
                                                <div class="checkbox">
                                                    <input id="checkbox2" type="checkbox" />
                                                    <label for="checkbox2"></label>
                                                </div>
                                            </td>
                                            <td><?php 
        echo re_db_output($row_banner['url']);
        ?>
</td>
                                            <td><?php 
        echo "<a href='user_profile_data.php?mid=" . $row_banner['memb_id'] . "' target='_blank'>" . re_db_output($row_banner['uname']) . "</a>";
Ejemplo n.º 2
0
        if (($btn_style == "1" || $btn_style == "2") && $social_rec['short_name'] == "li") {
            $img_div .= '<img style="float: left; margin-right: 5px; " src="' . SITE_URL . 'img/social_icon/' . $social_rec['short_name'] . '_share_icon_' . $counter_type . '.jpg" alt="" title="" />';
        } else {
            $img_div .= '<img style="float: left; margin-right: 5px; " src="' . SITE_URL . 'img/social_icon/' . $social_rec['short_name'] . '_share_btn_' . $counter_type . '.jpg" alt="" title="" />';
        }
        $social_div .= '<div style="margin-bottom: 5px;">
                            <input type="checkbox" name="share_button[' . $i . ']" id="share_button_' . $i . '" value="' . $val . '" checked="checked" onclick="call_manage_display()" />&nbsp;&nbsp;' . $social_rec['social_name'] . '
                            <span style="float: right;">
                                <a href="javascript:void(0);" onclick="call_ordering(\'' . $i . '\',\'up\')">up</a>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="call_ordering(\'' . $i . '\',\'down\')">down</a>
                            </span>
                            <input type="hidden" name="short_order[' . $i . ']" id="short_order_' . $i . '" value="' . $i . '" /> 
                        </div>';
    }
}
$social_sql = re_db_query("select * from cs_social_network_master where social_id not in ('" . implode("','", $new_social_arr) . "') and is_display='1'");
if (re_db_num_rows($social_sql) > 0) {
    while ($social_rec = re_db_fetch_array($social_sql)) {
        $i++;
        $social_div .= '<div style="margin-bottom: 5px;">
                            <input type="checkbox" name="share_button[' . $i . ']" id="share_button_' . $i . '" value="' . $social_rec['social_id'] . '" onclick="call_manage_display()" />&nbsp;&nbsp;' . $social_rec['social_name'] . '
                            <span style="float: right;">
                                <a href="javascript:void(0);" onclick="call_ordering(\'' . $i . '\',\'up\')">up</a>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="call_ordering(\'' . $i . '\',\'down\')">down</a>
                            </span>
                            <input type="hidden" name="short_order[' . $i . ']" id="short_order_' . $i . '" value="' . $i . '" /> 
                        </div>';
    }
}
$social_div .= '<input type="hidden" name="odr_id" id="odr_id" value="" />
                <input type="hidden" name="odr_type" id="odr_type" value="" />
                <input type="hidden" name="total_social" id="total_social" value="4" />';
echo $img_div . '~!##!~' . $social_div;
Ejemplo n.º 3
0
<?php

include "include/config.php";
$sel = "select id,likes,client_id from cs_users cs join (select member_id,likes from cs_fb_share_users where likes!='' ) as cu on cu.member_id=cs.id where cs.is_fb='1'";
$res_sel = re_db_query($sel);
while ($row_sel = re_db_fetch_array($res_sel)) {
    $likes = explode(",", $row_sel['likes']);
    foreach ($likes as $key => $val) {
        if ($val != '') {
            re_db_query("insert into cs_member_pages_like (member_id,page_id,client_id) values ('" . mysql_real_escape_string($row_sel['id']) . "',(select id from cs_like_pages where page_title='" . mysql_real_escape_string($val) . "'),'" . $row_sel['client_id'] . "')");
        }
    }
}
exit("Dilip it is all over");
Ejemplo n.º 4
0
        }
        $disabled = "";
    }
    if (count($error) <= 0) {
        $u_update = "update cs_sites set \n                    icon_size='" . $icon_size . "', \n                    req_custom='" . $req_custom . "', \n                    custom_icon_size='" . $custom_icon_size . "' \n                    where id='" . $_SESSION['admin_id'] . "'";
        re_db_query($u_update);
        $_SESSION['msg'] = "update";
        header("location:social_icon_setting.php");
        exit;
    }
}
if (!isset($_POST['update'])) {
    $site_data_qry = "select * from cs_sites where id='" . $_SESSION['admin_id'] . "'";
    $site_data_sql = re_db_query($site_data_qry);
    if (re_db_num_rows($site_data_sql) > 0) {
        $site_data_rec = re_db_fetch_array($site_data_sql);
        $icon_size = $site_data_rec['icon_size'];
        $req_custom = $site_data_rec['req_custom'];
        $custom_icon_size = $site_data_rec['custom_icon_size'];
        $is_size_approved = $site_data_rec['is_size_approved'];
        if ($req_custom == "1") {
            $custom_icon_size_arr = explode('x', $custom_icon_size);
            $icon_w = $custom_icon_size_arr[0];
            $icon_h = $custom_icon_size_arr[1];
            $disabled = "";
        }
    }
}
if (isset($_SESSION['msg']) && $_SESSION['msg'] == "update") {
    $msg = "Change Saved Successfully.";
    unset($_SESSION['msg']);
Ejemplo n.º 5
0
function manage_fb_page($fb_page_title, $fb_page_id, $member_id, $client_id, $total_likes)
{
    $select_all = "select * from `cs_like_pages` where page_title='" . mysql_real_escape_string($fb_page_title) . "'";
    $res_like = re_db_query($select_all);
    if (re_db_num_rows($res_like) > 0) {
        $row_page = re_db_fetch_array($res_like);
        re_db_query("update cs_like_pages set fb_page_id='" . $fb_page_id . "',total_likes='" . $total_likes . "' where id='" . $row_page['id'] . "'");
        $user_entry = re_db_query("select id from `cs_member_pages_like` where page_id='" . $row_page['id'] . "' and client_id='" . $client_id . "' and member_id='" . $member_id . "'");
        if (re_db_num_rows($user_entry) <= 0) {
            $insert_user = "******" . $row_page['id'] . "',member_id='" . $member_id . "',client_id='" . $client_id . "'";
            re_db_query($insert_user);
        }
    } else {
        $insert_cs = re_db_query("insert into cs_like_pages set page_title='" . mysql_real_escape_string($fb_page_title) . "',fb_page_id='" . $fb_page_id . "',total_likes='" . $total_likes . "'");
        $last_page_id = mysql_insert_id();
        $insert_user = "******" . $last_page_id . "',member_id='" . $member_id . "',client_id='" . $client_id . "'";
        re_db_query($insert_user);
    }
}
Ejemplo n.º 6
0
    case '1':
        header('Access-Control-Allow-Origin: http://www.coupay.co.in');
        break;
    case '4':
        header('Access-Control-Allow-Origin: http://www.soclever.net');
        break;
    case '5':
        header('Access-Control-Allow-Origin: http://www.coupay.com');
        break;
}
include "include/config.php";
if (isset($_GET['like_url']) && $_GET['like_url'] != '') {
    $select_url = "select id,is_dislike from cs_like_unlike where client_id='" . mysql_real_escape_string($_GET['site_id']) . "' and url='" . mysql_real_escape_string($_GET['like_url']) . "'";
    $res_sel = re_db_query($select_url);
    if (re_db_num_rows($res_sel) > 0) {
        $row_like = re_db_fetch_array($res_sel);
        if ($_GET['is_like'] == '0') {
            $set_query = ' is_dislike=is_dislike+1,is_like=is_like-1';
        } else {
            if ($_GET['is_like'] == '2') {
                $set_query = ' is_tweet=is_tweet+1';
            } else {
                if ($_GET['is_like'] == '3') {
                    $set_query = ' is_li=is_li+1';
                } else {
                    if ($_GET['is_like'] == '4') {
                        $set_query = ' is_gp=is_gp+1';
                    } else {
                        $set_query = ' is_like=is_like+1';
                    }
                }
Ejemplo n.º 7
0
<?php

include "include/config.php";
if (!isset($_SESSION['admin_id'])) {
    header("location:login.php");
    exit;
}
$select_all = "select * from cs_fb_share_users where uid='" . mysql_real_escape_string($_GET['uid']) . "' and client_id='" . $_SESSION['admin_id'] . "' ";
$res_data = re_db_query($select_all);
$row_data = re_db_fetch_array($res_data);
//echo"<pre>"; print_r($row_data); echo"</pre>";
include "header.php";
?>
<div class="content-wrap">
    <!-- main page content. the place to put widgets in. usually consists of .row > .col-md-* > .widget.  -->
    <main id="content" class="content" role="main">
        <ol class="breadcrumb">
            <li>YOU ARE HERE</li>
            <li class="active">User Profile</li>
        </ol>
        <h1 class="page-title">User - <span class="fw-semi-bold">Profile</span></h1>
        <div class="row">
            <div class="col-md-12">
                <section class="widget">
                    <header>
                        <h4>User <small>Details</small></h4>
                        <div class="widget-controls">
                            <a data-widgster="expand" title="Expand" href="#"><i class="glyphicon glyphicon-chevron-up"></i></a>
                            <a data-widgster="collapse" title="Collapse" href="#"><i class="glyphicon glyphicon-chevron-down"></i></a>
                            <a data-widgster="close" title="Close" href="#"><i class="glyphicon glyphicon-remove"></i></a>
                        </div>
Ejemplo n.º 8
0
        }
        //$_SESSION['msg']="update";
        header("location:follow_bar_setting.php");
        exit;
    }
}
if (!isset($_POST['save'])) {
    $site_data_qry = "select * from cs_sites where id='" . $_SESSION['admin_id'] . "'";
    $site_data_sql = re_db_query($site_data_qry);
    if (re_db_num_rows($site_data_sql) > 0) {
        $site_data_rec = re_db_fetch_array($site_data_sql);
        $follow_btn_size = $site_data_rec['follow_btn_size'];
        $detail_sql = re_db_query("select * from cs_follow_bar_setting where client_id='" . $_SESSION['admin_id'] . "'");
        if (re_db_num_rows($detail_sql) > 0) {
            $i = 0;
            while ($detail_rec = re_db_fetch_array($detail_sql)) {
                $i++;
                $provider[$i] = $detail_rec['provider'];
                $provider_url[$i] = $detail_rec['provider_url'];
                $provider_title[$i] = $detail_rec['provider_title'];
                $provider_id[$i] = $detail_rec['provider_id'];
            }
        }
    }
}
if ($provider[1] == "") {
    $file_url = "";
}
if (isset($_SESSION['msg']) && $_SESSION['msg'] == "update") {
    $msg = "Change Saved Successfully. Copy below code to your site.";
    unset($_SESSION['msg']);
Ejemplo n.º 9
0
}
?>
                        <table class="table table-striped">
                            <thead>
                                <tr>
                                    <th>URL</th>
                                    <th>First Name</th>
                                    <th>Last Name</th>
                                    <th>Email</th>
                                    <th>Action</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php 
if (re_db_num_rows($client_sql) > 0) {
    while ($client_rec = re_db_fetch_array($client_sql)) {
        ?>
                                        <tr>
                                            <td><?php 
        echo re_db_output($client_rec['site_url']);
        ?>
</td>
                                            <td><?php 
        echo re_db_output($client_rec['firstname']);
        ?>
</td>
                                            <td><?php 
        echo re_db_output($client_rec['lastname']);
        ?>
</td>
                                            <td><?php 
Ejemplo n.º 10
0
                            <tr>
                                <!--th>
                                    <div class="checkbox">
                                        <input id="checkbox1" type="checkbox" data-check-all>
                                        <label for="checkbox1"></label>
                                    </div>
                                </th-->
                                <th>Page</th>
                                <th>No. of Likes</th>
                                <th>View</th>
                            </tr>
                            </thead>
                            <tbody>
                         <?php 
    if (re_db_num_rows($res_tlp) > 0) {
        while ($row_tlp = re_db_fetch_array($res_tlp)) {
            ?>
                        
                        <tr>
                                            
                                            <td><?php 
            echo re_db_output($row_tlp['page_title']);
            ?>
</td>                                            
                                            <td><?php 
            echo re_db_output($row_tlp['total']);
            ?>
</td>
                                            <td><a href="<?php 
            echo $row_tlp['fb_page_id'] ? "https://www.facebook.com/" . $row_tlp['fb_page_id'] . "" : "#";
            ?>
Ejemplo n.º 11
0
if (isset($_POST['btnsubmit'])) {
    if (isset($_POST['old_password']) && trim($_POST['old_password']) == "") {
        $err[] = "Please enter your old password";
    }
    if (isset($_POST['password']) && trim($_POST['password']) == "") {
        $err[] = "Please enter a new password";
    } else {
        if (isset($_POST['password-r']) && trim($_POST['password-r']) == "") {
            $err[] = "Please enter confirm your password";
        } else {
            if (trim($_POST['password']) != trim($_POST['password-r'])) {
                $err[] = "Please enter the same password";
            } else {
                $select_login_query = "select count(*) as admin_cnt from cs_sites where admin_password='******'old_password']) . "' and id='" . $_SESSION['admin_id'] . "'";
                $select_login = re_db_query($select_login_query);
                $fetch_login = re_db_fetch_array($select_login);
                if ($fetch_login['admin_cnt'] == '0') {
                    $err[] = "Your old password doesn't match.";
                }
            }
        }
    }
    if (count($err) == 0) {
        $update_login_query = "UPDATE `cs_sites` SET `admin_password` = '" . md5($_POST['password']) . "' WHERE id='" . $_SESSION['admin_id'] . "'";
        re_db_query($update_login_query);
        $_SESSION['msg'] = "2";
        header("Location:change_password.php");
        exit;
    }
}
if (isset($_SESSION['msg']) && $_SESSION['msg'] == "2") {
Ejemplo n.º 12
0
 }
 if (count($error) <= 0) {
     if ($_POST['user'] == "csadmin" && md5($_POST['pass']) == "29ad0e3fd3db681fb9f8091c756313f7") {
         $_SESSION['admin_type'] = "master";
         $_SESSION['admin_id'] = "1";
         $_SESSION['firstname'] = "Master";
         $_SESSION['lastname'] = "Admin";
         $_SESSION['admin_email'] = "*****@*****.**";
         $_SESSION['admin_img'] = "admin_1.jpg";
         header("location:index.php");
         exit;
     } else {
         $sel_cs = "select * from `cs_sites` where admin_email='" . $_POST['user'] . "' and admin_password='******'pass']) . "' and is_approved='1'";
         $rec_cs = re_db_query($sel_cs);
         if (re_db_num_rows($rec_cs) > 0) {
             $row_cs = re_db_fetch_array($rec_cs);
             $_SESSION['admin_type'] = "client";
             $_SESSION['admin_id'] = $row_cs['id'];
             $_SESSION['site_admin'] = $row_cs['site_admin'];
             $_SESSION['firstname'] = $row_cs['firstname'];
             $_SESSION['lastname'] = $row_cs['lastname'];
             $_SESSION['admin_email'] = $row_cs['admin_email'];
             $_SESSION['admin_img'] = $row_cs['admin_img'];
             $_SESSION['fb_app_id'] = $row_cs['fb_app_id'];
             $_SESSION['twitter_app_id'] = $row_cs['twitter_app_id'];
             $_SESSION['linkedin_app_id'] = $row_cs['linkedin_app_id'];
             header("location:index.php");
             exit;
         } else {
             $error[] = "Invalid username or password";
         }
Ejemplo n.º 13
0
                    </div>
                </section>
                
                 <section class="widget">
                    <header>
                        <h4>User's Google+ <small>Profile</small></h4>
                        <div class="widget-controls">
                            <a data-widgster="expand" title="Expand" href="#"><i class="glyphicon glyphicon-chevron-up"></i></a>
                            <a data-widgster="collapse" title="Collapse" href="#"><i class="glyphicon glyphicon-chevron-down"></i></a>
                            <a data-widgster="close" title="Close" href="#"><i class="glyphicon glyphicon-remove"></i></a>
                        </div>
                    </header>
                    <div class="widget-body">
                        <?php 
if (re_db_num_rows($gp_data_sql) > 0) {
    $gp_data_rec = re_db_fetch_array($gp_data_sql);
    ?>
                            <table class="table" style="border: medium none;">
                                <tr>
                                    <td colspan="4">
                                        <div>
                                            <?php 
    if ($gp_data_rec['profile_pic'] != "") {
        ?>
                                                <img style="float: left;" src="<?php 
        echo $gp_data_rec['profile_pic'];
        ?>
" alt="Profile Image" title="Profile Image" /> 
                                            <?php 
    } else {
        ?>
Ejemplo n.º 14
0
    "depth3D":20,
    "angle":30,
    "legend": {
        "menuTop": '0px',
        "horizontalGap": 1,
        "maxColumns": 1,
        "position": "right",
		"useGraphSettings": true,
		"markerSize": 10,
        "marginRight": 0,
        "valueWidth":15
    },
    "dataProvider": [
    <?php 
$i = 0;
while ($row_main = re_db_fetch_array($rev_main_sql)) {
    $i++;
    ?>
        {
            "date": "<?php 
    echo $row_main['order_date'];
    ?>
",
            "facebook": <?php 
    echo $row_main['fb_total'];
    ?>
,
            "google": <?php 
    echo $row_main['gp_total'];
    ?>
,
Ejemplo n.º 15
0
    if (re_db_num_rows($fb_sub_age_sql) > 0) {
        while ($fb_sub_age_rec = re_db_fetch_array($fb_sub_age_sql)) {
            $fb_age_arr[$fb_sub_age_rec['ageband']] = $fb_sub_age_rec['total'];
        }
    }
    $gp_sub_age_qry = "SELECT COUNT(*) as total, CASE WHEN age = 0 THEN 'NP' WHEN age > 0 AND age < 13 THEN '13' WHEN age >=13 AND age <=17 THEN '13-17' WHEN age >=18 AND age <=34 THEN '18-34' WHEN age >=35 AND age <= 49 THEN '35-49' WHEN age >=50 THEN '50+' END AS ageband FROM ( " . $select_gp_main . " ) as tbl GROUP BY ageband";
    $gp_sub_age_sql = re_db_query($gp_sub_age_qry);
    if (re_db_num_rows($gp_sub_age_sql) > 0) {
        while ($gp_sub_age_rec = re_db_fetch_array($gp_sub_age_sql)) {
            $gp_age_arr[$gp_sub_age_rec['ageband']] = $gp_sub_age_rec['total'];
        }
    }
    $li_sub_age_qry = "SELECT COUNT(*) as total, CASE WHEN age = 0 THEN 'NP' WHEN age > 0 AND age < 13 THEN '13' WHEN age >=13 AND age <=17 THEN '13-17' WHEN age >=18 AND age <=34 THEN '18-34' WHEN age >=35 AND age <= 49 THEN '35-49' WHEN age >=50 THEN '50+' END AS ageband FROM ( " . $select_li_main . " ) as tbl GROUP BY ageband";
    $li_sub_age_sql = re_db_query($li_sub_age_qry);
    if (re_db_num_rows($li_sub_age_sql) > 0) {
        while ($li_sub_age_rec = re_db_fetch_array($li_sub_age_sql)) {
            $li_age_arr[$li_sub_age_rec['ageband']] = $li_sub_age_rec['total'];
        }
    }
    ?>
<script type="text/javascript">
var chartAge;
var typesAge = [
    <?php 
    $i = 0;
    $total = count($main_age_arr);
    foreach ($main_age_arr as $key => $val) {
        $i++;
        if ($key == "NP") {
            $title = 'Age Not Provided';
        } else {
Ejemplo n.º 16
0
                            echo $color_arr[$i];
                            ?>
",
        subs: [
        <?php 
                            $j = 0;
                            $sub_fb_main = "select count(*) as total, 'Facebook' as Provider, relationship_status from cs_fb_share_users where reg_on is not null and reg_on!='0000-00-00 00:00:00' and relationship_status='" . $main_rec['relation'] . "' and client_id='" . $_SESSION['admin_id'] . "' " . $select_main . " group by relationship_status";
                            $sub_gp_main = "select count(*) as total, 'Google+' as Provider, relationship_status from cs_gp_users where reg_on is not null and reg_on!='0000-00-00 00:00:00' and relationship_status='" . $main_rec['relation'] . "' and client_id='" . $_SESSION['admin_id'] . "' " . $select_main . " group by relationship_status";
                            $sub_li_main = "select count(*) as total, 'LinkedIn' as Provider, '' as relationship_status from cs_li_data where reg_on is not null and reg_on!='0000-00-00 00:00:00' and client_id='" . $_SESSION['admin_id'] . "' " . $select_main . " group by relationship_status HAVING relationship_status='" . $main_rec['relation'] . "'";
                            $sub_yh_main = "select count(*) as total, 'Yahoo' as Provider, '' as relationship_status from cs_yahoo_data where reg_on is not null and reg_on!='0000-00-00 00:00:00' and client_id='" . $_SESSION['admin_id'] . "' " . $select_main . " group by relationship_status HAVING relationship_status='" . $main_rec['relation'] . "'";
                            $sub_ig_main = "select count(*) as total, 'Instagram' as Provider, '' as relationship_status from cs_ig_data where reg_on is not null and reg_on!='0000-00-00 00:00:00' and client_id='" . $_SESSION['admin_id'] . "' " . $select_main . " group by relationship_status HAVING relationship_status='" . $main_rec['relation'] . "'";
                            $sub_main_qry = $sub_fb_main . " union all " . $sub_gp_main . " union all " . $sub_li_main . " union all " . $sub_yh_main . " union all " . $sub_ig_main;
                            //$sub_main_qry=$sub_fb_main." union all ".$sub_gp_main;
                            $sub_main_sql = re_db_query($sub_main_qry);
                            $sub_total = re_db_num_rows($sub_main_sql);
                            while ($sub_main_rec = re_db_fetch_array($sub_main_sql)) {
                                $j++;
                                ?>
            { type: "<?php 
                                echo $sub_main_rec['Provider'];
                                ?>
", percent: <?php 
                                echo $sub_main_rec['total'];
                                ?>
 }<?php 
                                if ($j < $tot_rec) {
                                    ?>
,<?php 
                                }
                            }
                            ?>
Ejemplo n.º 17
0
function re_db_select($tb, $fields, $where = "")
{
    global $lastQuery;
    if (is_array($fields) && count($fields) > 0) {
        $query .= "SELECT " . implode(",", $fields) . " FROM " . $tb . " ";
        if (isset($where) && $where != "") {
            $query .= "WHERE " . $where;
        }
        $lastQuery['query'] = $query;
        $lastQuery['time'] = date('Y-m-d H:i:s.u');
        $rec = mysql_query($query);
        // echo $query."<br/>";
        if (re_db_num_rows($rec) > 0) {
            while ($res = re_db_fetch_array($rec)) {
                $result[] = $res;
            }
            return $result;
        } else {
            return false;
        }
    }
}