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

Apply php dev best practices #248

Open
wants to merge 1 commit 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
75 changes: 37 additions & 38 deletions about.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@
<header class="container" id="about-menu">
<div class="subnav droid-text">
<ul class="nav nav-pills">
<li class="active"><a href="#main" data-toggle="tab"><? echo $about_aboutHead ?></a></li>
<li><a href="#behind" data-toggle="tab"><? echo $about_the_people_behind_head ?></a></li>
<li><a href="#getinvolved" data-toggle="tab"><? echo $about_gettinginvolvedHead ?></a></li>
<li><a href="#faqs" data-toggle="tab"><? echo $about_faqHead ?></a></li>
<li class="active"><a href="#main" data-toggle="tab"><?php echo $about_aboutHead ?></a></li>
<li><a href="#behind" data-toggle="tab"><?php echo $about_the_people_behind_head ?></a></li>
<li><a href="#getinvolved" data-toggle="tab"><?php echo $about_gettinginvolvedHead ?></a></li>
<li><a href="#faqs" data-toggle="tab"><?php echo $about_faqHead ?></a></li>
</ul>
</div>
</header>
Expand All @@ -84,17 +84,17 @@
<img src="http://blogs.scientificamerican.com/media/inline/blog/Image/Citizen-Science-logo.jpg" alt="Logo of Citizen Science Initiative">
</div>
<div class="span6" style="padding-right: 1ex;">
<? echo $about_aboutText1 ?>
<?php echo $about_aboutText1 ?>
</div>
</div>
</div>
<div class="container leftband">
<div class="row-fluid">
<div class="span6">
<? echo $about_aboutText2 ?>
<?php echo $about_aboutText2 ?>
</div>
<div class="span6" style="padding-right: 1ex">
<?
<?php
if($lang == 'en'){
echo '<img src="./assets/img/enviroCar-architecture_en.png" style="height:300px; width:487px;" alt="The architecture of enviroCar">';
}else{
Expand All @@ -110,15 +110,15 @@
<img class="offset3" src="./assets/img/about/drivedeck1.jpg" style="width:30%;" alt="An ODB II Adapter">
</div>
<div class="span6">
<? echo $about_aboutText3 ?>
<?php echo $about_aboutText3 ?>
</div>
</div>
</div>

<div class="container leftband">
<div class="row-fluid">
<div class="span6">
<? echo $about_aboutText4 ?>
<?php echo $about_aboutText4 ?>
</div>
<div class="span6" style="padding-right: 1ex">
<img src="./assets/img/about/enviroCar-app-02.jpg" style="width:487px;" alt="Screenshots of the enviroCar app">
Expand All @@ -130,15 +130,15 @@
<div class="container leftband">
<div class="row-fluid">
<div class="span11" style="padding-right: 1ex; text-align: justify;">
<? echo $about_the_people_behind_text ?>
<?php echo $about_the_people_behind_text ?>
</div>
</div>
</div>
<div class="container leftband">
<div class="row-fluid">
<div class="span11" style="padding-right: 1ex; text-align: justify;">
<h2><span class="anchor" id="asContributors"></span><? echo $about_contributors_head ?></h2>
<? echo $about_contributors_text ?>
<h2><span class="anchor" id="asContributors"></span><?php echo $about_contributors_head ?></h2>
<?php echo $about_contributors_text ?>
</div>
</div>
</div>
Expand All @@ -147,39 +147,39 @@
<div class="container leftband">
<div class="row-fluid">
<div class="span" style="padding-right: 1ex">
<h2><span class="anchor" id="asCitizens"></span><? echo $asACitizenHead ?></h2>
<h2><span class="anchor" id="asCitizens"></span><?php echo $asACitizenHead ?></h2>
<p>
<? echo $asACitizenText ?>
<?php echo $asACitizenText ?>
</p>
</div>
</div>
</div>
<div class="container leftband">
<div class="row-fluid">
<div class="span" style="padding-right: 1ex">
<h2><span class="anchor" id="sign2"></span><? echo $asAScientistHead ?></h2>
<h2><span class="anchor" id="sign2"></span><?php echo $asAScientistHead ?></h2>
<p>
<? echo $asAScientistText ?>
<?php echo $asAScientistText ?>
</p>
</div>
</div>
</div>
<div class="container leftband">
<div class="row-fluid">
<div class="span" style="padding-right: 1ex">
<h2><span class="anchor" id="sign3"></span><? echo $asAPlannerHead ?></h2>
<h2><span class="anchor" id="sign3"></span><?php echo $asAPlannerHead ?></h2>
<p>
<? echo $asAPlannerText ?>
<?php echo $asAPlannerText ?>
</p>
</div>
</div>
</div>
<div class="container leftband">
<div class="row-fluid">
<div class="span" style="padding-right: 1ex">
<h2><span class="anchor" id="sign4"></span><? echo $asADeveloperHead ?></h2>
<h2><span class="anchor" id="sign4"></span><?php echo $asADeveloperHead ?></h2>
<p>
<? echo $asADeveloperText ?>
<?php echo $asADeveloperText ?>
</p>
</div>
</div>
Expand All @@ -190,65 +190,64 @@
<div class="row-fluid">
<div class="span" style="padding-right: 1ex">
<ul id="faqList" class="neutralList">
<li><a href="#q1"><? echo $faq_q1 ?></a></li>
<li><a href="#q2"><? echo $faq_q2 ?></a></li>
<li><a href="#q3"><? echo $faq_q3 ?></a></li>
<li><a href="#q4"><? echo $faq_q4 ?></a></li>
<li><a href="#q5"><? echo $faq_q5 ?></a></li>
<li><a href="#q1"><?php echo $faq_q1 ?></a></li>
<li><a href="#q2"><?php echo $faq_q2 ?></a></li>
<li><a href="#q3"><?php echo $faq_q3 ?></a></li>
<li><a href="#q4"><?php echo $faq_q4 ?></a></li>
<li><a href="#q5"><?php echo $faq_q5 ?></a></li>
</ul>
</div>
</div>
</div>
<div class="container leftband">
<div class="row-fluid">
<div class="span" style="padding-right: 1ex">
<h2><span class="anchor" id="q1"></span><? echo $faq_q1 ?></h2>
<h2><span class="anchor" id="q1"></span><?php echo $faq_q1 ?></h2>
<p>
<? echo $faq_a1 ?>
<?php echo $faq_a1 ?>
</p>
</div>
</div>
</div>
<div class="container leftband">
<div class="row-fluid">
<div class="span" style="padding-right: 1ex">
<h2><span class="anchor" id="q2"></span><? echo $faq_q2 ?></h2>
<? echo $faq_a2 ?>
<h2><span class="anchor" id="q2"></span><?php echo $faq_q2 ?></h2>
<?php echo $faq_a2 ?>
</div>
</div>
</div>
<div class="container leftband">
<div class="row-fluid">
<div class="span" style="padding-right: 1ex">
<h2><span class="anchor" id="q3"></span><? echo $faq_q3 ?></h2>
<h2><span class="anchor" id="q3"></span><?php echo $faq_q3 ?></h2>
<p>
<? echo $faq_a3 ?>
<?php echo $faq_a3 ?>
</p>
</div>
</div>
</div>
<div class="container leftband">
<div class="row-fluid">
<div class="span" style="padding-right: 1ex">
<h2><span class="anchor" id="q4"></span><? echo $faq_q4 ?></h2>
<h2><span class="anchor" id="q4"></span><?php echo $faq_q4 ?></h2>
<p>
<? echo $faq_a4 ?>
<?php echo $faq_a4 ?>
</p>
</div>
</div>
</div>
<div class="container leftband">
<div class="row-fluid">
<div class="span" style="padding-right: 1ex">
<h2><span class="anchor" id="q5"></span><? echo $faq_q5 ?></h2>
<h2><span class="anchor" id="q5"></span><?php echo $faq_q5 ?></h2>
<p>
<? echo $faq_a5 ?>
<?php echo $faq_a5 ?>
</p>
</div>
</div>
</div>
</div><!--end of div id="faqs"-->
</div><!--end tab content-->
<?
include('footer.php');
?>
<?php
include('footer.php');
7 changes: 1 addition & 6 deletions assets/includes/authentification.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,4 @@ function login($name, $password, $permanent){
$lang = 'en';
}



include('lang_'.$lang.'.php');


?>
include('lang_'.$lang.'.php');
4 changes: 1 addition & 3 deletions assets/includes/badges.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,4 @@
}else{
echo $response['status'];
}
}

