This repository has been archived by the owner on Nov 9, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
67101ed
commit bbb90d6
Showing
23 changed files
with
3,002 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
/** | ||
* This file contains the class of the RunalyzePluginPanel "Prognose". | ||
*/ | ||
$PLUGINKEY = 'RunalyzePluginPanel_Prognose'; | ||
/** | ||
* Class: RunalyzePluginPanel_Prognose | ||
* | ||
* @author Hannes Christiansen <[email protected]> | ||
* @version 1.0 | ||
* @uses class::Plugin | ||
* @uses class::PluginPanel | ||
* @uses class::Helper | ||
*/ | ||
class RunalyzePluginPanel_Prognose extends PluginPanel { | ||
/** | ||
* Initialize this plugin | ||
* @see PluginPanel::initPlugin() | ||
*/ | ||
protected function initPlugin() { | ||
$this->type = Plugin::$PANEL; | ||
$this->name = 'Prognose'; | ||
$this->description = 'Anzeige der aktuellen Wettkampfprognose.'; | ||
|
||
Error::getInstance()->addTodo('PrognosePanel: Add Zwischenzeiten/Marschtabelle', __FILE__, __LINE__); | ||
} | ||
|
||
/** | ||
* Set default config-variables | ||
* @see PluginPanel::getDefaultConfigVars() | ||
*/ | ||
protected function getDefaultConfigVars() { | ||
$config = array(); | ||
$config['distances'] = array('type' => 'array', 'var' => array(1, 3, 5, 10, 21.1, 42.2), 'description' => 'Distanzen für die Prognose (kommagetrennt)'); | ||
|
||
return $config; | ||
} | ||
|
||
/** | ||
* Method for getting the right symbol(s) | ||
* @see PluginPanel::getRightSymbol() | ||
*/ | ||
protected function getRightSymbol() { | ||
return ''; | ||
} | ||
|
||
/** | ||
* Display the content | ||
* @see PluginPanel::displayContent() | ||
*/ | ||
protected function displayContent() { | ||
foreach ($this->config['distances']['var'] as $km) | ||
echo Helper::Prognosis((double)$km, ((double)$km <= 3)); | ||
} | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<?php | ||
/** | ||
* This file contains the class of the RunalyzePluginPanel "Rechenspiele". | ||
*/ | ||
$PLUGINKEY = 'RunalyzePluginPanel_Rechenspiele'; | ||
/** | ||
* Class: RunalyzePluginPanel_Rechenspiele | ||
* | ||
* @author Hannes Christiansen <[email protected]> | ||
* @version 1.0 | ||
* @uses class::Plugin | ||
* @uses class::PluginPanel | ||
* @uses class::Helper | ||
* @uses class::JD | ||
* @uses class::Ajax | ||
* @uses MAX_ATL | ||
* @uses MAX_CTL | ||
* @uses VDOT_FORM | ||
*/ | ||
class RunalyzePluginPanel_Rechenspiele extends PluginPanel { | ||
/** | ||
* Initialize this plugin | ||
* @see PluginPanel::initPlugin() | ||
*/ | ||
protected function initPlugin() { | ||
$this->type = Plugin::$PANEL; | ||
$this->name = 'Rechenspiele'; | ||
$this->description = 'Anzeige von Rechenspielen zur Müdigkeit, Grundlagenausdauer und Trainingsform. Zusätzlich werden auch empfohlene Trainingsgeschwindigkeiten angezeigt.'; | ||
} | ||
|
||
/** | ||
* Set default config-variables | ||
* @see PluginPanel::getDefaultConfigVars() | ||
*/ | ||
protected function getDefaultConfigVars() { | ||
$config = array(); | ||
|
||
return $config; | ||
} | ||
|
||
/** | ||
* Method for getting the right symbol(s) | ||
* @see PluginPanel::getRightSymbol() | ||
*/ | ||
protected function getRightSymbol() { | ||
return Ajax::window('<a href="plugin/window.rechenspiele.form.php" title="Form anzeigen">'.Icon::get(Icon::$FATIGUE, 'Form anzeigen').'</a>').NL; | ||
} | ||
|
||
/** | ||
* Display the content | ||
* @see PluginPanel::displayContent() | ||
*/ | ||
protected function displayContent() { | ||
echo('<small class="right r">'); | ||
|
||
$vVDOT = JD::VDOT2v(VDOT_FORM); | ||
|
||
$t = array(); | ||
$t[] = array('kurz' => 'RL', 'pVDOT' => '59-64'); | ||
$t[] = array('kurz' => 'DL', 'pVDOT' => '65-74'); | ||
$t[] = array('kurz' => 'LL', 'pVDOT' => '65-74'); | ||
$t[] = array('kurz' => 'TDL', 'pVDOT' => '83-88'); | ||
$t[] = array('kurz' => 'IT', 'pVDOT' => '95-100'); | ||
$t[] = array('kurz' => 'WHL', 'pVDOT' => '105-110'); | ||
|
||
foreach ($t as $train) { | ||
$train_tempo = explode('-',$train['pVDOT']); | ||
echo (' | ||
'.$train['kurz'].': <em>'.JD::v2Pace($vVDOT*$train_tempo[1]/100).'</em> - <em>'.JD::v2Pace($vVDOT*$train_tempo[0]/100).'</em>/km<br />'); | ||
} | ||
|
||
$atl = (MAX_ATL == 0) ? 0 : round(100*Helper::ATL()/MAX_ATL); | ||
$ctl = (MAX_CTL == 0) ? 0 : round(100*Helper::CTL()/MAX_CTL); | ||
|
||
echo('</small> | ||
<div class="left" style="width:60%;"> | ||
<p><span>'.$atl.' %</span> <strong>Müdigkeit</strong> <small>(ATL)</small></p> | ||
<p><span>'.$ctl.' %</span> <strong>Fitnessgrad</strong> <small>(CTL)</small></p> | ||
<p><span>'.Helper::TSB().'</span> <strong>Stress Balance</strong> <small>(TSB)</small></p> | ||
<p><span>'.round(VDOT_FORM,2).'</span> <strong>VDOT</strong></p> | ||
<p><span>'.Helper::BasicEndurance().'</span> <strong>Grundlagenausdauer</strong></p> | ||
</div>'); | ||
|
||
echo HTML::clearBreak(); | ||
|
||
// Fix for clear break in IE | ||
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) | ||
echo ' '; | ||
} | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<?php | ||
/** | ||
* This file contains the class of the RunalyzePluginPanel "Schuhe". | ||
*/ | ||
$PLUGINKEY = 'RunalyzePluginPanel_Schuhe'; | ||
/** | ||
* Class: RunalyzePluginPanel_Schuhe | ||
* | ||
* @author Hannes Christiansen <[email protected]> | ||
* @version 1.0 | ||
* @uses class::Plugin | ||
* @uses class::PluginPanel | ||
* @uses class::Mysql | ||
* @uses inc/draw/plugin.schuhe.php | ||
*/ | ||
class RunalyzePluginPanel_Schuhe extends PluginPanel { | ||
/** | ||
* Initialize this plugin | ||
* @see PluginPanel::initPlugin() | ||
*/ | ||
protected function initPlugin() { | ||
$this->type = Plugin::$PANEL; | ||
$this->name = 'Schuhe'; | ||
$this->description = 'Anzeige der gelaufenen Kilometer aller Schuhe.'; | ||
} | ||
|
||
/** | ||
* Set default config-variables | ||
* @see PluginPanel::getDefaultConfigVars() | ||
*/ | ||
protected function getDefaultConfigVars() { | ||
$config = array(); | ||
|
||
return $config; | ||
} | ||
|
||
/** | ||
* Method for getting the right symbol(s) | ||
* @see PluginPanel::getRightSymbol() | ||
*/ | ||
protected function getRightSymbol() { | ||
return Ajax::window('<a href="plugin/window.schuhe.php" title="Schuh hinzufügen">'.Icon::get(Icon::$RUNNINGSHOE, 'Schuh hinzufügen').'</a>'); | ||
} | ||
|
||
/** | ||
* Display the content | ||
* @see PluginPanel::displayContent() | ||
*/ | ||
protected function displayContent() { | ||
echo('<div id="schuhe">'); | ||
|
||
$inuse = true; | ||
$schuhe = Mysql::getInstance()->fetchAsArray('SELECT `id`, `name`, `km`, `inuse` FROM `'.PREFIX.'shoe` ORDER BY `inuse` DESC, `km` DESC'); | ||
foreach ($schuhe as $i => $schuh) { | ||
if ($inuse && $schuh['inuse'] == 0) { | ||
echo('<div id="hiddenschuhe" style="display:none;">'.NL); | ||
$inuse = false; | ||
} | ||
|
||
echo(' | ||
<p style="background-image:url(inc/draw/plugin.schuhe.php?km='.round($schuh['km']).');"> | ||
<span>'.Helper::Km($schuh['km']).'</span> | ||
<strong>'.DataBrowser::getSearchLink($schuh['name'], 'opt[shoeid]=is&val[shoeid][0]='.$schuh['id']).'</strong> | ||
</p>'.NL); | ||
} | ||
|
||
if (!$inuse) | ||
echo '</div>'; | ||
echo '</div>'; | ||
|
||
echo Ajax::toggle('<a class="right" href="#schuhe" name="schuhe">Alte Schuhe anzeigen</a>', 'hiddenschuhe'); | ||
echo HTML::clearBreak(); | ||
} | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<?php | ||
/** | ||
* This file contains the class of the RunalyzePluginPanel "Sportler". | ||
*/ | ||
$PLUGINKEY = 'RunalyzePluginPanel_Sportler'; | ||
/** | ||
* Class: RunalyzePluginPanel_Sportler | ||
* | ||
* @author Hannes Christiansen <[email protected]> | ||
* @version 1.0 | ||
* @uses class::Plugin | ||
* @uses class::PluginPanel | ||
* @uses class::Mysql | ||
* @uses class::Ajax | ||
* @uses inc/draw/plugin.sportler.fett.php | ||
* @uses inc/draw/plugin.sportler.gewicht.php | ||
*/ | ||
class RunalyzePluginPanel_Sportler extends PluginPanel { | ||
/** | ||
* Initialize this plugin | ||
* @see PluginPanel::initPlugin() | ||
*/ | ||
protected function initPlugin() { | ||
$this->type = Plugin::$PANEL; | ||
$this->name = 'Sportler'; | ||
$this->description = 'Anzeige der Sportlerdaten wie Gewicht und aktueller Ruhepuls (auch als Diagramm).'; | ||
} | ||
|
||
/** | ||
* Set default config-variables | ||
* @see PluginPanel::getDefaultConfigVars() | ||
*/ | ||
protected function getDefaultConfigVars() { | ||
$config = array(); | ||
$config['use_weight'] = array('type' => 'bool', 'var' => true, 'description' => 'Gewicht protokollieren'); | ||
$config['use_body_fat'] = array('type' => 'bool', 'var' => true, 'description' => 'Fettanteil protokollieren'); | ||
$config['use_pulse'] = array('type' => 'bool', 'var' => true, 'description' => 'Ruhepuls protokollieren'); | ||
$config['wunschgewicht'] = array('type' => 'int', 'var' => 0, 'description' => 'Wunschgewicht'); | ||
|
||
return $config; | ||
} | ||
|
||
/** | ||
* Method for getting the right symbol(s) | ||
* @see PluginPanel::getRightSymbol() | ||
*/ | ||
protected function getRightSymbol() { | ||
return Ajax::window('<a href="plugin/window.sportler.php" title="Daten hinzufügen">'.Icon::get(Icon::$ADD, 'Daten hinzufügen').'</a>'); | ||
} | ||
|
||
/** | ||
* Display the content | ||
* @see PluginPanel::displayContent() | ||
*/ | ||
protected function displayContent() { | ||
echo(' | ||
<div id="sportler"> | ||
<div id="sportler-gewicht" class="change">'); | ||
|
||
$dat = User::getLastRow(); | ||
if ($this->config['use_weight']) | ||
$left = '<strong title="'.date("d.m.Y", $dat['time']).'">'.Helper::Unknown($dat['weight']).' kg</strong>'; | ||
|
||
if ($this->config['use_pulse']) | ||
$right = Helper::Unknown($dat['pulse_rest']).' bpm / '.Helper::Unknown($dat['pulse_max']).' bpm'; | ||
|
||
echo(' <p> | ||
<span>'.$right.'</span> | ||
<a class="change" href="sportler-analyse" target="sportler"><del>Analyse</del>/Allgemein:</a> | ||
'.$left.' | ||
</p> | ||
<div class="c"> | ||
<img src="inc/draw/plugin.sportler.gewicht.php" alt="Diagramm" style="width:320px; height:148px;" /> | ||
</div> | ||
</div> | ||
<div id="sportler-analyse" class="change" style="display:none;">'); | ||
|
||
$left = ''; $right = ''; | ||
if ($this->config['use_body_fat']) | ||
$left = '<small>'.Helper::Unknown($dat['fat']).'%Fett, '.Helper::Unknown($dat['water']).'%Wasser, '.Helper::Unknown($dat['muscles']).'%Muskeln</small>'; | ||
|
||
echo(' <p> | ||
<span>'.$right.'</span> | ||
<a class="change" href="sportler-gewicht" target="sportler">Analyse/<del>Allgemein</del>:</a> | ||
'.$left.' | ||
</p> | ||
<div class="c"> | ||
<img src="inc/draw/plugin.sportler.fett.php" alt="Diagramm" style="width:320px; height:148px;" /> | ||
</div> | ||
</div> | ||
</div>'); | ||
} | ||
} | ||
?> |
Oops, something went wrong.