echo $m['control_panel']; ?> </a></li> <li><a href='settings.php?page=main'><span class='glyphicon glyphicon-cog' aria-hidden='true'></span> <?php echo $m['settings']; ?> </a></li> <li><a href='documentation.php'><span class='glyphicon glyphicon-file' aria-hidden='true'></span> <?php echo $m['documentation']; ?> </a></li> </ul> <ul class='nav navbar-nav pull-right'> <li class='dropdown'> <a href='#' class='dropdown-toggle' data-toggle='dropdown'><?php echo $m['welcome'] . " " . userValue($_SESSION['uid'], "username"); ?> <span class='caret'></span></a> <ul class='dropdown-menu' role='menu'> <li><a href='profile.php'><span class='glyphicon glyphicon-user' aria-hidden='true'></span> <?php echo $m['profile']; ?> </a></li> <li class='divider'></li> <li><a href='logout.php'><span class='glyphicon glyphicon-log-out' aria-hidden='true'></span> <?php echo $m['logout']; ?> </a></li> </ul> </li> </ul>
<input id="link" class="form-control" type="text" name="link" placeholder="Enter a URL which might be related to this message"/> </div> <div class="form-group"> <label for="link">Img Link</label> <input id="img_link" class="form-control" type="text" name="img_link" placeholder="Enter a URL for an image related to this message"/> </div> <div class="form-group"> <label for="Notes">Notes</label> <input id="Notes" class="form-control" type="text" name="notes" placeholder="Notes" value="" /> </div> <input type='hidden' name='uid' value='<?php echo $_SESSION['uid']; ?> '> <input type='hidden' name='username' value='<?php echo userValue(null, "username"); ?> '> <table> <tr> <td colspan="2"> <button type="submit" class="btn btn-primary" name="btn-save"> <span class="glyphicon glyphicon-plus"></span> Create New Record </button> <a href="../theChallenge/challenge_admin.php" class="btn btn-large btn-success"><i class="glyphicon glyphicon-backward"></i> Back to main page.</a> </td> </tr> </table> </form> </div> </div>
<?php include_once '../mysql/hidden_files/database.php'; include_once '../classes/class.goals.crud.php'; $crud = new crud($conn); ?> <div class="wrapper"> <div class="section-header fixed-top"> <div class="container"> <div class="row"> <div class="col-md-2"> <!-- Remove the .animated class if you don't want things to move --> <h1 class="animated slideInLeft"><span>My Goals</span></h1> </div> <div class="col-md-8"> <h4>Hi <?php echo userValue(null, "FirstName"); ?> , your Goals are here. </h4> </div> </div> </div> </div> <div class="container"> <div class="row"> <div class="col-md-2"> <a href="../mysql/add_goals.php" class="btn btn-large btn-info"><i class="glyphicon glyphicon-plus"></i> Add a Goal</a> </div> <div class="col-md-8"> <div class="clearfix"></div> <table class='table table-bordered table-responsive'> <tr>
function sendMail($to, $subject, $message, $uid = 0) { require 'phpmailer/PHPMailerAutoload.php'; // Requires PHPMailer $mail = new PHPMailer(); // Check if SMTP is enabled if (getSetting("mailtype", "text") == "smtp") { $mail->isSMTP(); $mail->Host = getSetting("smtp_hostname", "text"); $mail->SMTPAuth = true; $mail->Username = getSetting("smtp_username", "text"); $mail->Password = getSetting("smtp_password", "text"); // Check if SSL is enabled if (getSetting("smtp_ssl", "text") == "true") { $mail->SMTPSecure = 'tls'; } else { $mail->SMTPSecure = 'tls'; } $mail->Port = getSetting("smtp_port", "text"); } $mail->From = getSetting("admin_email", "text"); // Get admin email, this is the sender of the mail $mail->FromName = getSetting("email_name", "text"); // Get email name, this is the name of the sender of the mail // If uid is 0 the mail will not have a username, only the address to send it to if ($uid = 0) { $mail->addAddress($to); } else { $mail->addAddress($to, userValue($uid, "username")); } $mail->WordWrap = 50; $mail->isHTML(true); // Enable HTML $mail->Subject = $subject; $mail->Body = $message; // If the mail is send, it returns true, else it will return false if (!$mail->send()) { return false; } else { return true; } }
echo "0|||<h5 class='text-center red'>" . $m['fill_in_cart'] . "</h5>"; } elseif (empty($month)) { echo "0|||<h5 class='text-center red'>" . $m['fill_in_month'] . "</h5>"; } elseif (empty($year)) { echo "0|||<h5 class='text-center red'>" . $m['fill_in_year'] . "</h5>"; } elseif (empty($cvc)) { echo "0|||<h5 class='text-center red'>" . $m['fill_in_cvc'] . "</h5>"; } else { // Require Stripe API require_once 'stripe/lib/Stripe.php'; Stripe::setApiKey(getSetting("stripe_key", "text")); // Private API key $uid = mysqli_real_escape_string($con, $_POST['uid']); $amount = getSetting("stripe_cost", "text") * 100; $currency = getSetting("stripe_currency", "text"); $description = $m['registration_of'] . userValue($uid, "username"); $month = str_pad($month, 2, "0", STR_PAD_LEFT); // Send Stripe payment try { $pay = Stripe_Charge::create(array("amount" => $amount, "currency" => $currency, "card" => array("number" => $card, "exp_month" => $month, "exp_year" => $year, "cvc" => $cvc), "description" => $description)); $pay = json_decode(str_replace("Stripe_Charge JSON: ", "", $pay), true); if ($pay['paid'] == 1) { mysqli_query($con, "UPDATE users SET active='1' WHERE id='{$uid}'"); echo "1|||<h5 class='text-center green'>" . $m['stripe_paid'] . "</h5>"; } else { echo "0|||<h5 class='text-center red'>" . $m['stripe_not_paid'] . "</h5>"; } } catch (Stripe_CardError $e) { // Stripe error $error = $e->getJsonBody(); $er = $error['error'];
echo $u['username']; ?> '> </div> </div> </div> <div class='row'> <div class='form-group'> <label class='col-sm-4 control-label'><?php echo $m['email']; ?> *</label> <div class='col-sm-8'> <input type='email' class='form-control' name='email' value='<?php echo userValue($u['id'], "email"); ?> '> </div> </div> </div> <div class='row'> <div class='form-group'> <label class='col-sm-4 control-label'><?php echo $m['permission']; ?> *</label> <div class='col-sm-8'> <select name='permission' class='form-control'> <?php
' class='btn btn-primary'> </div> </div> </div> </form> <?php } ?> </div> <div role='tabpanel' class='tab-pane' id='set_password'> <?php // Another check if the password field is empty if (userValue($uid, "password") == "") { ?> <div class='row'> <h3><?php echo $m['set_password']; ?> </h3> <div id='password_response'><div class='alert alert-info' role='alert'><?php echo $m['set_password_info']; ?> </div></div> </div> <form method='post' id='setpass'> <div class='row'> <div class='col-md-12'>