Пример #1
0
        ob_start();
        // This function saves all output to a buffer instead of outputting it directly.
        ?>

<div class="hidden-phone hidden-tablet">
<script type="text/javascript">
    var pausecontent1=new Array();
    var pausecontent2=new Array();
    <?php 
        $j = 0;
        $sql9 = "SELECT COUNT(id) as cnt, userid FROM {$tablename} WHERE date(contactdate)='{$date2}' group by userid order by cnt desc limit 10";
        $res9 = mysqli_query($mysqli, $sql9);
        while ($row9 = mysqli_fetch_assoc($res9)) {
            $desc = "<b>SALUTE:</b> At ";
            $desc = $desc . OrdinalNumber($j + 1);
            $uname = return_field('users', 'id', $row9['userid'], 'name');
            $desc = $desc . " position today is " . $uname . ", with " . $row9['cnt'] . " calls!";
            ?>
        pausecontent1.push("<?php 
            echo $desc;
            ?>
");
        <?php 
            $j++;
        }
        $query9 = "select * from news where status2=1 and state_id={$stateid} order by rand()";
        $result9 = mysqli_query($mysqli, $query9);
        while ($row9 = mysqli_fetch_assoc($result9)) {
            $desc = json_encode($row9['description']);
            $desc = substr($desc, 0, -1);
            $desc = substr($desc, 1);
Пример #2
0
function contactscount($userid)
{
    global $mysqli;
    $stateid = $_SESSION['stateid'];
    $tablename = return_field('states', 'id', $stateid, 'tablename');
    $query = "SELECT COUNT(id) as cnt FROM " . $tablename . " WHERE userid= " . $userid;
    $res = mysqli_query($mysqli, $query);
    $row = mysqli_fetch_assoc($res);
    return $row['cnt'];
}
Пример #3
0
    if (mysqli_num_rows($res) == 0) {
        tep_redirect(tep_href_link($pagename, 'action1=err'));
    } else {
        if ($row['status2'] == 0) {
            tep_redirect(tep_href_link($pagename, 'action1=err1'));
        } else {
            $_SESSION["admin"] = $row['username'];
            $_SESSION["adminid"] = $row['id'];
            $_SESSION['email'] = $row['email'];
            $_SESSION['access'] = $row['access'];
            $query = "update admins set lastlogin= '******' where id=" . $row['id'];
            $update_sql = mysqli_query($mysqli, $query) or die(mysqli_error());
            if (stristr($_SESSION['access'], "a")) {
                tep_redirect('states.php');
            } else {
                $stateid = return_field('states', 'access', $row['access'], 'id');
                $_SESSION['stateid'] = $stateid;
                tep_redirect("innerpages.php");
            }
        }
    }
}
?>


		<?php 
include "includes/styles.php";
?>
	</head>
	<body >
Пример #4
0
<?php

include "includes/app_top.php";
$t = cleanQuery($_POST['t']);
$getid = cleanQuery($_POST['id']);
if ($t != "" && $getid != "") {
    $idstring = 'id';
    $statusg = return_field($t, $idstring, $getid, 'genuine');
    $statusg = $statusg == 1 ? 0 : 1;
    $query = "update " . $t . " set genuine=" . $statusg . " where " . $idstring . "=" . $getid;
    mysqli_query($mysqli, $query);
    print $statusg;
}
Пример #5
0
<?php

include "includes/app_top.php";
ini_set('memory_limit', '128M');
$getid = getid('id');
if ($getid != '') {
    $_SESSION['memid'] = $getid;
} else {
    $getid = $_SESSION['memid'];
}
$imgsrc = return_field('users', 'id', $getid, 'imgsrc');
$upload_path = "../pictures/members/";
//Constants
//You can alter these options
//$large_image_name = $getid . ".jpg"; 		// New name of the large image
$large_image_name = $imgsrc;
// New name of the large image
$thumb_image_name = "th_" . $imgsrc;
// New name of the thumbnail image
$max_file = "11485760";
// Approx 1MB
$max_width = "400";
// Max width allowed for the large image
$max_height = "400";
$thumb_width = "130";
// Width of thumbnail image
$thumb_height = "130";
// Height of thumbnail image
//Image functions
//You do not need to alter these functions
function resizeImage($image, $width, $height, $scale)
Пример #6
0
<td><?php 
echo $row['city'];
?>
</td>
</tr>
<tr> <td  >Country</td>
<td><?php 
echo $row['country'];
?>
</td>
</tr>
<tr valign="top">
<td colspan="2"><div class="heading3">Campaign Details:</div></td>
</tr>
<tr>

<td>Dataset : </td><td><?php 
echo return_field('categories', 'id', $categoryid, 'description');
?>
</td>

</tr>
</table>

</div></div>
<?php 
include "includes/footer.php";
?>
</body>
</html>
Пример #7
0
<?php

include "includes/app_top.php";
checkUserLogin();
$getid = getid('eid');
$uid = getid('eid2');
if ($uid != '') {
    $emails = return_field('users', 'id', $uid, 'email');
} else {
    $emails = return_field('referrals', 'id', $getid, 'email');
}
$emailfrom = $_SESSION['useremail'];
if ($action == "send") {
    $message = cleanQuery($_POST['message']);
    $esubject = "Message from " . $_SESSION['user'];
    require '../includes/mailer.php';
    sendmail($emailfrom, $_SESSION['user'], $emails, $esubject, $message);
    tep_redirect("send-message.php?action1=success");
}
include "includes/styles.php";
?>
<script type="text/javascript" src="../js/ajax.js"></script>
<script src="../js/jquery.validate.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#send").validate({
              rules: {
						message:"required",
			 }
});});
</script>
Пример #8
0
<?php