?>
}
5 changes: 1 addition & 4 deletions assets/includes/commons.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,4 @@ function echoActiveClassIfRequestMatches($requestUri)

if ($current_file_name == $requestUri)
echo 'class="active"';
}


?>
}
2 changes: 0 additions & 2 deletions assets/includes/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,3 @@

//WPS url variables
$wps_fuel_price = "http://processing.envirocar.org:8080/wps/WebProcessingService?Service=WPS&Request=Execute&Version=1.0.0&Identifier=org.envirocar.wps.GetFuelPriceProcess&RawDataOutput=fuelPrice&DataInputs=fuelType=";

?>
4 changes: 1 addition & 3 deletions assets/includes/connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,4 @@ function processTrackNumberResponse($response) {
} else {
return $response['status'];
}
}

?>
}
3 changes: 1 addition & 2 deletions assets/includes/fuelprices.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@
}else{
echo $response['status'];
}
}
?>
}
6 changes: 1 addition & 5 deletions assets/includes/get.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,4 @@

}
}
}




}
6 changes: 1 addition & 5 deletions assets/includes/groups.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,4 @@
}else{
echo $response['status'];
}
}



?>
}
3 changes: 1 addition & 2 deletions assets/includes/lang_de.php
Original file line number Diff line number Diff line change
Expand Up @@ -763,5 +763,4 @@

