diff options
| author | Nathan Kinkade <nath@nkinka.de> | 2012-12-31 15:27:39 +0000 |
|---|---|---|
| committer | Nathan Kinkade <nath@nkinka.de> | 2012-12-31 15:27:39 +0000 |
| commit | 0b07d7392c2e269bbc6944cd9ab72900126b9f7c (patch) | |
| tree | 0a6694a0fa454d6a97b5d20fbde5c4322c337037 | |
| parent | cb977f3c5c80f4a4ca58437c7479d2e431a089e0 (diff) | |
Removed .php extension from URLs.
| -rw-r--r-- | edit_food.php | 2 | ||||
| -rw-r--r-- | lib/site.lib.php | 2 | ||||
| -rw-r--r-- | meta.php | 10 | ||||
| -rw-r--r-- | nutrient_chooser.php | 2 | ||||
| -rw-r--r-- | templates/about.tpl | 2 | ||||
| -rw-r--r-- | templates/download.tpl | 2 | ||||
| -rw-r--r-- | templates/edit_meal.tpl | 2 | ||||
| -rw-r--r-- | templates/food_quantity.tpl | 2 | ||||
| -rw-r--r-- | templates/food_search.tpl | 18 | ||||
| -rw-r--r-- | templates/footer.tpl | 4 | ||||
| -rw-r--r-- | templates/header.tpl | 18 | ||||
| -rw-r--r-- | templates/index.tpl | 6 | ||||
| -rw-r--r-- | templates/list_diaries.tpl | 4 | ||||
| -rw-r--r-- | templates/list_foods.tpl | 4 | ||||
| -rw-r--r-- | templates/list_meals.tpl | 4 | ||||
| -rw-r--r-- | templates/manage.tpl | 18 | ||||
| -rw-r--r-- | templates/nutrient_search.tpl | 6 | ||||
| -rw-r--r-- | templates/register.tpl | 2 | ||||
| -rw-r--r-- | templates/sidebar_left.tpl | 12 | ||||
| -rw-r--r-- | templates/view_diary.tpl | 12 | ||||
| -rw-r--r-- | templates/view_food.tpl | 10 | ||||
| -rw-r--r-- | templates/view_meal.tpl | 10 | ||||
| -rw-r--r-- | view_diary.php | 2 | ||||
| -rw-r--r-- | view_food.php | 2 | ||||
| -rw-r--r-- | view_meal.php | 6 |
25 files changed, 81 insertions, 81 deletions
diff --git a/edit_food.php b/edit_food.php index 6c60023..295b84d 100644 --- a/edit_food.php +++ b/edit_food.php @@ -107,7 +107,7 @@ switch ( $_POST['action'] ) { } break; case "Edit": - header("Location: {$config->_rootUri}/edit_food.php?food={$_POST['food']}&action=showFoods"); + header("Location: {$config->_rootUri}/edit_food?food={$_POST['food']}&action=showFoods"); exit; break; case "Modify": diff --git a/lib/site.lib.php b/lib/site.lib.php index d581cdb..e5c457b 100644 --- a/lib/site.lib.php +++ b/lib/site.lib.php @@ -459,7 +459,7 @@ function loadFoodToEdit($food) { $foodDesc = htmlspecialchars($foodItem['description'], ENT_QUOTES); $foodToEdit .= <<<HTML - <form action='edit_food.php' method='post' name='formEditFood' id='formEditFood' onsubmit='return validateEditFood("formEditFood");'> + <form action='edit_food' method='post' name='formEditFood' id='formEditFood' onsubmit='return validateEditFood("formEditFood");'> <div><strong>Food name</strong>: <input type='text' name='foodDesc' id='foodDesc' value='$foodDesc' size='25' /></div> <div style='margin-left: 3ex; margin-bottom: 1ex;'> => <strong>Amount</strong>: <input type='text' name='quantity' value='{$foodItem['quantity']}' size='2' /> @@ -39,7 +39,7 @@ $commonHeaders .= str_replace("&", "&", $xajax->getJavascript($config->_jsUr switch ( $config->_thisScript ) { - case "view_food.php": + case "view_food": $myHeaders = <<<HEADERS <link href='{$config->_jsUri}/jscalendar/calendar-system.css' type='text/css' rel='stylesheet' /> @@ -51,7 +51,7 @@ $commonHeaders HEADERS; break; - case "view_meal.php": + case "view_meal": $myHeaders = <<<HEADERS <link href='{$config->_jsUri}/jscalendar/calendar-system.css' type='text/css' rel='stylesheet' /> @@ -63,7 +63,7 @@ $commonHeaders HEADERS; break; - case "view_diary.php": + case "view_diary": $myHeaders = <<<HEADERS <link href='{$config->_jsUri}/jscalendar/calendar-system.css' type='text/css' rel='stylesheet' /> @@ -75,7 +75,7 @@ $commonHeaders HEADERS; break; - case "register.php": + case "register": $myHeaders = <<<HEADERS <link href='{$config->_jsUri}/jscalendar/calendar-system.css' type='text/css' rel='stylesheet' /> @@ -87,7 +87,7 @@ $commonHeaders HEADERS; break; - case "edit_account.php": + case "edit_account": $myHeaders = <<<HEADERS <link href='{$config->_jsUri}/jscalendar/calendar-system.css' type='text/css' rel='stylesheet' /> diff --git a/nutrient_chooser.php b/nutrient_chooser.php index fb1f1da..fa105b2 100644 --- a/nutrient_chooser.php +++ b/nutrient_chooser.php @@ -58,7 +58,7 @@ if ( isset($_POST['setNutrients']) ) { $_SESSION['systemMsg'] = "<span class='msgError'>There were errors saving your nutrient list.</span>"; } # redirect the user back to this same page with a GET request - header("Location: {$config->_rootUri}/nutrient_chooser.php"); + header("Location: {$config->_rootUri}/nutrient_chooser"); exit; } diff --git a/templates/about.tpl b/templates/about.tpl index 9abfd03..7bad288 100644 --- a/templates/about.tpl +++ b/templates/about.tpl @@ -9,7 +9,7 @@ <div class='standardMargins'> The software that runs this site is <a href="http://www.gnu.org/philosophy/free-sw.html">free</a>. It is released under an <a href="http://www.opensource.org/licenses/mit-license.php">MIT (X11)</a> - license. You can <a href="download.php">download</a> the source code and the + license. You can <a href="download">download</a> the source code and the database, alter it, improve it or otherwise do whatever you like with it. If you'd like to help improve NutriDB, then feel free to send patches or other improvements. diff --git a/templates/download.tpl b/templates/download.tpl index 340a5bf..e98c7af 100644 --- a/templates/download.tpl +++ b/templates/download.tpl @@ -7,7 +7,7 @@ <h2 style='text-align: center;'>DOWNLOAD</h2> <div class='standardMargins'> - The software that runs <a href="about.php">NutriDB</a> is released under an <a href="http://www.opensource.org/licenses/mit-license.php">MIT (X11)</a> license. + The software that runs <a href="about">NutriDB</a> is released under an <a href="http://www.opensource.org/licenses/mit-license.php">MIT (X11)</a> license. </div> <div class='standardMargins'> diff --git a/templates/edit_meal.tpl b/templates/edit_meal.tpl index 70617cf..a6b1470 100644 --- a/templates/edit_meal.tpl +++ b/templates/edit_meal.tpl @@ -19,7 +19,7 @@ {/if} </div> <div style='float: left; overflow: auto; margin-bottom: 1em;'> - <form action='edit_meal.php' method='post' name='formEditMeal' id='formEditMeal' style='onsubmit='return validateEditMeal("formEditMeal");'> + <form action='edit_meal' method='post' name='formEditMeal' id='formEditMeal' style='onsubmit='return validateEditMeal("formEditMeal");'> <div id='editMeal' style='float: left; padding-left: 2ex; border-left: 1px solid black;'> {if $editMeal} <script type='text/javascript'>xajax_loadMealToEdit("{$editMeal}");</script> diff --git a/templates/food_quantity.tpl b/templates/food_quantity.tpl index 4f4e6d9..824861f 100644 --- a/templates/food_quantity.tpl +++ b/templates/food_quantity.tpl @@ -16,7 +16,7 @@ enter your own quantity, any decimal number is allowable, including fractionals. </div> - <form action='view_food.php' method='post' id='formFoodQuantity' style='margin-top: 2ex;'> + <form action='view_food' method='post' id='formFoodQuantity' style='margin-top: 2ex;'> <div> <input type='radio' name='quantitySource' value='predefined' checked='checked' /> Select a predefined quantity/weight: diff --git a/templates/food_search.tpl b/templates/food_search.tpl index 4c488e7..e265360 100644 --- a/templates/food_search.tpl +++ b/templates/food_search.tpl @@ -12,7 +12,7 @@ {if isset($searchResults)} <div style='margin-top: 2ex;'> The following items matched your search. - Select one, or <a href='index.php?{$smarty.server.QUERY_STRING}'>refine your search</a>. + Select one, or <a href='/?{$smarty.server.QUERY_STRING}'>refine your search</a>. </div> <div style='margin-top: 2ex;'> {if $sortType == "Category"} @@ -21,11 +21,11 @@ {foreach from=$foodCat.searchResults item=searchResult} <div> {if $category == "userFood"} - <a href='view_food.php?{$searchResult.food}&description={$searchResult.foodDesc}'>{$searchResult.foodDesc}</a> + <a href='view_food?{$searchResult.food}&description={$searchResult.foodDesc}'>{$searchResult.foodDesc}</a> {elseif $category == "userMeal"} - <a href='view_meal.php?meal={$searchResult.food}&description={$searchResult.foodDesc}'>{$searchResult.foodDesc}</a> + <a href='view_meal?meal={$searchResult.food}&description={$searchResult.foodDesc}'>{$searchResult.foodDesc}</a> {else} - <a href='food_quantity.php?food={$searchResult.food}'>{$searchResult.foodDesc}</a> + <a href='food_quantity?food={$searchResult.food}'>{$searchResult.foodDesc}</a> {/if} </div> {/foreach} @@ -34,11 +34,11 @@ {foreach from=$searchResults item=searchResult} <div> {if $searchResult.category == "userFood"} - <a href='view_food.php?{$searchResult.food}&description={$searchResult.foodDesc|escape:"html"}'>{$searchResult.foodDesc|escape:"html"}</a> + <a href='view_food?{$searchResult.food}&description={$searchResult.foodDesc|escape:"html"}'>{$searchResult.foodDesc|escape:"html"}</a> {elseif $searchResult.category == "userMeal"} - <a href='view_meal.php?meal={$searchResult.food}&description={$searchResult.foodDesc|escape:"html"}'>{$searchResult.foodDesc|escape:"html"}</a> + <a href='view_meal?meal={$searchResult.food}&description={$searchResult.foodDesc|escape:"html"}'>{$searchResult.foodDesc|escape:"html"}</a> {else} - <a href='food_quantity.php?food={$searchResult.food}'>{$searchResult.foodDesc|escape:"html"}</a> + <a href='food_quantity?food={$searchResult.food}'>{$searchResult.foodDesc|escape:"html"}</a> {/if} </div> {/foreach} @@ -52,10 +52,10 @@ <span class='msgError'>No items matched your search.</span><br /> </div> <div> - Would you like to <a href='index.php?{$smarty.server.QUERY_STRING}'>refine your search</a>? + Would you like to <a href='/?{$smarty.server.QUERY_STRING}'>refine your search</a>? </div> <div> - Don't understand the search options? See the <a href='faq.php#searching'>help</a> on searching. + Don't understand the search options? See the <a href='faq#searching'>help</a> on searching. </div> {/if} </div> diff --git a/templates/footer.tpl b/templates/footer.tpl index 648ce1d..be3eff6 100644 --- a/templates/footer.tpl +++ b/templates/footer.tpl @@ -1,8 +1,8 @@ <div id='footer'> <div id='footerLinks'> - <a href='index.php'>Search</a> | - <a href='faq.php'>FAQ</a> | + <a href='/'>Search</a> | + <a href='faq'>FAQ</a> | <a href='terms.html' onclick='openInNewWindow("terms.html"); return false;'>Terms & Conditions</a> </div> </div> diff --git a/templates/header.tpl b/templates/header.tpl index cd64c20..f8331f3 100644 --- a/templates/header.tpl +++ b/templates/header.tpl @@ -4,7 +4,7 @@ <head>{$myHeaders}</head> -{if $config->_thisScript == "index.php"} +{if $config->_thisScript == "/"} <body onload='getElement("searchForm").searchString.focus();'> {else} <body> @@ -20,19 +20,19 @@ {if isset($isLoggedIn)} <div id='headerRight'> Hi {$smarty.session.user.username|escape:"html"}.<br /> - [<a href='logout.php'>Logout</a>] + [<a href='logout'>Logout</a>] </div> {else} <div id='headerRight'> - <form action='login.php' method='post' id='loginForm' onsubmit='return validateLoginFields();'> + <form action='login' method='post' id='loginForm' onsubmit='return validateLoginFields();'> <div id='loginLeft'> Login <input type='text' name='username' id='username' size='15' maxlength='25' /><br /> Password <input type='password' name='password' id='password' size='15' maxlength='25' /> </div> <div id='loginRight'> <input type='submit' name='doLogin' value='Login' style='margin-bottom: 1ex;' /><br /> - <a href='register.php'>Register</a>. + <a href='register'>Register</a>. </div> </form> </div> @@ -41,11 +41,11 @@ <div id='headerLinkBar'> <div id='headerLinks'> <a href='{$config->_rootUri}' title='Home/Search Page'>Search</a> | - <a href='about.php' title='About nutridb.org'>About</a> | - <a href='guide.php' title='A brief guide'>Guide</a> | - <a href='faq.php' title='FAQ'>FAQ</a> | - <a href='download.php' title='Download'>Download</a> | - <a href='contact.php' title='Contact'>Contact</a> + <a href='about' title='About nutridb.org'>About</a> | + <a href='guide' title='A brief guide'>Guide</a> | + <a href='faq' title='FAQ'>FAQ</a> | + <a href='download' title='Download'>Download</a> | + <a href='contact' title='Contact'>Contact</a> </div> <div id='systemMsgs'>{$systemMsg}</div> </div> diff --git a/templates/index.tpl b/templates/index.tpl index 809f022..b7de395 100644 --- a/templates/index.tpl +++ b/templates/index.tpl @@ -3,14 +3,14 @@ <div id='middleColumn'> <div id='middleData'> - <form action='food_search.php' method='post' id='searchForm' onsubmit='return validateSearchBox();'> + <form action='food_search' method='post' id='searchForm' onsubmit='return validateSearchBox();'> <div class='standardMargins' style='text-align: justify;'> <span style="font-size: 110%; font-weight: bold;">Welcome to NutriDB.</span> NutriDB is simple tool which allows you to view nutritional information for a particular food, or calculate the nutritional profile of a whole recipe. </div> <div class='standardMargins' style='text-align: justify;'> - The default <a href='faq.php#searching'>search options</a> are fine for most + The default <a href='faq#searching'>search options</a> are fine for most people, but a few extras are added for anyone needing or wanting a bit of extra control. Just type something in the search box and press the Search button to get started. @@ -77,7 +77,7 @@ the highest concentrations of the specified nutrient. </div> - <form action='nutrient_search.php' method='post' id='nutrientSearchForm'> + <form action='nutrient_search' method='post' id='nutrientSearchForm'> <div> <select name='nutrient'> {foreach from=$nutrientList item=nutrient} diff --git a/templates/list_diaries.tpl b/templates/list_diaries.tpl index b7012e2..df1d0fd 100644 --- a/templates/list_diaries.tpl +++ b/templates/list_diaries.tpl @@ -8,7 +8,7 @@ {if $diaryCount < 50} <div> {foreach from=$userDiaries item=userDiary name=userDiaries} - <div>{$smarty.foreach.userDiaries.iteration}) <a href='view_diary.php?diary={$userDiary.id}&action=viewDiary'>{$userDiary.description|escape:'html'}</a></div> + <div>{$smarty.foreach.userDiaries.iteration}) <a href='view_diary?diary={$userDiary.id}&action=viewDiary'>{$userDiary.description|escape:'html'}</a></div> {/foreach} </div> {else} @@ -19,7 +19,7 @@ </div> <div style='float: left; width: 49%;'> {/if} - <div>{$smarty.foreach.userDiaries.iteration}) <a href='view_diary.php?diary={$userDiary.id}&action=viewDiary'>{$userDiary.description|escape:'html'}</a></div> + <div>{$smarty.foreach.userDiaries.iteration}) <a href='view_diary?diary={$userDiary.id}&action=viewDiary'>{$userDiary.description|escape:'html'}</a></div> {/foreach} </div> {/if} diff --git a/templates/list_foods.tpl b/templates/list_foods.tpl index 7c35c23..0b614ca 100644 --- a/templates/list_foods.tpl +++ b/templates/list_foods.tpl @@ -8,7 +8,7 @@ {if $foodCount < 50} <div> {foreach from=$userFoods item=userFood name=userFoods} - <div>{$smarty.foreach.userFoods.iteration}) <a href='view_food.php?food={$userFood.food}&weight={$userFood.weight}&quantity={$userFood.quantity}&description={$userFood.description|escape:'url'}&action=viewFood'>{$userFood.description|escape:'html'}</a></div> + <div>{$smarty.foreach.userFoods.iteration}) <a href='view_food?food={$userFood.food}&weight={$userFood.weight}&quantity={$userFood.quantity}&description={$userFood.description|escape:'url'}&action=viewFood'>{$userFood.description|escape:'html'}</a></div> {/foreach} </div> {else} @@ -19,7 +19,7 @@ </div> <div style='float: left; width: 49%;'> {/if} - <div>{$smarty.foreach.userFoods.iteration}) <a href='view_food.php?food={$userFood.food}&weight={$userFood.weight}&quantity={$userFood.quantity}&description={$userFood.description|escape:'url'}&action=viewFood'>{$userFood.description|escape:'html'}</a></div> + <div>{$smarty.foreach.userFoods.iteration}) <a href='view_food?food={$userFood.food}&weight={$userFood.weight}&quantity={$userFood.quantity}&description={$userFood.description|escape:'url'}&action=viewFood'>{$userFood.description|escape:'html'}</a></div> {/foreach} </div> {/if} diff --git a/templates/list_meals.tpl b/templates/list_meals.tpl index 0580170..e7aa0bf 100644 --- a/templates/list_meals.tpl +++ b/templates/list_meals.tpl @@ -8,7 +8,7 @@ {if $mealCount < 50} <div> {foreach from=$userMeals item=userMeal name=userMeals} - <div>{$smarty.foreach.userMeals.iteration}) <a href='view_meal.php?meal={$userMeal.id}&action=viewMeal'>{$userMeal.description|escape:'html'}</a></div> + <div>{$smarty.foreach.userMeals.iteration}) <a href='view_meal?meal={$userMeal.id}&action=viewMeal'>{$userMeal.description|escape:'html'}</a></div> {/foreach} </div> {else} @@ -19,7 +19,7 @@ </div> <div style='float: left; width: 49%;'> {/if} - <div>{$smarty.foreach.userMeals.iteration}) <a href='view_meal.php?meal={$userMeal.id}&action=viewMeal'>{$userMeal.description|escape:'html'}</a></div> + <div>{$smarty.foreach.userMeals.iteration}) <a href='view_meal?meal={$userMeal.id}&action=viewMeal'>{$userMeal.description|escape:'html'}</a></div> {/foreach} </div> {/if} diff --git a/templates/manage.tpl b/templates/manage.tpl index 6205f42..5a26d8b 100644 --- a/templates/manage.tpl +++ b/templates/manage.tpl @@ -8,7 +8,7 @@ <div style='border: 1px solid black;'> {if $favFoods} <div style='padding: 1ex;'> - <form action='edit_food.php' method='post' name='formQuickEditFood' id='formQuickEditFood' onsubmit='return validateEditFood("formQuickEditFood");'> + <form action='edit_food' method='post' name='formQuickEditFood' id='formQuickEditFood' onsubmit='return validateEditFood("formQuickEditFood");'> <div style='float: left; margin-right: .5ex; overflow: auto;'> <strong>Foods:</strong><br /> <select name='food' id='foodId'> @@ -41,7 +41,7 @@ {/if} {if $favMeals} <div style='padding: 1ex;'> - <form action='edit_meal.php' method='post' name='formQuickEditMeal' id='formQuickEditMeal' onsubmit='return validateEditMeal("formQuickEditMeal");'> + <form action='edit_meal' method='post' name='formQuickEditMeal' id='formQuickEditMeal' onsubmit='return validateEditMeal("formQuickEditMeal");'> <div style='float: left; margin-right: .5ex; overflow: auto;'> <strong>Meals:</strong><br /> <select name='meal' id='meal'> @@ -74,7 +74,7 @@ {/if} {if $userDiaries} <div style='margin: 1ex;'> - <form action='edit_diary.php' method='post' name='formQuickEditDiary' id='formQuickEditDiary' onsubmit='return validateEditDiary("formQuickEditDiary");'> + <form action='edit_diary' method='post' name='formQuickEditDiary' id='formQuickEditDiary' onsubmit='return validateEditDiary("formQuickEditDiary");'> <div style='float: left; margin-right: .5ex; overflow: auto;'> <strong>Diaries:</strong><br /> <select name='diary' id='diaryId'> @@ -107,17 +107,17 @@ </div> <div style='margin-top: 2ex; margin-bottom: 2ex;'> - <a href='edit_food.php?action=showFoods'>Edit foods</a> - use this section to edit any/all foods, + <a href='edit_food?action=showFoods'>Edit foods</a> - use this section to edit any/all foods, not just favorites. </div> <div style='margin-top: 2ex; margin-bottom: 2ex;'> - <a href='edit_meal.php?action=showMeals'>Edit recipes</a> - use this section to edit any/all recipes, + <a href='edit_meal?action=showMeals'>Edit recipes</a> - use this section to edit any/all recipes, not just favorites. </div> <div style='margin-top: 2ex; margin-bottom: 2ex;'> - <form action='add_diary.php' method='post' onsubmit='return validateCreateDiary("newDiaryName");'> + <form action='add_diary' method='post' onsubmit='return validateCreateDiary("newDiaryName");'> <div> <strong>Create</strong> a new diary named <input type='text' name='newDiaryName' id='newDiaryName' /> @@ -126,7 +126,7 @@ </form> </div> <div style='margin-top: 2ex; margin-bottom: 2ex; text-align: justify;'> - <a href='nutrient_chooser.php'>Edit your list of standard nutrients.</a> There is + <a href='nutrient_chooser'>Edit your list of standard nutrients.</a> There is a large number of nutrients available for most foods. Usually you will not be concerned with the majority of them, but rather only a small percentage of the available nutrients. Use this section to filter out the nutrients you do not want @@ -135,10 +135,10 @@ </div> <div style='margin-top: 2ex; margin-bottom: 2ex; text-align: justify;'> - <a href='edit_account.php'>Edit your profile.</a> Here you can change + <a href='edit_account'>Edit your profile.</a> Here you can change things like your password, username, birthday or gender. <!-- - <a href='edit_account.php'>Edit your profile.</a> Here you can change + <a href='edit_account'>Edit your profile.</a> Here you can change things like your password, username, birthday, gender, or even delete your whole account and all the data associated with it. --> diff --git a/templates/nutrient_search.tpl b/templates/nutrient_search.tpl index 1f3173c..146cb0b 100644 --- a/templates/nutrient_search.tpl +++ b/templates/nutrient_search.tpl @@ -16,7 +16,7 @@ <div style='margin-top: 2ex;'> <ol> {foreach from=$searchResults item=searchResult} - <li><a href='food_quantity.php?food={$searchResult.food}'>({$searchResult.nutr_val}{$searchResult.units}) {$searchResult.foodDesc}</a><br /></li> + <li><a href='food_quantity?food={$searchResult.food}'>({$searchResult.nutr_val}{$searchResult.units}) {$searchResult.foodDesc}</a><br /></li> {/foreach} </ol> </div> @@ -28,10 +28,10 @@ <span class='msgError'>No items matched your search.</span><br /> </div> <div> - Would you like to <a href='index.php?{$smarty.server.QUERY_STRING}'>refine your search</a>? + Would you like to <a href='/?{$smarty.server.QUERY_STRING}'>refine your search</a>? </div> <div> - Don't understand the search options? See the <a href='faq.php#searching'>help</a> on searching. + Don't understand the search options? See the <a href='faq#searching'>help</a> on searching. </div> {/if} </div> diff --git a/templates/register.tpl b/templates/register.tpl index 94a36ae..d2edd0c 100644 --- a/templates/register.tpl +++ b/templates/register.tpl @@ -16,7 +16,7 @@ address, or any other personal/private information, nor does nutridb.org want this information. Below you simply need to select a unique login name, a password and basic age/gender information. For more information see the help regarding - <a href='faq.php#whyregister'>why you might want to register</a>. + <a href='faq#whyregister'>why you might want to register</a>. </div> </div> <div class='registerDiv'> diff --git a/templates/sidebar_left.tpl b/templates/sidebar_left.tpl index d17a8d5..5821eb8 100644 --- a/templates/sidebar_left.tpl +++ b/templates/sidebar_left.tpl @@ -4,11 +4,11 @@ {foreach from=$currentMealItems key=key item=currentMealItem} <div id='currentMealItem-{$key}'> <a href='{$smarty.server.REQUEST_URI}' onclick='verifyRemoveCurrentMealItem("{$key}"); return false;' title='Remove: {$currentMealItem.description|escape:"html"}'><img src='{$config->_imgUri}/remove.png' alt='(Del)' /></a> - <a href='view_food.php?food={$currentMealItem.food}&weight={$currentMealItem.weight}&quantity={$currentMealItem.quantity}&description={$currentMealItem.description|escape:"url"}&action=viewFood' id='currentMealItemDesc-{$key}' title='View this item'>{$currentMealItem.description|escape:"html"}</a> + <a href='view_food?food={$currentMealItem.food}&weight={$currentMealItem.weight}&quantity={$currentMealItem.quantity}&description={$currentMealItem.description|escape:"url"}&action=viewFood' id='currentMealItemDesc-{$key}' title='View this item'>{$currentMealItem.description|escape:"html"}</a> </div> {/foreach} <div style='margin-top: 1ex;'> - <a href='view_meal.php?meal=0&action=getMeal' title='View current recipe'>View recipe</a> | + <a href='view_meal?meal=0&action=getMeal' title='View current recipe'>View recipe</a> | <a href='{$smarty.server.REQUEST_URI}' onclick='verifyClearCurrentMeal(); return false;' title='Remove all recipe items'>Clear recipe</a> </div> {else} @@ -19,7 +19,7 @@ <div style='margin-top: 2ex;'><strong>Favorites:</strong></div> <div style='margin-top: 1ex;'> {if $favFoods} - <form action='view_food.php' method='post' id='frmFavFoods' style='margin: 0;'> + <form action='view_food' method='post' id='frmFavFoods' style='margin: 0;'> <select name='queryString' style='width: 100%;' onchange='return submitForm("frmFavFoods");'> <option value=''> -- Foods -- </option> <option value='viewAllFoods'>[View All]</option> @@ -35,7 +35,7 @@ </div> <div style='margin-top: 1ex;'> {if $favMeals} - <form action='view_meal.php' method='post' id='frmFavMeals' style='margin: 0;'> + <form action='view_meal' method='post' id='frmFavMeals' style='margin: 0;'> <select name='meal' style='width: 100%;' onchange='return submitForm("frmFavMeals");'> <option value=''> -- Recipes -- </option> <option value='viewAllMeals'>[View All]</option> @@ -51,7 +51,7 @@ </div> <div style='margin-top: 1ex;'> {if $userDiaries} - <form action='view_diary.php' method='post' id='frmFavDiaries' style='margin: 0;'> + <form action='view_diary' method='post' id='frmFavDiaries' style='margin: 0;'> <select name='diary' style='width: 100%;' onchange='return submitForm("frmFavDiaries");'> <option value=''> -- Diaries -- </option> <option value='viewAllDiaries'>[View All]</option> @@ -66,6 +66,6 @@ {/if} </div> <div style='margin-top: 2ex;'> - <a href='manage.php'>Manage account</a>. + <a href='manage'>Manage account</a>. </div> {/if} diff --git a/templates/view_diary.tpl b/templates/view_diary.tpl index 52f65e4..1a55605 100644 --- a/templates/view_diary.tpl +++ b/templates/view_diary.tpl @@ -15,7 +15,7 @@ var m = calendar.date.getMonth(); var d = calendar.date.getDate(); {/literal} - window.location = "view_diary.php?diary={$smarty.get.diary}&action=viewDiary&date=" + y + "-" + (m + 1) + "-" + d; + window.location = "view_diary?diary={$smarty.get.diary}&action=viewDiary&date=" + y + "-" + (m + 1) + "-" + d; {literal} } } @@ -36,7 +36,7 @@ <div style='margin-bottom: 2ex;'> Navigate this diary with the calendar. </div> - <form action='edit_diary.php' method='post' id='formEditDiary' onsubmit='return validateAddDiaryNote("formEditDiary");'> + <form action='edit_diary' method='post' id='formEditDiary' onsubmit='return validateAddDiaryNote("formEditDiary");'> <div><strong>Add a note to this diary:</strong></div> <textarea name='note' rows='3' style='width: 97%;'></textarea> <div style='margin-bottom: .5em;'> @@ -44,7 +44,7 @@ <input type='hidden' name='diary' value='{$smarty.get.diary}' /> <input type='submit' name='doAddNote' value='Add note' /> with - <a href='faq.php#timestamp' title='What is a diary timestamp?'>timestamp</a> + <a href='faq#timestamp' title='What is a diary timestamp?'>timestamp</a> <input type='text' name='diaryTimestamp' id='diaryTimestamp' readonly='readonly' value='{$smarty.get.date|date_format:"%Y-%m-%d"}' size='20' /> <script type="text/javascript"> Calendar.setup( @@ -82,9 +82,9 @@ {foreach from=$diaryItems item=diaryItem} <tr class='{cycle values="bgDark,bgLight"}' id='itemRow-{$diaryItem.id}'> {if $diaryItem.type == "Food"} - <td><a href='view_food.php?{$diaryItem.uri}' id='itemDesc-{$diaryItem.id}'>{$diaryItem.description}</a></td> + <td><a href='view_food?{$diaryItem.uri}' id='itemDesc-{$diaryItem.id}'>{$diaryItem.description}</a></td> {elseif $diaryItem.type == "Meal"} - <td><a href='view_meal.php?{$diaryItem.uri}' id='itemDesc-{$diaryItem.id}'>{$diaryItem.description}</a></td> + <td><a href='view_meal?{$diaryItem.uri}' id='itemDesc-{$diaryItem.id}'>{$diaryItem.description}</a></td> {elseif $diaryItem.type == "Note"} <td><span id='itemDesc-{$diaryItem.id}'>{$diaryItem.data}</span></td> {/if} @@ -110,7 +110,7 @@ <a href='{$config->_rootUri}/{$config->_thisScript}?diary={$smarty.get.diary}&action={$smarty.get.action}&date={$smarty.get.date}&showall'> Show all nutrients</a> | {/if} - <a href='nutrient_chooser.php'>Manage nutrient list</a> + <a href='nutrient_chooser'>Manage nutrient list</a> </div> <div class='standardMargins' style='width: 100%;'> diff --git a/templates/view_food.tpl b/templates/view_food.tpl index 22acb20..b1b4aa7 100644 --- a/templates/view_food.tpl +++ b/templates/view_food.tpl @@ -22,7 +22,7 @@ Show all nutrients</a> {/if} {if $isLoggedIn} - | <a href='nutrient_chooser.php'>Manage nutrient list</a> + | <a href='nutrient_chooser'>Manage nutrient list</a> {/if} </div> <div style='width: 100%;'> @@ -47,7 +47,7 @@ </table> </div> <div style='margin-top: 1em;'> - <form action='add_food.php' method='post' id="formAddFood" onsubmit='return validateAddFood("formAddFood","foodDesc");'> + <form action='add_food' method='post' id="formAddFood" onsubmit='return validateAddFood("formAddFood","foodDesc");'> {if $isLoggedIn} <a name='save'></a> <div style='margin-bottom: .5em; text-align: justify;'> @@ -57,7 +57,7 @@ description may have been added for you. However, this description may not be very helpful and could possibly be quite long. You are encouraged to change this to something more meaningful, and possibly - shorter. Are you still <a href='faq.php#saving'>confused</a>? + shorter. Are you still <a href='faq#saving'>confused</a>? </div> <div style='margin-bottom: .5em;'> {if $foodDesc} @@ -89,7 +89,7 @@ </div> <div style='margin-bottom: .5em;'> with - <a href='faq.php#timestamp' title='What is a diary timestamp?'>timestamp</a> + <a href='faq#timestamp' title='What is a diary timestamp?'>timestamp</a> <input type='text' name='diaryTimestamp' id='diaryTimestamp' readonly='readonly' value='' /> <script type="text/javascript"> Calendar.setup( @@ -114,7 +114,7 @@ added for you. However, this description may not be very helpful and could possibly be quite long. You are encouraged to change this to something more meaningful, and possibly - shorter. Are you still <a href='faq.php#saving'>confused</a>? + shorter. Are you still <a href='faq#saving'>confused</a>? </div> <div style='margin-bottom: .5em;'> {if $foodDesc} diff --git a/templates/view_meal.tpl b/templates/view_meal.tpl index e97c08e..8e9732b 100644 --- a/templates/view_meal.tpl +++ b/templates/view_meal.tpl @@ -5,7 +5,7 @@ <div style='margin-bottom: 1em;'> <strong>Recipe</strong>: {$mealDesc} {if $isLoggedIn && $meal != "0"} - [<a href='edit_meal.php?meal={$meal}&action=showMeals'>Edit</a>] + [<a href='edit_meal?meal={$meal}&action=showMeals'>Edit</a>] {/if} </div> <div style='margin-bottom: 1em;'> @@ -17,7 +17,7 @@ Show all nutrients</a> {/if} {if $isLoggedIn} - | <a href='nutrient_chooser.php'>Manage nutrient list</a> + | <a href='nutrient_chooser'>Manage nutrient list</a> {/if} </div> <div style='width: 100%;'> @@ -45,14 +45,14 @@ </div> {if $isLoggedIn} <div style='margin-top: 1em;'> - <form action='add_meal.php' method='post' name='formAddMeal' id='formAddMeal' onsubmit='return validateAddMeal("formAddMeal","mealDesc");'> + <form action='add_meal' method='post' name='formAddMeal' id='formAddMeal' onsubmit='return validateAddMeal("formAddMeal","mealDesc");'> <a name='save'></a> <div style='margin-bottom: .5em; text-align: justify;'> If you would like to save this recipe for later reference, or add it to a diary, enter a short descriptive entry in the text box below and then select the appropriate button. If you are unsure how all of this works, then take a look at the help on - <a href='faq.php#recipes'>creating recipes</a>. + <a href='faq#recipes'>creating recipes</a>. </div> <div style='margin-bottom: .5em;'> <input type='text' name='description' id='mealDesc' style='width: 100%' value='{$mealDesc}' /> @@ -71,7 +71,7 @@ </select> </div> <div style='margin-bottom: .5em;'> - with <a href='faq.php#timestamp' title='What is a diary timestamp?'>timestamp</a> + with <a href='faq#timestamp' title='What is a diary timestamp?'>timestamp</a> <input type='text' name='diaryTimestamp' id='diaryTimestamp' readonly='readonly' value='' /> <script type="text/javascript"> Calendar.setup( diff --git a/view_diary.php b/view_diary.php index c46816e..998338d 100644 --- a/view_diary.php +++ b/view_diary.php @@ -26,7 +26,7 @@ if ( isset($_POST['action']) && ($_POST['action'] == "viewDiary") ) { # diaries was to simply stick an option in the "Favorites" menu in the # left sidebar, and that form directs the user here. if ( $_POST['diary'] == "viewAllDiaries" ) { - header("Location: {$config->_rootUri}/list_diaries.php"); + header("Location: {$config->_rootUri}/list_diaries"); exit; } else { $queryString = "diary={$_POST['diary']}&action=viewDiary"; diff --git a/view_food.php b/view_food.php index 04c6bd0..b927459 100644 --- a/view_food.php +++ b/view_food.php @@ -30,7 +30,7 @@ if ( isset($_POST['action']) && ($_POST['action'] == "viewFood") ) { # foods was to simply stick an option in the "Favorites" menu in the # left sidebar, and that form directs the user here. if ( isset($_POST['queryString']) && $_POST['queryString'] == "viewAllFoods" ) { - header("Location: {$config->_rootUri}/list_foods.php"); + header("Location: {$config->_rootUri}/list_foods"); exit; } else { header("Location: {$config->_rootUri}/{$config->_thisScript}?{$_POST['queryString']}"); diff --git a/view_meal.php b/view_meal.php index c5da293..028c01c 100644 --- a/view_meal.php +++ b/view_meal.php @@ -22,7 +22,7 @@ if ( isset($_POST['action']) && ($_POST['action'] == "viewMeal") ) { # meals was to simply stick an option in the "Favorites" menu in the # left sidebar, and that form directs the user here. if ( isset($_POST['meal']) && $_POST['meal'] == "viewAllMeals" ) { - header("Location: {$config->_rootUri}/list_meals.php"); + header("Location: {$config->_rootUri}/list_meals"); exit; } else { header("Location: {$config->_rootUri}/{$config->_thisScript}?meal={$_POST['meal']}&action=viewMeal"); @@ -84,7 +84,7 @@ if ( $_GET['meal'] == "0" ) { # only increment the counter if the previous page was food_search.php because # we don't want to increment the popularity while a user is just browsing around # in their own foods, but only if they got here from a search. -if ( strpos($config->_previousUri, "food_search.php") ) { +if ( strpos($config->_previousUri, "food_search") ) { incrementPopularityCounter($_GET['meal'], "userMeals"); } @@ -137,7 +137,7 @@ foreach ( $db->_rows as $row ) { foreach ( $currentMeal as $food ) { # add the description of this food to the array - $mealData['columnTitles'][] = "<a href='view_food.php?food={$food['food']}&weight={$food['weight']}&quantity={$food['quantity']}&description={$food['description']}&action=viewFood' class='whiteLink'>{$food['description']}</a>"; + $mealData['columnTitles'][] = "<a href='view_food?food={$food['food']}&weight={$food['weight']}&quantity={$food['quantity']}&description={$food['description']}&action=viewFood' class='whiteLink'>{$food['description']}</a>"; # do things a little different if the user is logged in if ( isLoggedIn() ) { |