include "includes/app_top.php";
$pcat = "Members";
$pagetitle = "Members";
checkAdminLogin();
$getid = getid('id');
$uid = getid('uid');
if ($action == "sm") {
    $count = (int) $_POST['count'];
    $emails = "";
    for ($i = 1; $i <= $count; $i++) {
        $cb = 'checkbox' . $i;
        if (isset($_POST[$cb])) {
            $checkedmail = return_field('members', 'member_number', $_POST[$cb], 'email');
            $emails = $emails . $checkedmail . ', ';
        }
    }
    $_SESSION['emails2'] = $emails;
    tep_redirect('send-mail.php');
}
if ($action == "paymentconfirm") {
    $count = (int) $_POST['count'];
    for ($i = 1; $i <= $count; $i++) {
        $cb = 'checkbox' . $i;
        //echo $_POST[$cb].', ';
        $memberid = $_POST[$cb];
        if ($memberid != "") {
            $sql = "select * from members where member_number='" . $memberid . "'";
            $res = mysqli_query($mysqli, $sql);
            $row = mysqli_fetch_assoc($res);
Пример #9
0
           <div id="messages"><?php 
if ($action1 == "update") {
    echo '<div class="alert alert-success">Updated details.</div>';
}
?>
</div>                                   
              <form action="vmessage.php?action=change&id=<?php 
echo $getid;
?>
" method="post" >   <table class="mgrey2" border="0" cellpadding="6" cellspacing="0" width="100%">
                <tbody>
                  <tr >
                    <td width="158"    ><strong> Name : </strong></td>
                    <td width="724"><?php 
if ($row['userid'] != '') {
    echo return_field('users', 'id', $row['userid'], 'name');
}
?>
</td>
                  </tr> 
  <tr >
                    <td   ><strong>Email : </strong></td>
                    <td  ><?php 
echo $row['email'];
?>
</td>
                  </tr> 
                  <tr >
                    <td   ><strong>Message : </strong></td>
                    <td  ><?php 
echo nl2br($row['message']);
Пример #10
0
<?php

if (isset($_SESSION['stateid'])) {
    $stateid = $_SESSION['stateid'];
    $tablename = return_field('states', 'id', $stateid, 'tablename');
    $sitename = return_field('states', 'id', $stateid, 'sitename');
    $name = return_field('states', 'id', $stateid, 'name');
}
if (isset($pcat)) {
    if ($pcat == "Website") {
        $tab_website = '<div class="btn-group">';
        $tab_website = $tab_website . '<a href="innerpages.php" class="btn';
        if ($pagetitle == 'Inner Pages') {
            $tab_website = $tab_website . ' active';
        }
        $tab_website = $tab_website . '">Inner Pages</a>';
        $tab_website = $tab_website . '<a href="report-problem.php" class="btn';
        if ($pagetitle == 'Report Problem') {
            $tab_website = $tab_website . ' active';
        }
        $tab_website = $tab_website . '">Report Problem</a>';
        $tab_website = $tab_website . '<a href="volunteers.php" class="btn';
        if ($pagetitle == 'Suggestions/Feedback') {
            $tab_website = $tab_website . ' active';
        }
        $tab_website = $tab_website . '">Suggestions/Feedback</a>';
        $tab_website = $tab_website . '<a href="faqs.php" class="btn';
        if ($pagetitle == 'FAQS') {
            $tab_website = $tab_website . ' active';
        }
        $tab_website = $tab_website . '">FAQS</a>';
Пример #11
0
$query = "select * from " . $tablename . " where id=" . $getid . " limit 1";
$res = mysqli_query($mysqli, $query);
$row = mysqli_fetch_assoc($res);
?>
 
                              <table width="100%" border="0" cellspacing="0" cellpadding="5">
                              
              <tr> <td width="200"  >Contact Phone</td>
                <td><?php 
echo $row['contact'];
?>
</td>
              </tr>
              <tr> <td  >Category</td>
                <td><?php 
echo return_field('categories', 'id', $row['catid'], 'catname');
?>
</td>
              </tr>
              <tr> <td  >Is Called</td>
                <td><?php 
if ($row['iscalled'] != 0) {
    echo $getconnected[$row['iscalled']];
}
?>
</td>
              </tr>
              <tr> <td  >Vote</td>
                <td><?php 
echo $vote4aap[$row['vote']];
?>
Пример #12
0
<?php

include "includes/app_top.php";
$pagetitle2 = "Change Password";
$verifycode = get('vcode');
if ($verifycode != '') {
    $sql = "select * from users where confirmation='{$verifycode}'";
    $res = mysqli_query($mysqli, $sql);
    if (mysqli_num_rows($res) > 0) {
        if ($row['status2'] == 2) {
            tep_redirect(tep_href_link('login.php', 'action1=err3'));
        }
        $row = mysqli_fetch_assoc($res);
        $_SESSION["userid"] = $row['id'];
        $_SESSION["user"] = $row['name'];
        $_SESSION['email'] = $row['email'];
        $_SESSION['categoryid'] = return_field('settings', 'id', 1, 'category');
        tep_redirect('change-password2.php');
    } else {
        tep_redirect(tep_href_link('login.php', 'action1=err4'));
    }
} else {
    tep_redirect(tep_href_link('login.php', 'action1=err4'));
}
Пример #13
0
<?php

include "includes/app_top.php";
$t = cleanQuery($_POST['t']);
$getid = cleanQuery($_POST['id']);
if ($t != "" && $getid != "") {
    $idstring = 'id';
    $status2 = return_field($t, $idstring, $getid, 'ishome');
    $status2 = $status2 == 0 ? 1 : 0;
    $query = "update " . $t . " set ishome=" . $status2 . " where " . $idstring . "=" . $getid;
    mysqli_query($mysqli, $query);
    $msg = '<div class="alert alert-success">Changed Home Video Status</div>';
    print $msg;
}
Пример #14
0
    if ($_FILES['ufile']['name'] != "") {
        $path1 = "../pictures/news/" . $_FILES['ufile']['name'];
        $imgsrc = $_FILES['ufile']['name'];
        $a = copy($_FILES['ufile']['tmp_name'], $path1);
        if (!$a) {
            tep_redirect(tep_href_link($pagename, 'action1=err'));
        }
    }
    $orderno = $_POST['orderno'] != '' ? cleanQuery($_POST['orderno']) : 0;
    $query = "insert into news(description,state_id,  orderno, imgsrc,datemodified) VALUE ('" . cleanQuery($_POST['description']) . "', '" . cleanQuery($_POST['stateid']) . "', " . $orderno . ",'{$imgsrc}','{$date}')";
    mysqli_query($mysqli, $query);
    // echo $query;
    tep_redirect(tep_href_link($pagename, 'action1=add&action=add'));
}
if ($action == "change") {
    $imgsrc = return_field('news', 'id', $getid, 'imgsrc');
    if ($_FILES['ufile']['name'] != "") {
        $path1 = "../pictures/news/" . $_FILES['ufile']['name'];
        $imgsrc = $_FILES['ufile']['name'];
        $a = copy($_FILES['ufile']['tmp_name'], $path1);
        if (!$a) {
            tep_redirect(tep_href_link($pagename, 'action1=err'));
        }
    }
    $orderno = $_POST['orderno2'] != '' ? cleanQuery($_POST['orderno2']) : 20;
    $query = "update news set description='" . cleanQuery($_POST['description']) . "', orderno=" . $orderno . ",  imgsrc='{$imgsrc}', datemodified='{$date}'  where id=" . $getid;
    mysqli_query($mysqli, $query);
    tep_redirect(tep_href_link($pagename, 'action1=update'));
}
?>
 
Пример #15
0
if ($action1 == "err") {
    echo '<div class="alert alert-error">Something Error. Mail has not sent.</div>';
}
?>
</div></td>
                     </tr>
                     <tr>
                       <td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="text9">
                           <tr>
                             <td><?php 
$emails = "";
if ($mid != '') {
    $emails = return_field('users', 'id', $mid, 'email');
}
if ($aid != '') {
    $emails = return_field('admins', 'id', $aid, 'email');
}
?>
                                 <form action="<?php 
echo $pagename;
?>
?action=send" method="post"  enctype="multipart/form-data" name="frmadd" id="frmadd" onSubmit="return validate(this)">
                                   <div  >
                                     <table width="100%" border="0" cellspacing="0" cellpadding="3" class="text9" align="center">
                                       <tr>
                                         <td align="right">Email From : </td>
                                         <td><input name="emailfrom" type="text"  id="emailfrom" style="width:250px" value="<?php 
echo $adminemail;
?>
" /></td>
                                       </tr>
Пример #16
0
            <table width="350" border="0"   cellspacing="0" cellpadding="0" class="bg-grey tbln">
  <tr align="center">
    <td style="border-right:#dddddd 1px solid"><strong><a href="objective.php" class="details" rel="colorbox5">Objective<br />
of Telecalling</a></strong></td>
    <td><a href="message-to-citizen.php" class="details" rel="colorbox5">Message<br />
to Citizen</a></td>
	</tr>
    <tr align="center">
    <td style="border-right:#dddddd 1px solid; border-top:#dddddd 1px solid">
<a href="tips.php" class="details" rel="colorbox5">Tips &amp; Pointers<br />
for Call</a></td>
    <td style="border-top:#dddddd 1px solid"> <a  title="<?php 
echo return_field('videos', 'id', 4, 'heading');
?>
" class="video2" href="http://www.youtube.com/v/<?php 
echo return_field('videos', 'id', 4, 'youtube');
?>
?autoplay=1" rel="colorbox">One Minute<br />
Video</a></td>
  </tr>
</table>
          
          </div>
           
 <?php 
$daystart = $date2 . " 07:00:00";
$dayend = $date2 . " 22:30:00";
$date = date_default_timezone_set('Asia/Kolkata');
$now = date("Y-m-d G:i:s");
//echo $daystart.', '.$dayend.', '.$now;
if (check_date_is_within_range($daystart, $dayend, $now)) {
Пример #17
0
<?php

include "includes/app_top.php";
$t = cleanQuery($_POST['t']);
$getid = cleanQuery($_POST['id']);
if ($t != "" && $getid != "") {
    $idstring = 'id';
    $status2 = return_field($t, $idstring, $getid, 'status2');
    $status2 = $status2 == 0 ? 1 : 0;
    $query = "update " . $t . " set status2=" . $status2 . " where " . $idstring . "=" . $getid;
    mysqli_query($mysqli, $query);
    print $status2;
}
Пример #18
0
<?php

include "includes/app_top.php";
$pcat = "Members";
$pagetitle = "Categories";
$getid = getid('id');
$catid = isset($_GET['cid']) ? $_GET['cid'] : $_SESSION['catid'];
if ($catid != '') {
    $_SESSION['catid'] = $catid;
}
$catname = return_field('categories', 'id', $catid, 'catname');
checkAdminLogin();
checkState();
if ($action == "addcategory") {
    $sql = "select scname from subcat where scname= '" . cleanQuery($_POST['categoryname']) . "' and catid=" . $catid;
    $result = mysqli_query($mysqli, $sql);
    $orderno = $_POST['orderno'] != '' ? cleanQuery($_POST['orderno']) : 0;
    if (mysqli_num_rows($result) == 0) {
        $query = "insert into subcat (scname, orderno, catid, datemodified) VALUE ('" . cleanQuery($_POST['categoryname']) . "',{$orderno}, {$catid}, '{$date}')";
        mysqli_query($mysqli, $query);
        tep_redirect(tep_href_link($pagename, 'action1=add&action=add'));
    } else {
        tep_redirect(tep_href_link($pagename, 'action1=adderr'));
    }
}
if ($action == "change") {
    $orderno = $_POST['orderno2'] != '' ? cleanQuery($_POST['orderno2']) : 0;
    $category = $_POST['category'];
    $query = "update subcat set scname='" . cleanQuery($_POST['categoryname2']) . "', orderno=" . $orderno . ",   catid=" . $category . "  where id=" . $getid;
    mysqli_query($mysqli, $query);
    tep_redirect(tep_href_link($pagename, 'action1=update2'));
Пример #19
0
                                           <tr>
                                             <td>&nbsp;</td>
                                             <td><input type="submit" name="register" value="Submit" id="Button1" class="btn btn-primary sepV_c" /><a  onclick="closeadd();" class="btn btn-inverse" >Cancel</a></td>
                                           </tr>
                                           <tr>
                                             <td>&nbsp;</td>
                                             <td>&nbsp;</td>
                                           </tr>
                                         </table>
                                       </div>
                                     </form>
                                   </div>  <?php 
if ($action == "aedit") {
    ?>
                                     <?php 
    $access = return_field('admins', 'id', $getid, 'access');
    ?>
                                     <form action="<?php 
    echo $pagename;
    ?>
?action=achange&id=<?php 
    echo $getid;
    ?>
" method="post"  name="frmadd" id="frmadd">
                                       <div class="box-bg-rt" style="width:400px; margin:0 auto">
						
                                         <table width="100%" border="0" cellspacing="0" cellpadding="3" class="table table_vam table-black bN">
                                             <thead>
                                             <tr>
                                             <th align="left" colspan="2">Change Admin User Access Rights</th>
                                           </tr>
Пример #20
0
?>
</head>
<body>
 <?php 
include "includes/header.php";
?>
 
            <div class="division-1">
           <h1>Referrals</h1>    
           <div class="overflow_x-a clearfix"  >               
			<?php 
$query = "select * from referrals where userto=0 and userfrom=" . $_SESSION["userid"];
$res = mysqli_query($mysqli, $query);
if (mysqli_num_rows($res) > 0) {
    while ($row = mysqli_fetch_assoc($res)) {
        $uid = return_field('users', 'email', $row['email'], 'id');
        if ($uid != '') {
            $query2 = "update referrals set userto=" . $uid . " where id=" . $row['id'];
            mysqli_query($mysqli, $query2);
        }
    }
}
$query = "SELECT `referrals`.`email`,`referrals`.`id`, referrals.userto as rto, (SELECT name FROM users WHERE rto!=0 and users.id=rto) AS uname, (SELECT COUNT(id) FROM referrals WHERE referrals.userfrom = rto) AS referralcount,(SELECT COUNT(id) FROM  " . $tablename . "   WHERE contacts.userid = referrals.userto and referrals.userto!=0) AS contactscount FROM `referrals` left JOIN `users` ON `referrals`.`email` = `users`.`email` where referrals.userfrom=" . $_SESSION["userid"];
$res = mysqli_query($mysqli, $query);
if (mysqli_num_rows($res) == 0) {
    ?>
                               <p class="norecords">You hadn't reffered any one!!</p>
                                <?php 
} else {
    ?>
									 <table class="tblclass" width="100%">