Exemple #1
0
    public function getFormHtml()
    {
        ?>
			<fieldset>
				<legend><?php 
        echo Translator::get('module_config');
        ?>
</legend>
				<div class="form-fields">
					<?php 
        $this->addInputText('config[charset]', Translator::get('module_default_charset'), $this->config->get('charset'))->addInputText('config[language]', Translator::get('module_default_language'), $this->config->get('language'))->addInputText('config[locale]', Translator::get('module_default_locale'), $this->config->get('locale'))->addInputText('config[module]', Translator::get('module_default_module'), $this->config->get('module'))->addInputText('config[action]', Translator::get('module_default_action'), $this->config->get('action'));
        ?>
				</div>
			</fieldset>
			<?php 
        foreach ($this->envs as $env) {
            ?>
			<fieldset>
				<legend><?php 
            echo Translator::get('module_config_' . $env);
            ?>
</legend>
				<div class="form-fields">
					<?php 
            $this->addInputText('config[' . $env . '][http_host]', Translator::get('module_http_host'), $this->config->getEnvKey($env, 'http_host'))->addInputText('config[' . $env . '][contact]', Translator::get('module_contact'), $this->config->getEnvKey($env, 'contact'))->addInputText('config[' . $env . '][host]', Translator::get('module_database_host'), $this->config->getEnvKey($env, 'host'))->addInputText('config[' . $env . '][database]', Translator::get('module_database_database'), $this->config->getEnvKey($env, 'database'))->addInputText('config[' . $env . '][user]', Translator::get('module_database_user'), $this->config->getEnvKey($env, 'user'))->addInputText('config[' . $env . '][password]', Translator::get('module_database_password'), $this->config->getEnvKey($env, 'password'));
            ?>
				</div>
			</fieldset>
			<?php 
        }
        ?>
		<?php 
    }
Exemple #2
0
 public function get404()
 {
     $view = $this->getView('Errors::404');
     $layout = $this->getLayout('Default', $view);
     $layout->addBodyClass('error');
     $layout->addArianne(new Link(Translator::get('module_' . $this->response->request->module), UrlFactory::backTo($this->response->request->module)));
     $layout->addArianne(new Link('404'));
 }
Exemple #3
0
    public function renderHtml()
    {
        ?>
		<h1>404</h1>
		<p><?php 
        echo Translator::get('module_error404_text');
        ?>
</p>
	<?php 
    }
 public function updateAction()
 {
     if (empty($_GET['id']) || !($language = DBFactory::get($this->module)->get($_GET['id'])) instanceof Language) {
         Header::location(UrlFactory::module($this->module));
     }
     $this->valid($language, $_POST);
     $view = $this->getView('Form');
     $view->language = $language;
     $layout = $this->getLayout('Default', $view);
     $layout->addBreadcrumbsLink(new Link(Translator::get('module_languages'), UrlFactory::module($this->module)));
     $layout->addBreadcrumbsLink(new Link($language->name, UrlFactory::update($this->module, $language)));
     $layout->addBreadcrumbsLink(new Link(Translator::get('module_update')));
 }
    public function getFormHtml()
    {
        ?>
		<fieldset>
			<legend><?php 
        echo Translator::get('module_language');
        ?>
</legend>
	<?php 
        $this->addCheckbox('enabled', Translator::get('module_enabled'), $this->language->enabled)->addInputText('name', Translator::get('module_name'), $this->language->name)->addInputText('code', Translator::get('module_code'), $this->language->code)->addInputText('locale', Translator::get('module_locale'), $this->language->locale);
        ?>
		</fieldset>
	<?php 
    }
