Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some minor fixes #195

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/app/controllers/page.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ function show($api = null) {
"page_data" => $data
], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
} else {
$header = getallheaders();
$is_ajax = isset($header["X-Ajax-Request"]) && $header["X-Ajax-Request"];
$is_ajax = isset($_SERVER["HTTP_X_AJAX_REQUEST"]) && $_SERVER["HTTP_X_AJAX_REQUEST"];

if ($is_ajax) {
foreach ($template_meta as $name => $meta) {
Expand Down
4 changes: 2 additions & 2 deletions src/app/libraries/db_lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ class db_lib extends Library {
private function bind_params($stmt, $datatypes, $data) {
if (!empty($datatypes) && !empty($data)) {
// Convert to references
$data = array_merge([$datatypes], $data);
foreach ($data as $key => $value) {
$data[$key] = &$data[$key];
}

if (!call_user_func_array(array($stmt, "bind_param"), array_merge([$datatypes], $data))) {
if (!call_user_func_array(array($stmt, "bind_param"), $data)) {
return false;
}
}
Expand Down
7 changes: 3 additions & 4 deletions src/app/views/contest/ttt_workshop.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ class="pure-input-1">
</h1>
<?php if ($user_details): ?>
<?php if ($user_details['payment_status'] == 'success'): ?>
<p class="success">You have successfully paid </p>
<p class="success"><?= __('You are successfully registered for the workshop') ?></p>
<?php else: ?>
<div class="text-center">
<?php if ($user_details['payment_status'] == 'failed'): ?>
<p class="error">Payment was unsuccessfull </p>
<p class="error"><?= __('Payment was unsuccessful') ?></p>
<?php endif; ?>

<a href="<?= $payment_url ?>" class="pure-button pure-button-primary some-top-margin">
Expand All @@ -56,8 +56,7 @@ class="pure-input-1">

<label><?= __('Contact number') ?></label>
<?php $text_input('contact_number') ?>
<button type="submit" class="pure-button pure-button-primary some-top-margin"><?= __('Proceed to payment ₹100') ?></button>

<button type="submit" class="pure-button pure-button-primary some-top-margin"><?= __('Proceed to pay ₹100') ?></button>
</fieldset>
</form>
<?php endif; ?>
Expand Down
2 changes: 2 additions & 0 deletions src/app/views/templates/sponsors/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
<?php endforeach; ?>
</div>
<?php endforeach; ?>
<hr>
<h2><?= __('Past sponsors') ?></h2>
<h3><?= __('Year 2015') ?></h3>
<div class="row some-top-margin">
Expand Down Expand Up @@ -135,6 +136,7 @@
<?php endforeach; ?>
</div>
<?php endforeach; ?>
<hr>
<h3><?= __('Year 2014 and before') ?></h3>
<?php foreach (array_chunk($sponsors2014, 4) as $sponsors): ?>
<div class="row">
Expand Down