Merge branch 'master' of
ssh://gitolite@asdynamics.com:50005/projects/fdn2.git Conflicts: private/lib/media/mediaRenderers/MediaImage.php
This commit is contained in:
@@ -6,11 +6,17 @@ class MediaImage implements MediaRendererInterface{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
public function asText(array $opt = array()){
|
||||
$size = "small";
|
||||
if(sizeof($opt)>0 && array_key_exists("size", $opt)){
|
||||
$size = $opt["size"];
|
||||
}
|
||||
=======
|
||||
//NON PUOI DICHIARARE UN asText DIVERSO DA QUELLO DELL'INTERFACCIA!!!!!!!
|
||||
// public function asText($size){
|
||||
public function asText(){
|
||||
>>>>>>> branch 'master' of ssh://gitolite@asdynamics.com:50005/projects/fdn2.git
|
||||
return '<img src="'.GUIHandler::getBaseUrl().'getImage.php?id='.$this->id.'&size='.$size.'"/>';
|
||||
}
|
||||
|
||||
@@ -18,4 +24,4 @@ class MediaImage implements MediaRendererInterface{
|
||||
echo $this->asText($opt);
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/*
|
||||
Author: Riccardo Di Dato
|
||||
Creation Date: 25/gen/2016
|
||||
*/
|
||||
|
||||
|
||||
require_once(dirname(__FILE__)."/../load.php");
|
||||
|
||||
GUIHandler::generateHtmlHeaders(array(),true);
|
||||
|
||||
if (!AdminLoginManager::isLogged()){
|
||||
GUIHandler::redirect("admin/login.php");
|
||||
}
|
||||
else if (!AdminLoginManager::getLogged()->hasRole(AdminModel::ADMIN_TYPE_NEWSLETTER)){
|
||||
GUIHandler::redirect("admin/index.php");
|
||||
}
|
||||
|
||||
MenuGenerator::generateMenu();
|
||||
|
||||
HTMLHelper::generateAdminHead();
|
||||
|
||||
try {
|
||||
$id = PostHandler::get("id");
|
||||
|
||||
$config = GlobalVariables::get("config");
|
||||
|
||||
if (is_null($id) || strcmp("", $id)==0){
|
||||
GUIHandler::redirect("admin/pendingNewsletters.php");
|
||||
}
|
||||
|
||||
$mail = GlobalVariables::get("dao")->getFirst("MailTemplateModel",array("id"=>$id));
|
||||
if (is_null($mail)){
|
||||
GUIHandler::redirect("admin/pendingNewsletters.php");
|
||||
}
|
||||
|
||||
$action = PostHandler::get("action");
|
||||
if (!is_null($action) && strcmp("", $action)!=0){
|
||||
if (strcmp("confirm", $action)==0){
|
||||
$mail->status = MailTemplateModel::STATUS_READY;
|
||||
GlobalVariables::get("dao")->save($mail);
|
||||
}
|
||||
GUIHandler::redirect("admin/pendingNewsletters.php");
|
||||
}
|
||||
}catch(GUIException $ex){
|
||||
$error = $ex->getMessage();
|
||||
}catch (Exception $exec){
|
||||
LoggingFacilityManager::getLogger("gui")->log(LoggingFacility::$LEVEL_ERROR, $exec->getMessage());
|
||||
$error = "Si è verificato un errore inaspettato durante l'esecuzione della pagina. Se l'errore persiste contattare il supporto tecnico.";
|
||||
}
|
||||
|
||||
?>
|
||||
<div>
|
||||
<?php
|
||||
if(strcmp($error, "")!=0){
|
||||
echo '<div style="font-size: 16px; color:red;">'.$error.'</div>';
|
||||
}
|
||||
?>
|
||||
<a href="#" id="mailForm_confirm" >Conferma</a>
|
||||
<a href="#" id="mailForm_annulla">Annulla</a>
|
||||
<div><?php echo $mail->subject; ?> </div>
|
||||
<hr/>
|
||||
<div><?php echo $mail->body; ?></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(event){
|
||||
$("#mailForm_confirm").click(function(event){
|
||||
$("form#mailForm input[type=hidden][name=action]").val("confirm");
|
||||
$("form#mailForm").submit();
|
||||
});
|
||||
$("#mailForm_annulla").click(function(event){
|
||||
$("form#mailForm input[type=hidden][name=action]").val("cancel");
|
||||
$("form#mailForm").submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<form id="mailForm" method="POST" action="">
|
||||
<input type="hidden" name="action" value="" />
|
||||
<input type="hidden" name="id" value="<?php echo $id;?>" />
|
||||
</form>
|
||||
@@ -35,7 +35,7 @@ if (!is_null($confirm) && strcmp("", $confirm)!=0){
|
||||
if (strcmp("true", $confirm)==0){
|
||||
GlobalVariables::get("dao")->delete($mail);
|
||||
}
|
||||
GUIHandler::redirect("admin/listNotizie.php");
|
||||
GUIHandler::redirect("admin/listMail.php");
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -27,7 +27,7 @@ $buttons = array(
|
||||
?>
|
||||
<div>
|
||||
<?php
|
||||
$details = DatatablesHelper::generateTable("notizieTableBackend.php",$columns,array("buttons"=>$buttons));
|
||||
$details = DatatablesHelper::generateTable("myNotizieTableBackend.php",$columns,array("buttons"=>$buttons));
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/*
|
||||
Author: Riccardo Di Dato
|
||||
Creation Date: 25/gen/2016
|
||||
*/
|
||||
|
||||
|
||||
require_once(dirname(__FILE__)."/../../load.php");
|
||||
|
||||
$useModel = "NotiziaModel";
|
||||
$permissionFlagRequired = AdminModel::ADMIN_TYPE_EDITORE_SUPERVISOR;
|
||||
$exposedFields = array(
|
||||
"titolo"=>null,
|
||||
"sottotitolo"=>null,
|
||||
"about"=>array("data"=>null,"author"=>null),
|
||||
"id"=>null
|
||||
);
|
||||
|
||||
$ret = DatatablesHelper::getResult($useModel, $permissionFlagRequired, $exposedFields,array("about.owner"=>AdminLoginManager::getLogged()->id));
|
||||
echo json_encode($ret);
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user