Exemple #6
0
 public function updateAction()
 {
     if (empty($_GET['id']) || !($admin = DBFactory::get($this->module)->get($_GET['id'])) instanceof Admin) {
         $this->response->location = UrlFactory::module($this->module);
         $this->response->status = Status::$NotFound;
     }
     $this->valid($admin, $_POST);
     $view = $this->getView('Form');
     $view->admin = $admin;
     $view->languages = DBFactory::get('languages')->getEnabled();
     $layout = $this->getLayout('Default', $view);
     $layout->addBreadcrumbsLink(new Link(Translator::get('module_admins'), UrlFactory::module($this->module)));
     $layout->addBreadcrumbsLink(new Link($admin->login, UrlFactory::update($this->module, $admin)));
     $layout->addBreadcrumbsLink(new Link(Translator::get('module_update')));
 }
    public function getFormHtml()
    {
        ?>
		<fieldset>
			<legend><?php 
        echo Translator::get('module_translation');
        ?>
</legend>
			<?php 
        $this->addInputText('variable', Translator::get('module_variable'), $this->translation->variable);
        foreach ($this->languages as $language) {
            $this->addInputText('languages[' . $language->code . ']', $language->displayFlag(), $this->translation->get($language));
        }
        ?>
		</fieldset>
		<?php 
    }
 public function updateAction()
 {
     if (empty($_GET['id']) || !($translation = DBFactory::get($this->module)->get($_GET['id'])) instanceof Translation) {
         Header::location(UrlFactory::module($this->module));
     }
     $this->valid($translation, $_POST);
     if (!empty($_POST)) {
         $this->generate();
     }
     $view = $this->getView('Form');
     $view->translation = $translation;
     $view->languages = DBFactory::get('languages')->getEnabled();
     $layout = $this->getLayout('Default', $view);
     $layout->addBreadcrumbsLink(new Link(Translator::get('module_translations'), UrlFactory::module($this->module)));
     $layout->addBreadcrumbsLink(new Link($translation->variable, UrlFactory::update($this->module, $translation)));
     $layout->addBreadcrumbsLink(new Link(Translator::get('module_update')));
 }
Exemple #9
0
    protected function addDeleteButton($object, $class = 'delete', $url = null, $module = null)
    {
        $module = is_null($module) ? $this->module : $module;
        $url = is_null($url) ? UrlFactory::delete($module, $object) : $url;
        ?>
		--><a class="icon-delete <?php 
        echo $class;
        ?>
" href="<?php 
        echo $url;
        ?>
" data-delete-message="<?php 
        echo Translator::get('module_delete_message') . ' ' . $object->getNameForDeleteMessage();
        ?>
 ?"></a><!--
	<?php 
        return $this;
    }
Exemple #10
0
    protected function getHeader()
    {
        ?>
		<th class="action-n2"></th>
		<th class="number"><?php 
        echo Translator::get('module_order');
        ?>
</th>
		<th class="number"><?php 
        echo Translator::get('module_enabled');
        ?>
</th>
		<th><?php 
        echo Translator::get('module_name');
        ?>
</th>
		<?php 
    }
Exemple #11
0
 public function indexAction()
 {
     if (!empty($_POST['config'])) {
         $tab = array();
         $export = array();
         $content = '<?php' . "\n";
         ob_start();
         var_export($_POST['config']);
         $tab = ob_get_contents();
         ob_end_clean();
         $content .= '$config = ' . $tab . ';';
         file_put_contents(ROOT . 'config.inc.php', $content);
     }
     $view = $this->getView('Form');
     $view->config = new Config();
     $layout = $this->getLayout('Default', $view);
     $layout->addBreadcrumbsLink(new Link(Translator::get('module_configs'), UrlFactory::module($this->module)));
     $layout->addBreadcrumbsLink(new Link(Translator::get('module_config')));
 }