//Badges
$availableBadges = "Verfügbare Badges";
$badges = "Badges";
?>
$badges = "Badges";
3 changes: 1 addition & 2 deletions assets/includes/lang_en.php
Original file line number Diff line number Diff line change
Expand Up @@ -756,5 +756,4 @@

//Badges
$availableBadges = "Available Badges";
$badges = "Badges";
?>
$badges = "Badges";
4 changes: 1 addition & 3 deletions assets/includes/language.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,4 @@
}


include('lang_'.$lang.'.php');

?>
include('lang_'.$lang.'.php');
4 changes: 1 addition & 3 deletions assets/includes/maps.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,4 @@
}else{
echo $response['status'];
}
}

?>
}
5 changes: 1 addition & 4 deletions assets/includes/recaptchalib.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,4 @@ function recaptcha_mailhide_html($pubkey, $privkey, $email) {
return htmlentities($emailparts[0]) . "<a href='" . htmlentities ($url) .
"' onclick=\"window.open('" . htmlentities ($url) . "', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" title=\"Reveal this e-mail address\">...</a>@" . htmlentities ($emailparts [1]);

}


?>
}
5 changes: 2 additions & 3 deletions assets/includes/registration_validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,5 @@ function(response){
</div>
</div>

<?
include('footer.php');
?>
<?php
include('footer.php');
4 changes: 1 addition & 3 deletions assets/includes/terms.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,4 @@
}else{
echo $response['status'];
}
}

?>
}
9 changes: 3 additions & 6 deletions assets/includes/tracks.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
require_once('connection.php');
require_once('config.php');

$resp = get_request_with_headers($serverurl."/tracks/?limit=1&page=0", false);

echo processTrackNumberResponse($resp);


?>
$resp = get_request_with_headers($serverurl."/tracks/?limit=1&page=0", false);

echo processTrackNumberResponse($resp);
5 changes: 1 addition & 4 deletions assets/includes/users.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,4 @@
}else{
echo $response['status'];
}
}


?>
}
Loading