<?php
/**
 * SARU
 * organize your contacts
 *
 * Copyright (c) 2012-2014 Marie Kuntz - Lezard Rouge
 *
 * This file is part of SARU.
 * SARU is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * SARU is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.

 * You should have received a copy of the GNU Affero General Public License
 * along with SARU.  If not, see <http://www.gnu.org/licenses/>.
 * See LICENSE.TXT file for more information.
 *
 * Saru is released under dual license, AGPL and commercial license.
 * If you need a commercial license or if you don't know which licence you need,
 * please contact us at <info@saru.fr>
 *
 * @copyright  Copyright (c) 2012-2014 Marie Kuntz - Lezard Rouge (http://www.lezard-rouge.fr)
 * @license    GNU-AGPL v3 http://www.gnu.org/licenses/agpl.html
 * @version    1
 * @author     Marie Kuntz - Lezard Rouge SARL - www.lezard-rouge.fr - contact@lezard-rouge.fr
 */

/**
 * TEMPLATE
 * upload logo
 *
 * @version $Id: admin_logo.php 206 2014-04-04 13:16:16Z lezardro $
 * @author Marie Kuntz / Lézard Rouge
 */

?>
<h1>Logo de l'entreprise</h1>
<?php echo $message; ?>

<form method="post" action="options.php" enctype="multipart/form-data">
<input type="hidden" name="tpl" value="logo">

<p><label class="inline" for="logo">Changer le logo</label>
	<input type="file" name="logo" id="logo" size="30">
</p>
<p><input type="checkbox" name="logo_del" id="logo_del" value="1">
	<label class="inline" for="logo_del">Cocher la case pour supprimer le logo existant sans le remplacer</label>
</p>

<?php
if( ! empty($logo->option_value) && file_exists(LOCAL_PATH . 'logos/' . $logo->option_value)): ?>
	<p>Logo actuel : <img src="logos/<?php echo $logo->option_value; ?>" alt="logo actuel" class="logo-recap"></p>
<?php endif; ?>

<input type="submit" name="submitform" value="Ok" class="btn btn-info"> <input type="button" class="btn" name="annul" value="Annuler" onclick="window.location='index.php?tpl=admin'">
</form>