Exemple #12
0
    public function getFormHtml()
    {
        $options = array();
        foreach ($this->languages as $language) {
            $options[$language->id] = $language->name;
        }
        ?>
		<fieldset>
			<legend><?php 
        echo Translator::get('module_admin');
        ?>
</legend>
			<div class="form-fields">
			<?php 
        $this->addCheckbox('heurisko', Translator::get('module_login'), $this->admin->isHeurisko())->addInputText('first_name', Translator::get('module_first_name'), $this->admin->first_name)->addInputText('last_name', Translator::get('module_last_name'), $this->admin->last_name)->addInputText('email', Translator::get('module_email'), $this->admin->email)->addInputText('login', Translator::get('module_login'), $this->admin->login)->addInputText('password', Translator::get('module_password'), $this->admin->getPassword())->addSelect('language', Translator::get('module_language'), $options, $this->admin->getLanguageId());
        ?>
			</div>
		</fieldset>
		<?php 
    }
Exemple #13
0
    protected function getHeader()
    {
        ?>
		<th class="action-n2"></th>
		<th class="number">Heurisko</th>
		<th><?php 
        echo Translator::get('module_login');
        ?>
</th>
		<th><?php 
        echo Translator::get('module_last_name');
        ?>
</th>
		<th><?php 
        echo Translator::get('module_first_name');
        ?>
</th>
		<th><?php 
        echo Translator::get('module_email');
        ?>
</th>
		<?php 
    }
    public function renderHtml()
    {
        ?>
		<form method="post" action="" class="backoffice-crud">
			<?php 
        $this->getFormHtml();
        ?>
			<div class="backoffice-valid">
				<input type="hidden" name="referer" value="<?php 
        echo UrlFactory::backTo($this->module);
        ?>
" />
				<button type="submit"><?php 
        echo Translator::get('module_submit');
        ?>
</button>
				<button type="reset"><?php 
        echo Translator::get('module_reset');
        ?>
</button>
			</div>
		</form>
	<?php 
    }
Exemple #15
0
<div class="content">
    <h1 class="title"><?php 
echo Translator::get('pages.faq.freq_asked_que');
?>
</h1>
<?php 
if ($empty) {
    ?>
	<h3 class="title"><?php 
    echo Translator::get('pages.faq.no_question');
    ?>
</h3>
<?php 
}
foreach ($faqs as $k => $faq) {
    ?>
	<h3 class="title"><?php 
    echo $faq->ask;
    ?>
</h3>
	<p><?php 
    echo $faq->answer;
    ?>
</p>
<?php 
}
?>

</div>
Exemple #16
0
			<input value="<?php 
echo $username;
?>
" onchange="checkNameAvailable(event, this, '<?php 
echo @$username;
?>
');" onkeyup="checkNameAvailable(event, this, '<?php 
echo @$username;
?>
');" type="text" name="username" placeholder="Pseudo"><br />
			
			<!-- <label for="language">Langue :</label>
			<select name="language">
				<option value="fr">Français</option>
				<option value="en">Anglais</option>
			</select> -->
			
			<!-- <h1 style="font-size:20px">Préférences :</h1>
			<br />
			<label for="set_likes">Être notifier lorsque qu'une de mes vidéos reçoit un "+" ou un "-" :</label>
			<input type="radio" value="1" name="set_likes" checked="checked" /> Oui
			<input type="radio" value="0" name="set_likes" /> Non -->
			
			<input type="submit" name="profileSubmit" value="<?php 
echo Translator::get("common.button.save");
?>
">
		</form>
	</section>

</div>
 public function get($id, $request)
 {
     $data["result"] = Translator::get($id);
     return new JsonResponse($data);
 }
Exemple #18
0
echo isset($current) && $current == 'messages' ? 'class="current"' : '';
?>
><a href="<?php 
echo WEBROOT . 'account/messages';
?>
"><?php 
echo Translator::get("pages.account.sub_menu.messages.title");
?>
</a></li>
		<li <?php 
echo isset($current) && $current == 'notifications' ? 'class="current"' : '';
?>
><a href="<?php 
echo WEBROOT . 'account/notifications';
?>
"><?php 
echo Translator::get("pages.account.sub_menu.notifications.title");
?>
</a></li>
		<li <?php 
echo isset($current) && $current == 'language' ? 'class="current"' : '';
?>
><a href="<?php 
echo WEBROOT . 'account/language';
?>
"><?php 
echo Translator::get("pages.account.sub_menu.language.title");
?>
</a></li>
	</ul>
</nav>
Exemple #19
0
    public function renderHtml()
    {
        ?>
			<!DOCTYPE html>
			<html>
			<head>
				<base href="<?php 
        echo $this->base;
        ?>
" />
				<title><?php 
        echo $this->metaTitle;
        ?>
</title>

				<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
				<meta http-equiv="Content-Language" content="fr" />
				<meta name="viewport" content="width=device-width" initial-scale="1">
				<link rel="shortcut icon" href="favicon.ico" />
				<link rel="shortcut icon" type="image/x-icon" href="favicon.gif" />

				<?php 
        $this->getCss();
        ?>
				<?php 
        $this->getJs();
        ?>
			</head>
			<body class="<?php 
        echo implode(' ', $this->bodyClass);
        ?>
">
			<?php 
        if ($this->navigation !== false) {
            ?>
				<div class="backoffice-navigation">
					<div class="container">
						<?php 
            echo $this->displayNavigationLinks($this->navigationLinks);
            ?>
						<ul class="right">
							<?php 
            if ($this->admin instanceof Admin && $this->admin->isHeurisko()) {
                ?>
								<li>
									<a class="settings"></a>
									<ul>
										<li<?php 
                echo $this->module == 'configs' ? ' class="selected"' : '';
                ?>
>
											<a href="<?php 
                echo UrlFactory::module('configs');
                ?>
"><?php 
                echo Translator::get('module_config');
                ?>
</a>
										</li>
										<li<?php 
                echo $this->module == 'languages' ? ' class="selected"' : '';
                ?>
>
											<a href="<?php 
                echo UrlFactory::module('languages');
                ?>
"><?php 
                echo Translator::get('module_languages');
                ?>
</a>
										</li>
										<li<?php 
                echo $this->module == 'translations' ? ' class="selected"' : '';
                ?>
>
											<a href="<?php 
                echo UrlFactory::module('translations');
                ?>
"><?php 
                echo Translator::get('module_translations');
                ?>
</a>
										</li>
										<li<?php 
                echo $this->module == 'admins' ? ' class="selected"' : '';
                ?>
>
											<a href="<?php 
                echo UrlFactory::module('admins');
                ?>
"><?php 
                echo Translator::get('module_admins');
                ?>
</a>
										</li>
									</ul>
								</li>
							<?php 
            }
            ?>
							<li class="profile">
								<a class="profile"></a>
								<ul>
									<li class="infos">
										<p>
											<strong><?php 
            echo $this->admin->login;
            ?>
</strong>
									<?php 
            if (!empty($_SESSION['last_connection'])) {
                ?>
											<span><?php 
                echo Translator::get('module_last_connection');
                ?>
 :</span>
											<em><?php 
                echo ServiceDate::format($_SESSION['last_connection'], '%x %X');
                ?>
</em>
									<?php 
            }
            ?>
										</p>
									</li>
									<li>
										<a class="logout" href="<?php 
            echo UrlFactory::module('admins', 'logout');
            ?>
"><?php 
            echo Translator::get('module_logout');
            ?>
</a>
									</li>
								</ul>
							</li>
						</ul>
						<span class="clear"></span>
					</div>
				</div>
			<?php 
        }
        ?>
				<div class="backoffice-page">
					<div class="container">
					<?php 
        if ($this->sidebar) {
            ?>
						<div class="backoffice-sidebar">
							<a class="backoffice-sidebar-shrink"></a>
							<?php 
            $this->getSideBar();
            ?>
						</div>
					<?php 
        }
        ?>
						<div class="backoffice-content">
						<?php 
        if ($this->breadcrumbs == true && !empty($this->breadcrumbsLinks)) {
            ?>
							<div id="arianne"><?php 
            echo $this->displayArianneLinks($this->breadcrumbsLinks);
            ?>
</div>
						<?php 
        }
        ?>
							<div class="backoffice-view">
								<?php 
        echo $this->view instanceof View ? $this->view->renderHtml() : '';
        ?>
							<?php 
        if (APPLICATION_ENV == 'development' || $this->admin instanceof Admin && $this->admin->isHeurisko()) {
            ?>
								<div class="console">
									<div class="console-sql">
										<div class="console-header">
											<ul class="console-links">
												<li>
													<a class="console-link min"></a>
												</li>
											</ul>
											<span>SQL</span>
										</div>
										<div class="console-content"><?php 
            echo Logger::showSqlLogs();
            ?>
</div>
									</div>
									<div class="console-php">
										<div class="console-header">
											<ul class="console-links">
												<li>
													<a class="console-link min"></a>
												</li>
											</ul>
											<span>PHP</span>
										</div>
										<div class="console-content"><?php 
            echo Logger::showPhpLogs();
            ?>
</div>
									</div>
								</div>
							<?php 
        }
        ?>
							</div>
						</div>
					</div>
				</div>
				<div id="tooltip">
					<div class="fleche" /></div>
				<div id="tooltipContent"></div>
				</div>
				<div id="popup">
					<div class="popup-container">
						<a class="popup-close">X</a>
						<div class="popup-content"></div>
					</div>
				</div>
			</body>
			</html>
		<?php 
    }
    protected function getTbody()
    {
        ?>
		<tr class="no-focus">
			<td>
				<form action="<?php 
        echo UrlFactory::module($this->module, 'generate');
        ?>
" method="post">
					<table class="list">
						<thead>
							<tr>
								<th class="action-n2"></th>
								<th>Variable</th>
							<?php 
        foreach ($this->languages as $language) {
            ?>
								<th><?php 
            echo $language->displayFlag();
            ?>
</th>
							<?php 
        }
        ?>
							</tr>
						</thead>
						<tbody>
							<?php 
        foreach ($this->list as $translation) {
            ?>
							<tr>
								<td><!--<?php 
            $this->addNormalUpdateButton($translation)->addNormalDeleteButton($translation);
            ?>
--></td>
								<td><?php 
            echo $translation->variable;
            ?>
</td>
							<?php 
            foreach ($this->languages as $language) {
                ?>
								<td><input type="text" name="<?php 
                echo $translation->variable . '[' . $language->code . ']';
                ?>
" value="<?php 
                echo SqlFields::protect($translation->get($language));
                ?>
" /></td>
							<?php 
            }
            ?>
							</tr>
							<?php 
        }
        ?>
							<tr class="valid">
								<td colspan="<?php 
        echo 2 + count($this->languages);
        ?>
">
									<div class="backoffice-valid">
										<button type="submit"><?php 
        echo Translator::get('module_submit_generate');
        ?>
</button>
									</div>
								</td>
							</tr>
						</tbody>
					</table>
				</form>
			</td>
		</tr>
	<?php 
    }
Exemple #21
0
					</div>

					<div class="row">

						<h1>Social</h1>
						
						<a href="https://twitter.com/DreamVids_" target="_blank">Twitter</a>
						<a href="https://facebook.com/DreamVids" target="_blank">Facebook</a>
						<a href="https://github.com/DreamVids" target="_blank">GitHub</a>

					</div>

					<div class="rights">

						<span class="love"><?php 
echo Translator::get("footer.made-with");
?>
<i>♥</i></span>

						<a class="license" rel="license" title="Cette œuvre est mise à disposition selon les termes de la Licence Creative Commons Attribution - Pas d’Utilisation Commerciale - Partage dans les Mêmes Conditions 4.0 International" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Licence Creative Commons" src="<?php 
echo IMG . 'license.png';
?>
" /></a>
						DreamVids 2013-<?php 
echo date('Y');
?>
						<a href="https://github.com/DreamVids/DreamVids" class="github">Code source sur Github</a>
						
					</div>

				</div>