Init
This commit is contained in:
272
feedback/Img.php
Normal file
272
feedback/Img.php
Normal file
@@ -0,0 +1,272 @@
|
||||
<?php
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
class Img
|
||||
{
|
||||
private $image;
|
||||
private $fileExtension;
|
||||
private $thumbnailName;
|
||||
private $thumbnailDir;
|
||||
public $quality = 80;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
static public function get($filepath, $params = array()){
|
||||
$thumbWidth = $params['width'] = isset($params['width']) ? $params['width'] : 112;
|
||||
$thumbHeight = $params['height'] = isset($params['height']) ? $params['height'] : 112;
|
||||
|
||||
// $params['watermark'] = 'images/watermark.png';
|
||||
|
||||
if (empty($filepath))
|
||||
{
|
||||
return $filepath;
|
||||
}
|
||||
$filepath = $_SERVER['DOCUMENT_ROOT'].'/'.trim($filepath,'/');
|
||||
|
||||
if (!file_exists($filepath) || !is_file($filepath))
|
||||
{
|
||||
|
||||
if (!file_exists($filepath) || !is_file($filepath))
|
||||
{
|
||||
return self::getLink($filepath);
|
||||
}
|
||||
}
|
||||
|
||||
$fileinfo = pathinfo($filepath);
|
||||
|
||||
$fileExtension = $fileinfo['extension'];
|
||||
$thumbnailDir = dirname($filepath)."/thumbs";
|
||||
|
||||
if (!file_exists($thumbnailDir)) { mkdir($thumbnailDir); }
|
||||
|
||||
$thumbnailDir .= ($thumbWidth) ? "/".$thumbWidth : "/".$thumbHeight;
|
||||
|
||||
$thumbnailDir .= ($thumbHeight) ? "x".$thumbHeight : "x".$thumbWidth;
|
||||
|
||||
if (!file_exists($thumbnailDir)) { mkdir($thumbnailDir); }
|
||||
|
||||
$thumbnailName = $fileinfo['filename'].".".$fileExtension;
|
||||
$thumbnailPath = "$thumbnailDir/$thumbnailName";
|
||||
|
||||
if (file_exists($thumbnailPath) &&
|
||||
(filemtime($filepath) == filemtime($thumbnailPath)))
|
||||
{
|
||||
return self::getLink($thumbnailPath);
|
||||
}
|
||||
|
||||
self::create($filepath, $thumbnailPath, $params);
|
||||
|
||||
return self::getLink($thumbnailPath);
|
||||
}
|
||||
|
||||
public static function getMimeType($file,$magicFile=null,$checkExtension=true)
|
||||
{
|
||||
if(function_exists('finfo_open'))
|
||||
{
|
||||
$options=defined('FILEINFO_MIME_TYPE') ? FILEINFO_MIME_TYPE : FILEINFO_MIME;
|
||||
$info=$magicFile===null ? finfo_open($options) : finfo_open($options,$magicFile);
|
||||
|
||||
if($info && ($result=finfo_file($info,$file))!==false)
|
||||
return $result;
|
||||
}
|
||||
|
||||
if(function_exists('mime_content_type') && ($result=mime_content_type($file))!==false)
|
||||
return $result;
|
||||
|
||||
return $checkExtension ? self::getMimeTypeByExtension($file) : null;
|
||||
}
|
||||
|
||||
public static function getMimeTypeByExtension($file,$magicFile=null)
|
||||
{
|
||||
if(($ext=pathinfo($file,PATHINFO_EXTENSION))!=='')
|
||||
{
|
||||
if($ext == 'jpeg' || $ext == 'JPEG') return 'image/jpeg';
|
||||
if($ext == 'jpg' || $ext == 'JPG') return 'image/jpg';
|
||||
if($ext == 'gif') return 'image/gif';
|
||||
if($ext == 'png') return 'image/png';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
private static function create($srcFilename, $dstFilename, $params)
|
||||
{
|
||||
$fillColor = isset($params['fillColor']) ? $params['fillColor'] : 0xFFFFFF;
|
||||
|
||||
$fileinfo = pathinfo($srcFilename);
|
||||
$fileExtension = $fileinfo['extension'];
|
||||
|
||||
|
||||
switch (strtolower(self::getMimeType($srcFilename)))
|
||||
{
|
||||
case 'image/jpg': $image = @imagecreatefromjpeg($srcFilename); $saveFn = 'imagejpeg'; $saveQuality = 80; break;
|
||||
case 'image/jpeg': $image = @imagecreatefromjpeg($srcFilename); $saveFn = 'imagejpeg'; $saveQuality = 80; break;
|
||||
case 'image/png': $image = @imagecreatefrompng($srcFilename); $saveFn = 'imagepng'; $saveQuality = 5; break;
|
||||
case 'image/gif': $image = @imagecreatefromgif($srcFilename); $saveFn = 'imagepng'; $saveQuality = NULL; break;
|
||||
|
||||
default: return;
|
||||
//throw new CException("Unable to create thumbnail. Unsupported image format: $fileExtension");
|
||||
}
|
||||
|
||||
if (!$image)
|
||||
{
|
||||
//throw new CException("Unable to create thumbnail. imagecreatefromXXX function failed");
|
||||
}
|
||||
|
||||
$imgWidth = imagesx($image);
|
||||
$imgHeight = imagesy($image);
|
||||
|
||||
if (isset($params['crop']) && $params['crop'])
|
||||
{
|
||||
$imgScale = $imgWidth/$imgHeight;
|
||||
$thumbScale = $params['width']/$params['height'];
|
||||
|
||||
if ($imgScale <= $thumbScale)
|
||||
{
|
||||
$imgHeight = $imgWidth/$thumbScale;
|
||||
}
|
||||
else
|
||||
{
|
||||
$imgWidth = $imgHeight*$thumbScale;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($params['min-width']) && ($params['min-width'] > $imgWidth)) $params['width'] = $params['min-width'];
|
||||
if (isset($params['min-height']) && ($params['min-height'] > $imgHeight)) $params['height'] = $params['min-height'];
|
||||
|
||||
$thumbGeometry = self::getThumbnailGeometry($imgWidth, $imgHeight, $params['width'], $params['height']);
|
||||
|
||||
$thumbImage = imagecreatetruecolor($thumbGeometry['width'] + $thumbGeometry['padding-left']*2,
|
||||
$thumbGeometry['height'] + $thumbGeometry['padding-top']*2);
|
||||
if ($thumbGeometry['padding-top'] || $thumbGeometry['padding-left'])
|
||||
{
|
||||
$fcolor = imagecolorallocate($thumbImage, ($fillColor >> 16) & 0xFF,
|
||||
($fillColor >> 8) & 0xFF,
|
||||
($fillColor >> 0) & 0xFF);
|
||||
imagefill($thumbImage, 0,0, $fcolor);
|
||||
}
|
||||
|
||||
if (!$thumbImage)
|
||||
{
|
||||
//throw new CException("imagecreatetruecolor function failed");
|
||||
}
|
||||
|
||||
if (($fileExtension == "gif") || ($fileExtension == "png"))
|
||||
{
|
||||
imagecolortransparent($thumbImage, imagecolorallocatealpha($thumbImage, 0, 0, 0, 127));
|
||||
imagealphablending($thumbImage, false);
|
||||
imagesavealpha($thumbImage, true);
|
||||
}
|
||||
|
||||
if (!imagecopyresampled($thumbImage, $image, $thumbGeometry['padding-left'], $thumbGeometry['padding-top'], 0, 0,
|
||||
$thumbGeometry['width'], $thumbGeometry['height'], $imgWidth, $imgHeight))
|
||||
{
|
||||
//throw new CException("Unable to create thumbnail. imagecopyresized function failed");
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////
|
||||
// $params['watermark'] = '/themes/ecofermer/images/watermark/watermark.png';
|
||||
//$params['watermarkPosition'] = 'center center';
|
||||
self::applyWatermark($thumbImage, $thumbGeometry, $params);
|
||||
|
||||
if (!$saveFn($thumbImage, $dstFilename, $saveQuality))
|
||||
{
|
||||
//throw new CException("Unable to create thumbnail. imagexxx function failed");
|
||||
}
|
||||
|
||||
$srcTime = filemtime($srcFilename);
|
||||
touch($dstFilename, $srcTime);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
protected static function applyWatermark($img, $imgGeometry, $params)
|
||||
{
|
||||
if (!isset($params['watermark']))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if ($params['watermark'] === true)
|
||||
{
|
||||
//$watermarkFile = Yii::getPathOfAlias('webroot')."/".Yii::app()->params['watermarkFile'];
|
||||
}
|
||||
else if (is_string($params['watermark']))
|
||||
{
|
||||
$watermarkFile = $_SERVER['DOCUMENT_ROOT'].'/'.$params['watermark'];
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!file_exists($watermarkFile) || !($wtmkImg = imagecreatefrompng($watermarkFile)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$wtmkWidth = imagesx($wtmkImg);
|
||||
$wtmkHeight = imagesy($wtmkImg);
|
||||
|
||||
$scale = min( $imgGeometry['width']/$wtmkWidth,$imgGeometry['height']/$wtmkHeight)*0.5;
|
||||
|
||||
$scaledThumbWidth = $scale < 1.0 ? $scale * $wtmkWidth : $wtmkWidth;
|
||||
$scaledThumbHeight = $scale < 1.0 ? $scale * $wtmkHeight : $wtmkHeight;
|
||||
|
||||
$centerX = ($imgGeometry['width'] - $scaledThumbWidth)/2;
|
||||
$centerY = ($imgGeometry['height'] - $scaledThumbHeight)/2;
|
||||
|
||||
imagealphablending($img, true);
|
||||
imagealphablending($wtmkImg, true);
|
||||
|
||||
if (!imagecopyresampled($img, $wtmkImg,
|
||||
$centerX + $imgGeometry['padding-left'], $centerY + $imgGeometry['padding-top'], 0, 0,
|
||||
$scaledThumbWidth, $scaledThumbHeight, $wtmkWidth, $wtmkHeight))
|
||||
{
|
||||
//throw new CException("Unable to create thumbnail. imagecopyresized function failed");
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
protected static function getThumbnailGeometry($imgWidth, $imgHeight, $thumbWidth, $thumbHeight)
|
||||
{
|
||||
$retval = array('width'=>0, 'height'=>0, 'padding-top'=>0, 'padding-left'=>0);
|
||||
|
||||
if (!$thumbWidth && !$thumbHeight)
|
||||
{
|
||||
$retval['width'] = $imgWidth;
|
||||
$retval['height'] = $imgHeight;
|
||||
}
|
||||
else if ($thumbWidth && !$thumbHeight)
|
||||
{
|
||||
$retval['width'] = $thumbWidth;
|
||||
$retval['height'] = floor($imgHeight*($thumbWidth / $imgWidth));
|
||||
}
|
||||
else if (!$thumbWidth && $thumbHeight)
|
||||
{
|
||||
$retval['height']= $thumbHeight;
|
||||
$retval['width'] = floor($imgWidth*($thumbHeight / $imgHeight));
|
||||
}
|
||||
else
|
||||
{
|
||||
$scale = min( $thumbWidth/$imgWidth, $thumbHeight/$imgHeight );
|
||||
|
||||
$retval['width'] = $scale < 1.0 ? $scale * $imgWidth : $imgWidth;
|
||||
$retval['height'] = $scale < 1.0 ? $scale * $imgHeight : $imgHeight;
|
||||
|
||||
|
||||
$retval['padding-left'] = ($thumbWidth - $retval['width'])/2;
|
||||
$retval['padding-top'] = ($thumbHeight - $retval['height'])/2;
|
||||
}
|
||||
return $retval;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
private static function getLink($path)
|
||||
{
|
||||
if (substr($path, 0, strlen($_SERVER['DOCUMENT_ROOT'].'/')) == $_SERVER['DOCUMENT_ROOT'].'/')
|
||||
{
|
||||
$path = substr($path, strlen($_SERVER['DOCUMENT_ROOT'].'/'));
|
||||
}
|
||||
$path = '/'.ltrim($path,'/');
|
||||
return $path;
|
||||
}
|
||||
}
|
||||
10
feedback/activate.php
Normal file
10
feedback/activate.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?
|
||||
session_start();
|
||||
chdir('..');
|
||||
require_once('api/Simpla.php');
|
||||
$simpla = new Simpla();
|
||||
if(empty($_SESSION['admin'])) exit();
|
||||
|
||||
$id = isset($_POST['id']) ? (int)$_POST['id'] : 0;
|
||||
|
||||
$simpla->db->query("UPDATE `__feedback` SET `active`=1 WHERE `id`='$id'");
|
||||
91
feedback/edit.php
Normal file
91
feedback/edit.php
Normal file
@@ -0,0 +1,91 @@
|
||||
<?
|
||||
include($_SERVER["DOCUMENT_ROOT"]."/php/cookie.php");
|
||||
include($_SERVER["DOCUMENT_ROOT"]."/php/default.php");
|
||||
connect();
|
||||
?>
|
||||
<?
|
||||
if (!isset($page_id)){$page_id=37;}
|
||||
//get_meta($page_id);
|
||||
?>
|
||||
<? $page_name="feedback";?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html><head>
|
||||
<title><? if ($meta_title<>"") {?><?=$meta_title?><? } else {?>Ñòåëëàæè<? } ?></title>
|
||||
<META NAME="description" CONTENT="<? if ($meta_descr<>"") {?><?=$meta_descr?><? } else {?>Ñòåëëàæè<? } ?>">
|
||||
<META NAME="keywords" CONTENT="<? if ($meta_key<>"") {?><?=$meta_key?><? } else {?>Ñòåëëàæè<? } ?>">
|
||||
<? include($_SERVER["DOCUMENT_ROOT"]."/php/top_head.php"); ?>
|
||||
<script type="text/javascript" src="/feedback/js/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="/feedback/js/uploader.js"></script>
|
||||
</head>
|
||||
<? include($_SERVER["DOCUMENT_ROOT"]."/top.php"); ?>
|
||||
<div class="sidebar <?=$colClass?>-3">
|
||||
<? include($_SERVER["DOCUMENT_ROOT"]."/inc.right.php"); ?>
|
||||
</div>
|
||||
<div class="inner-content <?=$colClass?>-9">
|
||||
<?
|
||||
// COLUM CENTR START ++++++++++++++
|
||||
//
|
||||
?>
|
||||
<? //page_out($page_id);?>
|
||||
<?
|
||||
include($_SERVER['DOCUMENT_ROOT']. '/feedback/Img.php');
|
||||
//
|
||||
// COLUM CENTR END -----------------------
|
||||
$res = mysql_query("SELECT * FROM `feedback` WHERE `id`='".(int)$_GET['id']."'");
|
||||
$row = mysql_fetch_assoc($res);
|
||||
?>
|
||||
<h2>Ðåäàêòèðîâàòü îòçûâ</h2>
|
||||
<form id="f_form2">
|
||||
<div class="form-group">
|
||||
<label>Âàøå èìÿ*</label>
|
||||
<input type="text" class="form-control" name="name" value="<?=$row['name']?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Email</label>
|
||||
<input type="text" class="form-control" name="email" value="<?=$row['email']?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Êîììåíòàðèé*</label>
|
||||
<textarea class="form-control" name="text"><?=$row['text']?></textarea>
|
||||
</div>
|
||||
|
||||
<div class="well">
|
||||
<div id="f_images2">
|
||||
<?php
|
||||
$res2 = mysql_query("SELECT * FROM `feedback_images` WHERE `feedback_id`='".$row['id']."' ");
|
||||
$i = 0;
|
||||
while($row2 = mysql_fetch_assoc($res2)){
|
||||
if(!file_exists($_SERVER['DOCUMENT_ROOT']. '/feedback/images/'.$row2['name'])) continue;
|
||||
$img = Img::get('/feedback/images/'.$row2['name'], array('crop'=>true));
|
||||
?>
|
||||
<div class="f-preview" data-id="<?=$i?>">
|
||||
<a href="/feedback/images/<?=$row2['name']?>" rel="prettyPhoto[gal<?=$row['id']?>]"><img src="<?=$img?>"></a>
|
||||
<div><button data-id="<?=$i?>" data-bid="<?=$row2['id']?>" class="btn btn-danger btn-xs f-image-remove" type="button"><b>X</b></button></div>
|
||||
|
||||
</div>
|
||||
<? ++$i; } ?>
|
||||
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<span class="btn btn-success fileinput-btn" ><i class="fa fa-plus"> Äîáàâèòü ôîòî</i>
|
||||
<input type="file" multiple name="img"></span>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-danger f-error" id="f_name_error2" style="display: none;">Óêàæèòå âàøå èìÿ</div>
|
||||
<div class="alert alert-danger f-error" id="f_text_error2" style="display: none;">ââåäèòå òåêñò êîììåíòàðèÿ</div>
|
||||
|
||||
<button type="submit" class="btn btn-default" id="f_submit_btn2"><i class="fa fa-check"></i> Îòïðàâèòü</button>
|
||||
<p class="help-block">*Îáÿçàòåëüíîå ïîëå</p>
|
||||
<input type="hidden" name="id" value="<?=$row['id']?>">
|
||||
<input type="hidden" name="url" value="edit_save">
|
||||
</form>
|
||||
|
||||
<?
|
||||
if($admin == 'admin') include $_SERVER['DOCUMENT_ROOT'].'/feedback/feedback_admin.js.php';
|
||||
//
|
||||
// COLUM RIGHT END ------------------------
|
||||
?>
|
||||
</div>
|
||||
<?include ($DOCUMENT_ROOT."/bottom.php");?>
|
||||
14
feedback/edit_save.php
Normal file
14
feedback/edit_save.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
session_start();
|
||||
chdir('..');
|
||||
require_once('api/Simpla.php');
|
||||
$simpla = new Simpla();
|
||||
if(empty($_SESSION['admin'])) exit('3');
|
||||
|
||||
$simpla->db->connect();
|
||||
|
||||
foreach($_POST as $k=>$v) $_POST[$k] = mysql_real_escape_string( $v );
|
||||
|
||||
$simpla->db->query("UPDATE `__feedback` SET `name`='".$_POST['name']."',`email`='".$_POST['email']."',`text`='".$_POST['text']."' WHERE `id`='".(int)$_POST['id']."' ");
|
||||
|
||||
echo (int)$_POST['id'];
|
||||
158
feedback/feedback_admin.js
Normal file
158
feedback/feedback_admin.js
Normal file
@@ -0,0 +1,158 @@
|
||||
|
||||
var feedback_admin = {
|
||||
|
||||
maxImages: 5,
|
||||
images: [],
|
||||
id: 0,
|
||||
|
||||
init: function(id){
|
||||
var self = this;
|
||||
this.id = id;
|
||||
self.initImages();
|
||||
$('#f_images2').on('click','.f-image-remove', function(){
|
||||
self.removeImage(this);
|
||||
});
|
||||
$('.f_activate').click(function(){
|
||||
self.activate(this);
|
||||
});
|
||||
$('.f_remove').click(function(){
|
||||
self.remove(this);
|
||||
});
|
||||
|
||||
$('#f_form2').submit(function(){ self.submit(); return false; });
|
||||
$('#f_submit_btn2').attr('disabled', false);
|
||||
},
|
||||
|
||||
submit: function(){
|
||||
var self = this;
|
||||
$('#f_form2 .f-error').hide();
|
||||
var post = this.getFormData();
|
||||
|
||||
if(post.name.length < 3) return $('#f_name_error2').show();
|
||||
if(post.text.length < 10) return $('#f_text_error2').show();
|
||||
|
||||
$('#f_submit_btn2').html('<i class="fa fa-spin fa-refresh"></i> Отправка...').attr('disabled', true);
|
||||
|
||||
post.images = self.images.length;
|
||||
$.post('/feedback/'+post.url+'.php', post, function(id){
|
||||
self.id = id;
|
||||
self.saveImages().done(function(){
|
||||
document.location.href = '/otzyvy/';
|
||||
/* $('#f_form2').remove();
|
||||
$('#f_success2').show();
|
||||
$('body,html').animate({
|
||||
scrollTop: 0
|
||||
}, 800);*/
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
getFormData: function(){
|
||||
var i, data, post = {};
|
||||
data = $('#f_form2').serializeArray();
|
||||
for(i in data) post[data[i].name] = data[i].value;
|
||||
return post;
|
||||
},
|
||||
|
||||
saveImages: function(dfd){
|
||||
var i, flag = true, self = this;
|
||||
dfd = dfd || $.Deferred();
|
||||
for(i in self.images){ //console.log(self.images[i])
|
||||
if(self.images[i].uploaded) continue;
|
||||
flag = false;
|
||||
self.images[i].uploaded = true;
|
||||
self.images[i].formData.id = self.id;
|
||||
self.images[i].submit().done(function(){
|
||||
self.saveImages(dfd);
|
||||
});
|
||||
break;
|
||||
}
|
||||
if(flag) dfd.resolve();
|
||||
return dfd.promise();
|
||||
},
|
||||
|
||||
initImages: function(){
|
||||
var self = this, div;
|
||||
$('#f_images2 .f-preview').each(function(k){
|
||||
div = $(this);
|
||||
self.images[k] = {div:div, uploaded: true};
|
||||
}); //console.log(self.images)
|
||||
var self = this;
|
||||
$('#f_form2 .fileinput-btn').fileupload({
|
||||
url: '/feedback/uploader.php',
|
||||
autoUpload: false,
|
||||
acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i,
|
||||
maxFileSize: 10000000,
|
||||
previewMaxWidth: 112,
|
||||
previewMaxHeight: 112,
|
||||
disableImageResize: false,
|
||||
imageMaxWidth: 1024,
|
||||
imageMaxHeight: 1024,
|
||||
previewCrop: true,
|
||||
formData: {}
|
||||
}).on('fileuploadadd', function (e, data) {
|
||||
|
||||
}).on('fileuploadprocessalways', function (e, data) {
|
||||
self.imgReady(data);
|
||||
});
|
||||
$('.fileinput-btn').bind('fileuploaddone',function(e, data){
|
||||
//self.uploaded(data.result);
|
||||
});
|
||||
},
|
||||
|
||||
imgReady: function(data){
|
||||
if(this.images.length >= this.maxImages) return this.disableImages();
|
||||
var id = this.images.length;
|
||||
var div = $('<div class="f-preview" style="display:none" data-id="'+id+'"/>');
|
||||
div.append(data.files[0].preview);
|
||||
div.append('<div><button type="button" class="btn btn-danger btn-xs f-image-remove" data-id="'+id+'"><b>X</b></button></div>');
|
||||
$('#f_images2').append(div);
|
||||
div.fadeIn('fast');
|
||||
data.div = div;
|
||||
data.uploaded = false;
|
||||
this.images.push(data);
|
||||
if(this.images.length >= this.maxImages) this.disableImages();
|
||||
},
|
||||
|
||||
disableImages: function(){
|
||||
$('.fileinput-btn').attr('disabled', true);
|
||||
},
|
||||
|
||||
removeImage: function(btn){
|
||||
var i, imgs = [], id = $(btn).attr('data-id'), self = this;
|
||||
for(i in this.images){
|
||||
if(i == id) continue;
|
||||
imgs.push(this.images[i]);
|
||||
this.images[i].div.attr('data-id', imgs.length-1);
|
||||
this.images[i].div.find('.f-image-remove').attr('data-id', imgs.length-1);
|
||||
}
|
||||
this.images[id].div.fadeOut('fast', function(){
|
||||
self.images[id].div.remove();
|
||||
self.images = imgs;
|
||||
});
|
||||
|
||||
$('#f_form2 .fileinput-btn').attr('disabled', false);
|
||||
var bid = $(btn).attr('data-bid');
|
||||
if(typeof bid != 'undefined') $.post('/feedback/remove_image.php',{id:bid});
|
||||
},
|
||||
|
||||
activate: function(obj){
|
||||
var id = $(obj).attr('data-id');
|
||||
$('.feed_'+id).removeClass('feedback_not');
|
||||
$(obj).remove();
|
||||
$.post('/feedback/activate.php',{id:id});
|
||||
},
|
||||
|
||||
remove: function(obj){
|
||||
var id = $(obj).attr('data-id');
|
||||
if(!confirm('Удалить запись?')) return;
|
||||
$('.feed_'+id).fadeOut('fast');
|
||||
$('.feed_parent_'+id).fadeOut('fast');
|
||||
$.post('/feedback/remove.php',{id:id});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$(function(){ feedback_admin.init(); });
|
||||
34
feedback/form.php
Normal file
34
feedback/form.php
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
<div class="h2" id="set_feedback">Îñòàâèòü îòçûâ</div>
|
||||
<form id="f_form">
|
||||
<div class="form-group">
|
||||
<label>Âàøå èìÿ*</label>
|
||||
<input type="text" class="form-control" name="name">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Email</label>
|
||||
<input type="text" class="form-control" name="email">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Êîììåíòàðèé*</label>
|
||||
<textarea class="form-control" name="text"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="well">
|
||||
<div id="f_images"></div>
|
||||
<div class="clearfix"></div>
|
||||
<span class="btn btn-success fileinput-btn" ><i class="fa fa-plus"> Äîáàâèòü ôîòî</i>
|
||||
<input type="file" multiple name="img"></span>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-danger f-error" id="f_name_error" style="display: none;">Óêàæèòå âàøå èìÿ</div>
|
||||
<div class="alert alert-danger f-error" id="f_text_error" style="display: none;">ââåäèòå òåêñò êîììåíòàðèÿ</div>
|
||||
|
||||
<button type="submit" class="btn btn-default" id="f_submit_btn"><i class="fa fa-check"></i> Îòïðàâèòü</button>
|
||||
<p class="help-block">*Îáÿçàòåëüíîå ïîëå</p>
|
||||
<input type="hidden" name="parent_id" value="0">
|
||||
</form>
|
||||
|
||||
<div class="alert alert-success" id="f_success" style="display: none;">Ñïàñèáî çà Âàøå ìíåíèå. Âàø îòçûâ áóäåò îïóáëèêîâàí ïîñëå ïðîâåðêè ìîäåðàòîðîì.</div>
|
||||
42
feedback/index.php
Normal file
42
feedback/index.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?
|
||||
include($_SERVER["DOCUMENT_ROOT"]."/php/cookie.php");
|
||||
include($_SERVER["DOCUMENT_ROOT"]."/php/default.php");
|
||||
connect();
|
||||
?>
|
||||
<?
|
||||
if (!isset($page_id)){$page_id=37;}
|
||||
get_meta($page_id);
|
||||
?>
|
||||
<? $page_name="feedback";?>
|
||||
<!DOCTYPE HTML>
|
||||
<html><head>
|
||||
<title><? if ($meta_title<>"") {?><?=$meta_title?><? } else {?>Ñòåëëàæè<? } ?></title>
|
||||
<META NAME="description" CONTENT="<? if ($meta_descr<>"") {?><?=$meta_descr?><? } else {?>Ñòåëëàæè<? } ?>">
|
||||
<META NAME="keywords" CONTENT="<? if ($meta_key<>"") {?><?=$meta_key?><? } else {?>Ñòåëëàæè<? } ?>">
|
||||
<? include($_SERVER["DOCUMENT_ROOT"]."/php/top_head.php"); ?>
|
||||
<script type="text/javascript" src="/feedback/js/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="/feedback/js/uploader.js"></script>
|
||||
<script type="text/javascript" src="/feedback/js/feedback.js?<?=time()?>"></script>
|
||||
</head>
|
||||
<? include($_SERVER["DOCUMENT_ROOT"]."/top.php"); ?>
|
||||
<div class="sidebar <?=$colClass?>-3">
|
||||
<? include($_SERVER["DOCUMENT_ROOT"]."/inc.right.php"); ?>
|
||||
</div>
|
||||
<div class="inner-content <?=$colClass?>-9">
|
||||
<?
|
||||
// COLUM CENTR START ++++++++++++++
|
||||
//
|
||||
?>
|
||||
<? page_out($page_id);?>
|
||||
<div style="height: 20px;"></div>
|
||||
<?
|
||||
|
||||
include $_SERVER['DOCUMENT_ROOT']. '/feedback/list.php';
|
||||
include $_SERVER['DOCUMENT_ROOT']. '/feedback/form.php';
|
||||
|
||||
|
||||
//
|
||||
// COLUM CENTR END -----------------------
|
||||
?>
|
||||
</div>
|
||||
<?include ($DOCUMENT_ROOT."/bottom.php");?>
|
||||
129
feedback/js/feedback.js
Normal file
129
feedback/js/feedback.js
Normal file
@@ -0,0 +1,129 @@
|
||||
var feedback = {
|
||||
|
||||
maxImages: 5,
|
||||
images: [],
|
||||
id: 0,
|
||||
|
||||
init: function(){
|
||||
var self = this;
|
||||
|
||||
$('#f_form').submit(function(){ self.submit(); return false; });
|
||||
self.initImages();
|
||||
$('#f_images').on('click','.f-image-remove', function(){
|
||||
self.removeImage(this);
|
||||
});
|
||||
$('.fileinput-btn').attr('disabled', false);
|
||||
$('#f_submit_btn').attr('disabled', false);
|
||||
$('#f_form input').val('');
|
||||
$('#f_form textarea').val('');
|
||||
},
|
||||
|
||||
submit: function(){
|
||||
var self = this;
|
||||
$('#f_form .f-error').hide();
|
||||
var post = this.getFormData();
|
||||
|
||||
if(post.name.length < 3) return $('#f_name_error').show();
|
||||
if(post.text.length < 10) return $('#f_text_error').show();
|
||||
|
||||
$('#f_submit_btn').html('<i class="fa fa-spin fa-refresh"></i> Отправка...').attr('disabled', true);
|
||||
|
||||
post.images = self.images.length;
|
||||
$.post('/feedback/save.php', post, function(id){
|
||||
self.id = id;
|
||||
self.saveImages().done(function(){
|
||||
$('#f_form').remove();
|
||||
$('#f_success').show();
|
||||
$('body,html').animate({
|
||||
scrollTop: 0
|
||||
}, 800);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
getFormData: function(){
|
||||
var i, data, post = {};
|
||||
data = $('#f_form').serializeArray();
|
||||
for(i in data) post[data[i].name] = data[i].value;
|
||||
return post;
|
||||
},
|
||||
|
||||
saveImages: function(dfd){
|
||||
var i, flag = true, self = this;
|
||||
dfd = dfd || $.Deferred();
|
||||
for(i in self.images){ //console.log(self.images[i])
|
||||
if(self.images[i].uploaded) continue;
|
||||
flag = false;
|
||||
self.images[i].uploaded = true;
|
||||
self.images[i].formData.id = self.id;
|
||||
self.images[i].submit().done(function(){
|
||||
self.saveImages(dfd);
|
||||
});
|
||||
break;
|
||||
}
|
||||
if(flag) dfd.resolve();
|
||||
return dfd.promise();
|
||||
},
|
||||
|
||||
initImages: function(){
|
||||
var self = this;
|
||||
$('.fileinput-btn').fileupload({
|
||||
url: '/feedback/uploader.php',
|
||||
autoUpload: false,
|
||||
acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i,
|
||||
maxFileSize: 10000000,
|
||||
previewMaxWidth: 112,
|
||||
previewMaxHeight: 112,
|
||||
disableImageResize: false,
|
||||
imageMaxWidth: 1024,
|
||||
imageMaxHeight: 1024,
|
||||
previewCrop: true,
|
||||
formData: {}
|
||||
}).on('fileuploadadd', function (e, data) {
|
||||
|
||||
}).on('fileuploadprocessalways', function (e, data) {
|
||||
self.imgReady(data);
|
||||
});
|
||||
$('.fileinput-btn').bind('fileuploaddone',function(e, data){
|
||||
//self.uploaded(data.result);
|
||||
});
|
||||
},
|
||||
|
||||
imgReady: function(data){
|
||||
if(this.images.length >= this.maxImages) return this.disableImages();
|
||||
var id = this.images.length;
|
||||
var div = $('<div class="f-preview" style="display:none" data-id="'+id+'"/>');
|
||||
div.append(data.files[0].preview);
|
||||
div.append('<div><button type="button" class="btn btn-danger btn-xs f-image-remove" data-id="'+id+'"><b>X</b></button></div>');
|
||||
$('#f_images').append(div);
|
||||
div.fadeIn('fast');
|
||||
data.div = div;
|
||||
data.uploaded = false;
|
||||
this.images.push(data);
|
||||
if(this.images.length >= this.maxImages) this.disableImages();
|
||||
},
|
||||
|
||||
disableImages: function(){
|
||||
$('.fileinput-btn').attr('disabled', true);
|
||||
},
|
||||
|
||||
removeImage: function(btn){
|
||||
var i, imgs = [], id = $(btn).attr('data-id'), self = this;
|
||||
for(i in this.images){
|
||||
if(i == id) continue;
|
||||
imgs.push(this.images[i]);
|
||||
this.images[i].div.attr('data-id', imgs.length-1);
|
||||
this.images[i].div.find('.f-image-remove').attr('data-id', imgs.length-1);
|
||||
}
|
||||
this.images[id].div.fadeOut('fast', function(){
|
||||
self.images[id].div.remove();
|
||||
self.images = imgs;
|
||||
});
|
||||
|
||||
$('.fileinput-btn').attr('disabled', false);
|
||||
}
|
||||
}
|
||||
|
||||
$(function(){ feedback.init(); });
|
||||
13
feedback/js/jquery-ui.min.js
vendored
Normal file
13
feedback/js/jquery-ui.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2617
feedback/js/mask.js
Normal file
2617
feedback/js/mask.js
Normal file
File diff suppressed because it is too large
Load Diff
2537
feedback/js/uploader.js
Normal file
2537
feedback/js/uploader.js
Normal file
File diff suppressed because one or more lines are too long
141
feedback/list.php
Normal file
141
feedback/list.php
Normal file
@@ -0,0 +1,141 @@
|
||||
<?php
|
||||
//include($_SERVER['DOCUMENT_ROOT']. '/feedback/Img.php');
|
||||
$limit = 0;
|
||||
if(isset($_GET['page'])) $limit = ($page-1)*10;
|
||||
$sql = ($admin == 'admin') ? "SELECT * FROM `feedback` WHERE `parent_id`=0 ORDER BY `id` DESC LIMIT ".$limit.',10' :
|
||||
"SELECT * FROM `feedback` WHERE `active`=1 AND `parent_id`=0 ORDER BY `id` DESC LIMIT ".$limit.',10';
|
||||
$res = mysql_query($sql);
|
||||
while($row = mysql_fetch_assoc($res)){
|
||||
$style = '';
|
||||
if($admin == 'admin' && !$row['active']) $style = 'f_not';
|
||||
?>
|
||||
<div class="well <?=$style?> feed_<?=$row['id']?>" style="margin-bottom: 4px;">
|
||||
<span>
|
||||
|
||||
<div class="h4" style="margin-bottom: 5px;">
|
||||
<span><span><?=$row['name']?></span></span>
|
||||
<span style="font-size: 11px;" itemprop="datePublished" content="<?=$row['date']?>"><?=revertDate($row['date'])?></span>
|
||||
<? if($admin == 'admin' && $row['email']) echo '<span style="font-size:12px"> ['.$row['email'].']</span>'; ?>
|
||||
</div>
|
||||
|
||||
<span><?=$row['text']?></span>
|
||||
|
||||
<div>
|
||||
<?php
|
||||
$res2 = mysql_query("SELECT * FROM `feedback_images` WHERE `feedback_id`='".$row['id']."' ");
|
||||
while($row2 = mysql_fetch_assoc($res2)){
|
||||
if(!file_exists($_SERVER['DOCUMENT_ROOT']. '/feedback/images/'.$row2['name'])) continue;
|
||||
$img = Img::get('/feedback/images/'.$row2['name'], array('width'=>112, 'height'=>112));
|
||||
?>
|
||||
<div class="f-preview" style="margin-top: 5px;">
|
||||
<a href="/feedback/images/<?=$row2['name']?>" rel="prettyPhoto[gal<?=$row['id']?>]"><img src="<?=$img?>"></a></div>
|
||||
<? } ?>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
</span>
|
||||
<?php
|
||||
if($admin == 'admin'){
|
||||
echo '<br />';
|
||||
?>
|
||||
<a class="btn btn-primary btn-mini" style="padding: 3px;font-size: 11px;" href="/feedback/edit.php?id=<?=$row['id']?>">Èçìåíèòü</a>
|
||||
<a class="btn btn-warning btn-mini" style="padding: 3px;font-size: 11px;" href="/feedback/reply.php?id=<?=$row['id']?>">Îòâåòèòü</a>
|
||||
<?php
|
||||
if(!$row['active']){
|
||||
?>
|
||||
<button class="btn btn-success btn-mini f_activate" style="padding: 3px;font-size: 11px;" data-id="<?=$row['id']?>">Âêëþ÷èòü</button>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<button class="btn btn-danger btn-mini f_remove" style="padding: 3px;font-size: 11px;" data-id="<?=$row['id']?>">Óäàëèòü</button>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
$res3 = mysql_query("SELECT * FROM `feedback` WHERE `parent_id`='".$row['id']."' ORDER BY `id` ");
|
||||
while($row3 = mysql_fetch_assoc($res3)){
|
||||
?>
|
||||
<div class="well feed_<?=$row3['id']?>" style="margin-bottom: 4px;margin-left:60px">
|
||||
<span>
|
||||
|
||||
<div class="h4" style="margin-bottom: 5px;">
|
||||
<span><span>Îòâåò</span></span>
|
||||
<span style="font-size: 11px;" itemprop="datePublished" content="<?=$row3['date']?>"><?=revertDate($row['date'])?></span>
|
||||
</div>
|
||||
|
||||
<span><?=$row3['text']?></span>
|
||||
|
||||
<div>
|
||||
<?php
|
||||
$res2 = mysql_query("SELECT * FROM `feedback_images` WHERE `feedback_id`='".$row3['id']."' ");
|
||||
while($row2 = mysql_fetch_assoc($res2)){
|
||||
if(!file_exists($_SERVER['DOCUMENT_ROOT']. '/feedback/images/'.$row2['name'])) continue;
|
||||
$img = Img::get('/feedback/images/'.$row2['name'], array('crop'=>true));
|
||||
?>
|
||||
<div class="f-preview" style="margin-top: 5px;">
|
||||
<a href="/feedback/images/<?=$row2['name']?>" rel="prettyPhoto[gal<?=$row3['id']?>]"><img src="<?=$img?>"></a></div>
|
||||
<? } ?>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
</span>
|
||||
<?php
|
||||
if($admin == 'admin'){
|
||||
echo '<br />';
|
||||
?>
|
||||
<a class="btn btn-primary btn-mini" style="padding: 3px;font-size: 11px;" href="/feedback/edit.php?id=<?=$row3['id']?>">Èçìåíèòü</a>
|
||||
<button class="btn btn-danger btn-mini f_remove" style="padding: 3px;font-size: 11px;" data-id="<?=$row3['id']?>">Óäàëèòü</button>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$sql = ($admin == 'admin') ? "SELECT `id` FROM `feedback` WHERE `parent_id`=0" :
|
||||
"SELECT id FROM `feedback` WHERE `active`=1 AND `parent_id`=0";
|
||||
$all = mysql_num_rows( mysql_query($sql) );
|
||||
if($all > 10){
|
||||
echo '<ul class="pagination">';
|
||||
$page = isset($_GET['page']) ? $_GET['page'] : 1;
|
||||
|
||||
$pages = ceil($all / 10);
|
||||
for($i=1; $i<=$pages; ++$i){
|
||||
$url = ($i == 1) ? '/guestbook/' : '/guestbook/?page='.$i;
|
||||
echo ($i != $page) ? '<li><a href="'.$url.'">'.$i.'</a></li>' : '<li class="active"><a href="#">'.$i.'</a></li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
}
|
||||
|
||||
|
||||
function revertDate($date){
|
||||
$d = new DateTime($date);
|
||||
return $d->format('d-m-Y');
|
||||
}
|
||||
|
||||
if($admin == 'admin') include $_SERVER['DOCUMENT_ROOT'].'/feedback/feedback_admin.js.php';
|
||||
2323
feedback/phpmailer/class.phpmailer.php
Normal file
2323
feedback/phpmailer/class.phpmailer.php
Normal file
File diff suppressed because it is too large
Load Diff
407
feedback/phpmailer/class.pop3.php
Normal file
407
feedback/phpmailer/class.pop3.php
Normal file
@@ -0,0 +1,407 @@
|
||||
<?php
|
||||
/*~ class.pop3.php
|
||||
.---------------------------------------------------------------------------.
|
||||
| Software: PHPMailer - PHP email class |
|
||||
| Version: 5.1 |
|
||||
| Contact: via sourceforge.net support pages (also www.codeworxtech.com) |
|
||||
| Info: http://phpmailer.sourceforge.net |
|
||||
| Support: http://sourceforge.net/projects/phpmailer/ |
|
||||
| ------------------------------------------------------------------------- |
|
||||
| Admin: Andy Prevost (project admininistrator) |
|
||||
| Authors: Andy Prevost (codeworxtech) codeworxtech@users.sourceforge.net |
|
||||
| : Marcus Bointon (coolbru) coolbru@users.sourceforge.net |
|
||||
| Founder: Brent R. Matzelle (original founder) |
|
||||
| Copyright (c) 2004-2009, Andy Prevost. All Rights Reserved. |
|
||||
| Copyright (c) 2001-2003, Brent R. Matzelle |
|
||||
| ------------------------------------------------------------------------- |
|
||||
| License: Distributed under the Lesser General Public License (LGPL) |
|
||||
| http://www.gnu.org/copyleft/lesser.html |
|
||||
| This program is distributed in the hope that it will be useful - WITHOUT |
|
||||
| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| ------------------------------------------------------------------------- |
|
||||
| We offer a number of paid services (www.codeworxtech.com): |
|
||||
| - Web Hosting on highly optimized fast and secure servers |
|
||||
| - Technology Consulting |
|
||||
| - Oursourcing (highly qualified programmers and graphic designers) |
|
||||
'---------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
/**
|
||||
* PHPMailer - PHP POP Before SMTP Authentication Class
|
||||
* NOTE: Designed for use with PHP version 5 and up
|
||||
* @package PHPMailer
|
||||
* @author Andy Prevost
|
||||
* @author Marcus Bointon
|
||||
* @copyright 2004 - 2009 Andy Prevost
|
||||
* @license http://www.gnu.org/copyleft/lesser.html Distributed under the Lesser General Public License (LGPL)
|
||||
* @version $Id: class.pop3.php 444 2009-05-05 11:22:26Z coolbru $
|
||||
*/
|
||||
|
||||
/**
|
||||
* POP Before SMTP Authentication Class
|
||||
* Version 5.0.0
|
||||
*
|
||||
* Author: Richard Davey (rich@corephp.co.uk)
|
||||
* Modifications: Andy Prevost
|
||||
* License: LGPL, see PHPMailer License
|
||||
*
|
||||
* Specifically for PHPMailer to allow POP before SMTP authentication.
|
||||
* Does not yet work with APOP - if you have an APOP account, contact Richard Davey
|
||||
* and we can test changes to this script.
|
||||
*
|
||||
* This class is based on the structure of the SMTP class originally authored by Chris Ryan
|
||||
*
|
||||
* This class is rfc 1939 compliant and implements all the commands
|
||||
* required for POP3 connection, authentication and disconnection.
|
||||
*
|
||||
* @package PHPMailer
|
||||
* @author Richard Davey
|
||||
*/
|
||||
|
||||
class POP3 {
|
||||
/**
|
||||
* Default POP3 port
|
||||
* @var int
|
||||
*/
|
||||
public $POP3_PORT = 110;
|
||||
|
||||
/**
|
||||
* Default Timeout
|
||||
* @var int
|
||||
*/
|
||||
public $POP3_TIMEOUT = 30;
|
||||
|
||||
/**
|
||||
* POP3 Carriage Return + Line Feed
|
||||
* @var string
|
||||
*/
|
||||
public $CRLF = "\r\n";
|
||||
|
||||
/**
|
||||
* Displaying Debug warnings? (0 = now, 1+ = yes)
|
||||
* @var int
|
||||
*/
|
||||
public $do_debug = 2;
|
||||
|
||||
/**
|
||||
* POP3 Mail Server
|
||||
* @var string
|
||||
*/
|
||||
public $host;
|
||||
|
||||
/**
|
||||
* POP3 Port
|
||||
* @var int
|
||||
*/
|
||||
public $port;
|
||||
|
||||
/**
|
||||
* POP3 Timeout Value
|
||||
* @var int
|
||||
*/
|
||||
public $tval;
|
||||
|
||||
/**
|
||||
* POP3 Username
|
||||
* @var string
|
||||
*/
|
||||
public $username;
|
||||
|
||||
/**
|
||||
* POP3 Password
|
||||
* @var string
|
||||
*/
|
||||
public $password;
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// PROPERTIES, PRIVATE AND PROTECTED
|
||||
/////////////////////////////////////////////////
|
||||
|
||||
private $pop_conn;
|
||||
private $connected;
|
||||
private $error; // Error log array
|
||||
|
||||
/**
|
||||
* Constructor, sets the initial values
|
||||
* @access public
|
||||
* @return POP3
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->pop_conn = 0;
|
||||
$this->connected = false;
|
||||
$this->error = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Combination of public events - connect, login, disconnect
|
||||
* @access public
|
||||
* @param string $host
|
||||
* @param integer $port
|
||||
* @param integer $tval
|
||||
* @param string $username
|
||||
* @param string $password
|
||||
*/
|
||||
public function Authorise ($host, $port = false, $tval = false, $username, $password, $debug_level = 0) {
|
||||
$this->host = $host;
|
||||
|
||||
// If no port value is passed, retrieve it
|
||||
if ($port == false) {
|
||||
$this->port = $this->POP3_PORT;
|
||||
} else {
|
||||
$this->port = $port;
|
||||
}
|
||||
|
||||
// If no port value is passed, retrieve it
|
||||
if ($tval == false) {
|
||||
$this->tval = $this->POP3_TIMEOUT;
|
||||
} else {
|
||||
$this->tval = $tval;
|
||||
}
|
||||
|
||||
$this->do_debug = $debug_level;
|
||||
$this->username = $username;
|
||||
$this->password = $password;
|
||||
|
||||
// Refresh the error log
|
||||
$this->error = null;
|
||||
|
||||
// Connect
|
||||
$result = $this->Connect($this->host, $this->port, $this->tval);
|
||||
|
||||
if ($result) {
|
||||
$login_result = $this->Login($this->username, $this->password);
|
||||
|
||||
if ($login_result) {
|
||||
$this->Disconnect();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// We need to disconnect regardless if the login succeeded
|
||||
$this->Disconnect();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Connect to the POP3 server
|
||||
* @access public
|
||||
* @param string $host
|
||||
* @param integer $port
|
||||
* @param integer $tval
|
||||
* @return boolean
|
||||
*/
|
||||
public function Connect ($host, $port = false, $tval = 30) {
|
||||
// Are we already connected?
|
||||
if ($this->connected) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
On Windows this will raise a PHP Warning error if the hostname doesn't exist.
|
||||
Rather than supress it with @fsockopen, let's capture it cleanly instead
|
||||
*/
|
||||
|
||||
set_error_handler(array(&$this, 'catchWarning'));
|
||||
|
||||
// Connect to the POP3 server
|
||||
$this->pop_conn = fsockopen($host, // POP3 Host
|
||||
$port, // Port #
|
||||
$errno, // Error Number
|
||||
$errstr, // Error Message
|
||||
$tval); // Timeout (seconds)
|
||||
|
||||
// Restore the error handler
|
||||
restore_error_handler();
|
||||
|
||||
// Does the Error Log now contain anything?
|
||||
if ($this->error && $this->do_debug >= 1) {
|
||||
$this->displayErrors();
|
||||
}
|
||||
|
||||
// Did we connect?
|
||||
if ($this->pop_conn == false) {
|
||||
// It would appear not...
|
||||
$this->error = array(
|
||||
'error' => "Failed to connect to server $host on port $port",
|
||||
'errno' => $errno,
|
||||
'errstr' => $errstr
|
||||
);
|
||||
|
||||
if ($this->do_debug >= 1) {
|
||||
$this->displayErrors();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Increase the stream time-out
|
||||
|
||||
// Check for PHP 4.3.0 or later
|
||||
if (version_compare(phpversion(), '5.0.0', 'ge')) {
|
||||
stream_set_timeout($this->pop_conn, $tval, 0);
|
||||
} else {
|
||||
// Does not work on Windows
|
||||
if (substr(PHP_OS, 0, 3) !== 'WIN') {
|
||||
socket_set_timeout($this->pop_conn, $tval, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Get the POP3 server response
|
||||
$pop3_response = $this->getResponse();
|
||||
|
||||
// Check for the +OK
|
||||
if ($this->checkResponse($pop3_response)) {
|
||||
// The connection is established and the POP3 server is talking
|
||||
$this->connected = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Login to the POP3 server (does not support APOP yet)
|
||||
* @access public
|
||||
* @param string $username
|
||||
* @param string $password
|
||||
* @return boolean
|
||||
*/
|
||||
public function Login ($username = '', $password = '') {
|
||||
if ($this->connected == false) {
|
||||
$this->error = 'Not connected to POP3 server';
|
||||
|
||||
if ($this->do_debug >= 1) {
|
||||
$this->displayErrors();
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($username)) {
|
||||
$username = $this->username;
|
||||
}
|
||||
|
||||
if (empty($password)) {
|
||||
$password = $this->password;
|
||||
}
|
||||
|
||||
$pop_username = "USER $username" . $this->CRLF;
|
||||
$pop_password = "PASS $password" . $this->CRLF;
|
||||
|
||||
// Send the Username
|
||||
$this->sendString($pop_username);
|
||||
$pop3_response = $this->getResponse();
|
||||
|
||||
if ($this->checkResponse($pop3_response)) {
|
||||
// Send the Password
|
||||
$this->sendString($pop_password);
|
||||
$pop3_response = $this->getResponse();
|
||||
|
||||
if ($this->checkResponse($pop3_response)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Disconnect from the POP3 server
|
||||
* @access public
|
||||
*/
|
||||
public function Disconnect () {
|
||||
$this->sendString('QUIT');
|
||||
|
||||
fclose($this->pop_conn);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// Private Methods
|
||||
/////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* Get the socket response back.
|
||||
* $size is the maximum number of bytes to retrieve
|
||||
* @access private
|
||||
* @param integer $size
|
||||
* @return string
|
||||
*/
|
||||
private function getResponse ($size = 128) {
|
||||
$pop3_response = fgets($this->pop_conn, $size);
|
||||
|
||||
return $pop3_response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a string down the open socket connection to the POP3 server
|
||||
* @access private
|
||||
* @param string $string
|
||||
* @return integer
|
||||
*/
|
||||
private function sendString ($string) {
|
||||
$bytes_sent = fwrite($this->pop_conn, $string, strlen($string));
|
||||
|
||||
return $bytes_sent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks the POP3 server response for +OK or -ERR
|
||||
* @access private
|
||||
* @param string $string
|
||||
* @return boolean
|
||||
*/
|
||||
private function checkResponse ($string) {
|
||||
if (substr($string, 0, 3) !== '+OK') {
|
||||
$this->error = array(
|
||||
'error' => "Server reported an error: $string",
|
||||
'errno' => 0,
|
||||
'errstr' => ''
|
||||
);
|
||||
|
||||
if ($this->do_debug >= 1) {
|
||||
$this->displayErrors();
|
||||
}
|
||||
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* If debug is enabled, display the error message array
|
||||
* @access private
|
||||
*/
|
||||
private function displayErrors () {
|
||||
echo '<pre>';
|
||||
|
||||
foreach ($this->error as $single_error) {
|
||||
print_r($single_error);
|
||||
}
|
||||
|
||||
echo '</pre>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Takes over from PHP for the socket warning handler
|
||||
* @access private
|
||||
* @param integer $errno
|
||||
* @param string $errstr
|
||||
* @param string $errfile
|
||||
* @param integer $errline
|
||||
*/
|
||||
private function catchWarning ($errno, $errstr, $errfile, $errline) {
|
||||
$this->error[] = array(
|
||||
'error' => "Connecting to the POP3 server raised a PHP warning: ",
|
||||
'errno' => $errno,
|
||||
'errstr' => $errstr
|
||||
);
|
||||
}
|
||||
|
||||
// End of class
|
||||
}
|
||||
?>
|
||||
814
feedback/phpmailer/class.smtp.php
Normal file
814
feedback/phpmailer/class.smtp.php
Normal file
@@ -0,0 +1,814 @@
|
||||
<?php
|
||||
/*~ class.smtp.php
|
||||
.---------------------------------------------------------------------------.
|
||||
| Software: PHPMailer - PHP email class |
|
||||
| Version: 5.1 |
|
||||
| Contact: via sourceforge.net support pages (also www.codeworxtech.com) |
|
||||
| Info: http://phpmailer.sourceforge.net |
|
||||
| Support: http://sourceforge.net/projects/phpmailer/ |
|
||||
| ------------------------------------------------------------------------- |
|
||||
| Admin: Andy Prevost (project admininistrator) |
|
||||
| Authors: Andy Prevost (codeworxtech) codeworxtech@users.sourceforge.net |
|
||||
| : Marcus Bointon (coolbru) coolbru@users.sourceforge.net |
|
||||
| Founder: Brent R. Matzelle (original founder) |
|
||||
| Copyright (c) 2004-2009, Andy Prevost. All Rights Reserved. |
|
||||
| Copyright (c) 2001-2003, Brent R. Matzelle |
|
||||
| ------------------------------------------------------------------------- |
|
||||
| License: Distributed under the Lesser General Public License (LGPL) |
|
||||
| http://www.gnu.org/copyleft/lesser.html |
|
||||
| This program is distributed in the hope that it will be useful - WITHOUT |
|
||||
| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| ------------------------------------------------------------------------- |
|
||||
| We offer a number of paid services (www.codeworxtech.com): |
|
||||
| - Web Hosting on highly optimized fast and secure servers |
|
||||
| - Technology Consulting |
|
||||
| - Oursourcing (highly qualified programmers and graphic designers) |
|
||||
'---------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
/**
|
||||
* PHPMailer - PHP SMTP email transport class
|
||||
* NOTE: Designed for use with PHP version 5 and up
|
||||
* @package PHPMailer
|
||||
* @author Andy Prevost
|
||||
* @author Marcus Bointon
|
||||
* @copyright 2004 - 2008 Andy Prevost
|
||||
* @license http://www.gnu.org/copyleft/lesser.html Distributed under the Lesser General Public License (LGPL)
|
||||
* @version $Id: class.smtp.php 444 2009-05-05 11:22:26Z coolbru $
|
||||
*/
|
||||
|
||||
/**
|
||||
* SMTP is rfc 821 compliant and implements all the rfc 821 SMTP
|
||||
* commands except TURN which will always return a not implemented
|
||||
* error. SMTP also provides some utility methods for sending mail
|
||||
* to an SMTP server.
|
||||
* original author: Chris Ryan
|
||||
*/
|
||||
|
||||
class SMTP {
|
||||
/**
|
||||
* SMTP server port
|
||||
* @var int
|
||||
*/
|
||||
public $SMTP_PORT = 25;
|
||||
|
||||
/**
|
||||
* SMTP reply line ending
|
||||
* @var string
|
||||
*/
|
||||
public $CRLF = "\r\n";
|
||||
|
||||
/**
|
||||
* Sets whether debugging is turned on
|
||||
* @var bool
|
||||
*/
|
||||
public $do_debug; // the level of debug to perform
|
||||
|
||||
/**
|
||||
* Sets VERP use on/off (default is off)
|
||||
* @var bool
|
||||
*/
|
||||
public $do_verp = false;
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// PROPERTIES, PRIVATE AND PROTECTED
|
||||
/////////////////////////////////////////////////
|
||||
|
||||
private $smtp_conn; // the socket to the server
|
||||
private $error; // error if any on the last call
|
||||
private $helo_rply; // the reply the server sent to us for HELO
|
||||
|
||||
/**
|
||||
* Initialize the class so that the data is in a known state.
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->smtp_conn = 0;
|
||||
$this->error = null;
|
||||
$this->helo_rply = null;
|
||||
|
||||
$this->do_debug = 0;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// CONNECTION FUNCTIONS
|
||||
/////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* Connect to the server specified on the port specified.
|
||||
* If the port is not specified use the default SMTP_PORT.
|
||||
* If tval is specified then a connection will try and be
|
||||
* established with the server for that number of seconds.
|
||||
* If tval is not specified the default is 30 seconds to
|
||||
* try on the connection.
|
||||
*
|
||||
* SMTP CODE SUCCESS: 220
|
||||
* SMTP CODE FAILURE: 421
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function Connect($host, $port = 0, $tval = 30) {
|
||||
// set the error val to null so there is no confusion
|
||||
$this->error = null;
|
||||
|
||||
// make sure we are __not__ connected
|
||||
if($this->connected()) {
|
||||
// already connected, generate error
|
||||
$this->error = array("error" => "Already connected to a server");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(empty($port)) {
|
||||
$port = $this->SMTP_PORT;
|
||||
}
|
||||
|
||||
// connect to the smtp server
|
||||
$this->smtp_conn = @fsockopen($host, // the host of the server
|
||||
$port, // the port to use
|
||||
$errno, // error number if any
|
||||
$errstr, // error message if any
|
||||
$tval); // give up after ? secs
|
||||
// verify we connected properly
|
||||
if(empty($this->smtp_conn)) {
|
||||
$this->error = array("error" => "Failed to connect to server",
|
||||
"errno" => $errno,
|
||||
"errstr" => $errstr);
|
||||
if($this->do_debug >= 1) {
|
||||
echo "SMTP -> ERROR: " . $this->error["error"] . ": $errstr ($errno)" . $this->CRLF . '<br />';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// SMTP server can take longer to respond, give longer timeout for first read
|
||||
// Windows does not have support for this timeout function
|
||||
if(substr(PHP_OS, 0, 3) != "WIN")
|
||||
socket_set_timeout($this->smtp_conn, $tval, 0);
|
||||
|
||||
// get any announcement
|
||||
$announce = $this->get_lines();
|
||||
|
||||
if($this->do_debug >= 2) {
|
||||
echo "SMTP -> FROM SERVER:" . $announce . $this->CRLF . '<br />';
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiate a TLS communication with the server.
|
||||
*
|
||||
* SMTP CODE 220 Ready to start TLS
|
||||
* SMTP CODE 501 Syntax error (no parameters allowed)
|
||||
* SMTP CODE 454 TLS not available due to temporary reason
|
||||
* @access public
|
||||
* @return bool success
|
||||
*/
|
||||
public function StartTLS() {
|
||||
$this->error = null; # to avoid confusion
|
||||
|
||||
if(!$this->connected()) {
|
||||
$this->error = array("error" => "Called StartTLS() without being connected");
|
||||
return false;
|
||||
}
|
||||
|
||||
fputs($this->smtp_conn,"STARTTLS" . $this->CRLF);
|
||||
|
||||
$rply = $this->get_lines();
|
||||
$code = substr($rply,0,3);
|
||||
|
||||
if($this->do_debug >= 2) {
|
||||
echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '<br />';
|
||||
}
|
||||
|
||||
if($code != 220) {
|
||||
$this->error =
|
||||
array("error" => "STARTTLS not accepted from server",
|
||||
"smtp_code" => $code,
|
||||
"smtp_msg" => substr($rply,4));
|
||||
if($this->do_debug >= 1) {
|
||||
echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Begin encrypted connection
|
||||
if(!stream_socket_enable_crypto($this->smtp_conn, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs SMTP authentication. Must be run after running the
|
||||
* Hello() method. Returns true if successfully authenticated.
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function Authenticate($username, $password) {
|
||||
// Start authentication
|
||||
fputs($this->smtp_conn,"AUTH LOGIN" . $this->CRLF);
|
||||
|
||||
$rply = $this->get_lines();
|
||||
$code = substr($rply,0,3);
|
||||
|
||||
if($code != 334) {
|
||||
$this->error =
|
||||
array("error" => "AUTH not accepted from server",
|
||||
"smtp_code" => $code,
|
||||
"smtp_msg" => substr($rply,4));
|
||||
if($this->do_debug >= 1) {
|
||||
echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Send encoded username
|
||||
fputs($this->smtp_conn, base64_encode($username) . $this->CRLF);
|
||||
|
||||
$rply = $this->get_lines();
|
||||
$code = substr($rply,0,3);
|
||||
|
||||
if($code != 334) {
|
||||
$this->error =
|
||||
array("error" => "Username not accepted from server",
|
||||
"smtp_code" => $code,
|
||||
"smtp_msg" => substr($rply,4));
|
||||
if($this->do_debug >= 1) {
|
||||
echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Send encoded password
|
||||
fputs($this->smtp_conn, base64_encode($password) . $this->CRLF);
|
||||
|
||||
$rply = $this->get_lines();
|
||||
$code = substr($rply,0,3);
|
||||
|
||||
if($code != 235) {
|
||||
$this->error =
|
||||
array("error" => "Password not accepted from server",
|
||||
"smtp_code" => $code,
|
||||
"smtp_msg" => substr($rply,4));
|
||||
if($this->do_debug >= 1) {
|
||||
echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if connected to a server otherwise false
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function Connected() {
|
||||
if(!empty($this->smtp_conn)) {
|
||||
$sock_status = socket_get_status($this->smtp_conn);
|
||||
if($sock_status["eof"]) {
|
||||
// the socket is valid but we are not connected
|
||||
if($this->do_debug >= 1) {
|
||||
echo "SMTP -> NOTICE:" . $this->CRLF . "EOF caught while checking if connected";
|
||||
}
|
||||
$this->Close();
|
||||
return false;
|
||||
}
|
||||
return true; // everything looks good
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Closes the socket and cleans up the state of the class.
|
||||
* It is not considered good to use this function without
|
||||
* first trying to use QUIT.
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function Close() {
|
||||
$this->error = null; // so there is no confusion
|
||||
$this->helo_rply = null;
|
||||
if(!empty($this->smtp_conn)) {
|
||||
// close the connection and cleanup
|
||||
fclose($this->smtp_conn);
|
||||
$this->smtp_conn = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// SMTP COMMANDS
|
||||
/////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* Issues a data command and sends the msg_data to the server
|
||||
* finializing the mail transaction. $msg_data is the message
|
||||
* that is to be send with the headers. Each header needs to be
|
||||
* on a single line followed by a <CRLF> with the message headers
|
||||
* and the message body being seperated by and additional <CRLF>.
|
||||
*
|
||||
* Implements rfc 821: DATA <CRLF>
|
||||
*
|
||||
* SMTP CODE INTERMEDIATE: 354
|
||||
* [data]
|
||||
* <CRLF>.<CRLF>
|
||||
* SMTP CODE SUCCESS: 250
|
||||
* SMTP CODE FAILURE: 552,554,451,452
|
||||
* SMTP CODE FAILURE: 451,554
|
||||
* SMTP CODE ERROR : 500,501,503,421
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function Data($msg_data) {
|
||||
$this->error = null; // so no confusion is caused
|
||||
|
||||
if(!$this->connected()) {
|
||||
$this->error = array(
|
||||
"error" => "Called Data() without being connected");
|
||||
return false;
|
||||
}
|
||||
|
||||
fputs($this->smtp_conn,"DATA" . $this->CRLF);
|
||||
|
||||
$rply = $this->get_lines();
|
||||
$code = substr($rply,0,3);
|
||||
|
||||
if($this->do_debug >= 2) {
|
||||
echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '<br />';
|
||||
}
|
||||
|
||||
if($code != 354) {
|
||||
$this->error =
|
||||
array("error" => "DATA command not accepted from server",
|
||||
"smtp_code" => $code,
|
||||
"smtp_msg" => substr($rply,4));
|
||||
if($this->do_debug >= 1) {
|
||||
echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* the server is ready to accept data!
|
||||
* according to rfc 821 we should not send more than 1000
|
||||
* including the CRLF
|
||||
* characters on a single line so we will break the data up
|
||||
* into lines by \r and/or \n then if needed we will break
|
||||
* each of those into smaller lines to fit within the limit.
|
||||
* in addition we will be looking for lines that start with
|
||||
* a period '.' and append and additional period '.' to that
|
||||
* line. NOTE: this does not count towards limit.
|
||||
*/
|
||||
|
||||
// normalize the line breaks so we know the explode works
|
||||
$msg_data = str_replace("\r\n","\n",$msg_data);
|
||||
$msg_data = str_replace("\r","\n",$msg_data);
|
||||
$lines = explode("\n",$msg_data);
|
||||
|
||||
/* we need to find a good way to determine is headers are
|
||||
* in the msg_data or if it is a straight msg body
|
||||
* currently I am assuming rfc 822 definitions of msg headers
|
||||
* and if the first field of the first line (':' sperated)
|
||||
* does not contain a space then it _should_ be a header
|
||||
* and we can process all lines before a blank "" line as
|
||||
* headers.
|
||||
*/
|
||||
|
||||
$field = substr($lines[0],0,strpos($lines[0],":"));
|
||||
$in_headers = false;
|
||||
if(!empty($field) && !strstr($field," ")) {
|
||||
$in_headers = true;
|
||||
}
|
||||
|
||||
$max_line_length = 998; // used below; set here for ease in change
|
||||
|
||||
while(list(,$line) = @each($lines)) {
|
||||
$lines_out = null;
|
||||
if($line == "" && $in_headers) {
|
||||
$in_headers = false;
|
||||
}
|
||||
// ok we need to break this line up into several smaller lines
|
||||
while(strlen($line) > $max_line_length) {
|
||||
$pos = strrpos(substr($line,0,$max_line_length)," ");
|
||||
|
||||
// Patch to fix DOS attack
|
||||
if(!$pos) {
|
||||
$pos = $max_line_length - 1;
|
||||
$lines_out[] = substr($line,0,$pos);
|
||||
$line = substr($line,$pos);
|
||||
} else {
|
||||
$lines_out[] = substr($line,0,$pos);
|
||||
$line = substr($line,$pos + 1);
|
||||
}
|
||||
|
||||
/* if processing headers add a LWSP-char to the front of new line
|
||||
* rfc 822 on long msg headers
|
||||
*/
|
||||
if($in_headers) {
|
||||
$line = "\t" . $line;
|
||||
}
|
||||
}
|
||||
$lines_out[] = $line;
|
||||
|
||||
// send the lines to the server
|
||||
while(list(,$line_out) = @each($lines_out)) {
|
||||
if(strlen($line_out) > 0)
|
||||
{
|
||||
if(substr($line_out, 0, 1) == ".") {
|
||||
$line_out = "." . $line_out;
|
||||
}
|
||||
}
|
||||
fputs($this->smtp_conn,$line_out . $this->CRLF);
|
||||
}
|
||||
}
|
||||
|
||||
// message data has been sent
|
||||
fputs($this->smtp_conn, $this->CRLF . "." . $this->CRLF);
|
||||
|
||||
$rply = $this->get_lines();
|
||||
$code = substr($rply,0,3);
|
||||
|
||||
if($this->do_debug >= 2) {
|
||||
echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '<br />';
|
||||
}
|
||||
|
||||
if($code != 250) {
|
||||
$this->error =
|
||||
array("error" => "DATA not accepted from server",
|
||||
"smtp_code" => $code,
|
||||
"smtp_msg" => substr($rply,4));
|
||||
if($this->do_debug >= 1) {
|
||||
echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends the HELO command to the smtp server.
|
||||
* This makes sure that we and the server are in
|
||||
* the same known state.
|
||||
*
|
||||
* Implements from rfc 821: HELO <SP> <domain> <CRLF>
|
||||
*
|
||||
* SMTP CODE SUCCESS: 250
|
||||
* SMTP CODE ERROR : 500, 501, 504, 421
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function Hello($host = '') {
|
||||
$this->error = null; // so no confusion is caused
|
||||
|
||||
if(!$this->connected()) {
|
||||
$this->error = array(
|
||||
"error" => "Called Hello() without being connected");
|
||||
return false;
|
||||
}
|
||||
|
||||
// if hostname for HELO was not specified send default
|
||||
if(empty($host)) {
|
||||
// determine appropriate default to send to server
|
||||
$host = "localhost";
|
||||
}
|
||||
|
||||
// Send extended hello first (RFC 2821)
|
||||
if(!$this->SendHello("EHLO", $host)) {
|
||||
if(!$this->SendHello("HELO", $host)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a HELO/EHLO command.
|
||||
* @access private
|
||||
* @return bool
|
||||
*/
|
||||
private function SendHello($hello, $host) {
|
||||
fputs($this->smtp_conn, $hello . " " . $host . $this->CRLF);
|
||||
|
||||
$rply = $this->get_lines();
|
||||
$code = substr($rply,0,3);
|
||||
|
||||
if($this->do_debug >= 2) {
|
||||
echo "SMTP -> FROM SERVER: " . $rply . $this->CRLF . '<br />';
|
||||
}
|
||||
|
||||
if($code != 250) {
|
||||
$this->error =
|
||||
array("error" => $hello . " not accepted from server",
|
||||
"smtp_code" => $code,
|
||||
"smtp_msg" => substr($rply,4));
|
||||
if($this->do_debug >= 1) {
|
||||
echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->helo_rply = $rply;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts a mail transaction from the email address specified in
|
||||
* $from. Returns true if successful or false otherwise. If True
|
||||
* the mail transaction is started and then one or more Recipient
|
||||
* commands may be called followed by a Data command.
|
||||
*
|
||||
* Implements rfc 821: MAIL <SP> FROM:<reverse-path> <CRLF>
|
||||
*
|
||||
* SMTP CODE SUCCESS: 250
|
||||
* SMTP CODE SUCCESS: 552,451,452
|
||||
* SMTP CODE SUCCESS: 500,501,421
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function Mail($from) {
|
||||
$this->error = null; // so no confusion is caused
|
||||
|
||||
if(!$this->connected()) {
|
||||
$this->error = array(
|
||||
"error" => "Called Mail() without being connected");
|
||||
return false;
|
||||
}
|
||||
|
||||
$useVerp = ($this->do_verp ? "XVERP" : "");
|
||||
fputs($this->smtp_conn,"MAIL FROM:<" . $from . ">" . $useVerp . $this->CRLF);
|
||||
|
||||
$rply = $this->get_lines();
|
||||
$code = substr($rply,0,3);
|
||||
|
||||
if($this->do_debug >= 2) {
|
||||
echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '<br />';
|
||||
}
|
||||
|
||||
if($code != 250) {
|
||||
$this->error =
|
||||
array("error" => "MAIL not accepted from server",
|
||||
"smtp_code" => $code,
|
||||
"smtp_msg" => substr($rply,4));
|
||||
if($this->do_debug >= 1) {
|
||||
echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends the quit command to the server and then closes the socket
|
||||
* if there is no error or the $close_on_error argument is true.
|
||||
*
|
||||
* Implements from rfc 821: QUIT <CRLF>
|
||||
*
|
||||
* SMTP CODE SUCCESS: 221
|
||||
* SMTP CODE ERROR : 500
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function Quit($close_on_error = true) {
|
||||
$this->error = null; // so there is no confusion
|
||||
|
||||
if(!$this->connected()) {
|
||||
$this->error = array(
|
||||
"error" => "Called Quit() without being connected");
|
||||
return false;
|
||||
}
|
||||
|
||||
// send the quit command to the server
|
||||
fputs($this->smtp_conn,"quit" . $this->CRLF);
|
||||
|
||||
// get any good-bye messages
|
||||
$byemsg = $this->get_lines();
|
||||
|
||||
if($this->do_debug >= 2) {
|
||||
echo "SMTP -> FROM SERVER:" . $byemsg . $this->CRLF . '<br />';
|
||||
}
|
||||
|
||||
$rval = true;
|
||||
$e = null;
|
||||
|
||||
$code = substr($byemsg,0,3);
|
||||
if($code != 221) {
|
||||
// use e as a tmp var cause Close will overwrite $this->error
|
||||
$e = array("error" => "SMTP server rejected quit command",
|
||||
"smtp_code" => $code,
|
||||
"smtp_rply" => substr($byemsg,4));
|
||||
$rval = false;
|
||||
if($this->do_debug >= 1) {
|
||||
echo "SMTP -> ERROR: " . $e["error"] . ": " . $byemsg . $this->CRLF . '<br />';
|
||||
}
|
||||
}
|
||||
|
||||
if(empty($e) || $close_on_error) {
|
||||
$this->Close();
|
||||
}
|
||||
|
||||
return $rval;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends the command RCPT to the SMTP server with the TO: argument of $to.
|
||||
* Returns true if the recipient was accepted false if it was rejected.
|
||||
*
|
||||
* Implements from rfc 821: RCPT <SP> TO:<forward-path> <CRLF>
|
||||
*
|
||||
* SMTP CODE SUCCESS: 250,251
|
||||
* SMTP CODE FAILURE: 550,551,552,553,450,451,452
|
||||
* SMTP CODE ERROR : 500,501,503,421
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function Recipient($to) {
|
||||
$this->error = null; // so no confusion is caused
|
||||
|
||||
if(!$this->connected()) {
|
||||
$this->error = array(
|
||||
"error" => "Called Recipient() without being connected");
|
||||
return false;
|
||||
}
|
||||
|
||||
fputs($this->smtp_conn,"RCPT TO:<" . $to . ">" . $this->CRLF);
|
||||
|
||||
$rply = $this->get_lines();
|
||||
$code = substr($rply,0,3);
|
||||
|
||||
if($this->do_debug >= 2) {
|
||||
echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '<br />';
|
||||
}
|
||||
|
||||
if($code != 250 && $code != 251) {
|
||||
$this->error =
|
||||
array("error" => "RCPT not accepted from server",
|
||||
"smtp_code" => $code,
|
||||
"smtp_msg" => substr($rply,4));
|
||||
if($this->do_debug >= 1) {
|
||||
echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends the RSET command to abort and transaction that is
|
||||
* currently in progress. Returns true if successful false
|
||||
* otherwise.
|
||||
*
|
||||
* Implements rfc 821: RSET <CRLF>
|
||||
*
|
||||
* SMTP CODE SUCCESS: 250
|
||||
* SMTP CODE ERROR : 500,501,504,421
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function Reset() {
|
||||
$this->error = null; // so no confusion is caused
|
||||
|
||||
if(!$this->connected()) {
|
||||
$this->error = array(
|
||||
"error" => "Called Reset() without being connected");
|
||||
return false;
|
||||
}
|
||||
|
||||
fputs($this->smtp_conn,"RSET" . $this->CRLF);
|
||||
|
||||
$rply = $this->get_lines();
|
||||
$code = substr($rply,0,3);
|
||||
|
||||
if($this->do_debug >= 2) {
|
||||
echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '<br />';
|
||||
}
|
||||
|
||||
if($code != 250) {
|
||||
$this->error =
|
||||
array("error" => "RSET failed",
|
||||
"smtp_code" => $code,
|
||||
"smtp_msg" => substr($rply,4));
|
||||
if($this->do_debug >= 1) {
|
||||
echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts a mail transaction from the email address specified in
|
||||
* $from. Returns true if successful or false otherwise. If True
|
||||
* the mail transaction is started and then one or more Recipient
|
||||
* commands may be called followed by a Data command. This command
|
||||
* will send the message to the users terminal if they are logged
|
||||
* in and send them an email.
|
||||
*
|
||||
* Implements rfc 821: SAML <SP> FROM:<reverse-path> <CRLF>
|
||||
*
|
||||
* SMTP CODE SUCCESS: 250
|
||||
* SMTP CODE SUCCESS: 552,451,452
|
||||
* SMTP CODE SUCCESS: 500,501,502,421
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function SendAndMail($from) {
|
||||
$this->error = null; // so no confusion is caused
|
||||
|
||||
if(!$this->connected()) {
|
||||
$this->error = array(
|
||||
"error" => "Called SendAndMail() without being connected");
|
||||
return false;
|
||||
}
|
||||
|
||||
fputs($this->smtp_conn,"SAML FROM:" . $from . $this->CRLF);
|
||||
|
||||
$rply = $this->get_lines();
|
||||
$code = substr($rply,0,3);
|
||||
|
||||
if($this->do_debug >= 2) {
|
||||
echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '<br />';
|
||||
}
|
||||
|
||||
if($code != 250) {
|
||||
$this->error =
|
||||
array("error" => "SAML not accepted from server",
|
||||
"smtp_code" => $code,
|
||||
"smtp_msg" => substr($rply,4));
|
||||
if($this->do_debug >= 1) {
|
||||
echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* This is an optional command for SMTP that this class does not
|
||||
* support. This method is here to make the RFC821 Definition
|
||||
* complete for this class and __may__ be implimented in the future
|
||||
*
|
||||
* Implements from rfc 821: TURN <CRLF>
|
||||
*
|
||||
* SMTP CODE SUCCESS: 250
|
||||
* SMTP CODE FAILURE: 502
|
||||
* SMTP CODE ERROR : 500, 503
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function Turn() {
|
||||
$this->error = array("error" => "This method, TURN, of the SMTP ".
|
||||
"is not implemented");
|
||||
if($this->do_debug >= 1) {
|
||||
echo "SMTP -> NOTICE: " . $this->error["error"] . $this->CRLF . '<br />';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current error
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getError() {
|
||||
return $this->error;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// INTERNAL FUNCTIONS
|
||||
/////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* Read in as many lines as possible
|
||||
* either before eof or socket timeout occurs on the operation.
|
||||
* With SMTP we can tell if we have more lines to read if the
|
||||
* 4th character is '-' symbol. If it is a space then we don't
|
||||
* need to read anything else.
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
private function get_lines() {
|
||||
$data = "";
|
||||
while($str = @fgets($this->smtp_conn,515)) {
|
||||
if($this->do_debug >= 4) {
|
||||
echo "SMTP -> get_lines(): \$data was \"$data\"" . $this->CRLF . '<br />';
|
||||
echo "SMTP -> get_lines(): \$str is \"$str\"" . $this->CRLF . '<br />';
|
||||
}
|
||||
$data .= $str;
|
||||
if($this->do_debug >= 4) {
|
||||
echo "SMTP -> get_lines(): \$data is \"$data\"" . $this->CRLF . '<br />';
|
||||
}
|
||||
// if 4th character is a space, we are done reading, break the loop
|
||||
if(substr($str,3,1) == " ") { break; }
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
27
feedback/phpmailer/language/phpmailer.lang-ar.php
Normal file
27
feedback/phpmailer/language/phpmailer.lang-ar.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer language file: refer to English translation for definitive list
|
||||
* Arabic Version, UTF-8
|
||||
* by : bahjat al mostafa <bahjat983@hotmail.com>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP Error: لم نستطع تأكيد الهوية.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP Error: لم نستطع الاتصال بمخدم SMTP.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: لم يتم قبول المعلومات .';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = 'ترميز غير معروف: ';
|
||||
$PHPMAILER_LANG['execute'] = 'لم أستطع تنفيذ : ';
|
||||
$PHPMAILER_LANG['file_access'] = 'لم نستطع الوصول للملف: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'File Error: لم نستطع فتح الملف: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'البريد التالي لم نستطع ارسال البريد له : ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'لم نستطع توفير خدمة البريد.';
|
||||
//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer غير مدعوم.';
|
||||
//$PHPMAILER_LANG['provide_address'] = 'You must provide at least one recipient email address.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: الأخطاء التالية ' .
|
||||
'فشل في الارسال لكل من : ';
|
||||
$PHPMAILER_LANG['signing'] = 'خطأ في التوقيع: ';
|
||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||
?>
|
||||
26
feedback/phpmailer/language/phpmailer.lang-br.php
Normal file
26
feedback/phpmailer/language/phpmailer.lang-br.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer language file: refer to English translation for definitive list
|
||||
* Portuguese Version
|
||||
* By Paulo Henrique Garcia - paulo@controllerweb.com.br
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Erro de SMTP: Não foi possível autenticar.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Erro de SMTP: Não foi possível conectar com o servidor SMTP.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Erro de SMTP: Dados não aceitos.';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Não foi possível executar: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Não foi possível acessar o arquivo: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: Não foi possível abrir o arquivo: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Os endereços de rementente a seguir falharam: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Não foi possível instanciar a função mail.';
|
||||
//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não suportado.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Você deve fornecer pelo menos um endereço de destinatário de email.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Erro de SMTP: Os endereços de destinatário a seguir falharam: ';
|
||||
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||
?>
|
||||
26
feedback/phpmailer/language/phpmailer.lang-ca.php
Normal file
26
feedback/phpmailer/language/phpmailer.lang-ca.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer language file: refer to English translation for definitive list
|
||||
* Catalan Version
|
||||
* By Ivan: web AT microstudi DOT com
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Error SMTP: No s\'hapogut autenticar.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Error SMTP: No es pot connectar al servidor SMTP.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Dades no acceptades.';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = 'Codificació desconeguda: ';
|
||||
$PHPMAILER_LANG['execute'] = 'No es pot executar: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'No es pot accedir a l\'arxiu: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Error d\'Arxiu: No es pot obrir l\'arxiu: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'La(s) següent(s) adreces de remitent han fallat: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'No s\'ha pogut crear una instància de la funció Mail.';
|
||||
//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no està suportat';
|
||||
$PHPMAILER_LANG['provide_address'] = 'S\'ha de proveir almenys una adreça d\'email com a destinatari.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Els següents destinataris han fallat: ';
|
||||
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||
?>
|
||||
26
feedback/phpmailer/language/phpmailer.lang-ch.php
Normal file
26
feedback/phpmailer/language/phpmailer.lang-ch.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer language file: refer to English translation for definitive list
|
||||
* Chinese Version
|
||||
* By LiuXin: www.80x86.cn/blog/
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:身份验证失败。';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP 错误: 不能连接SMTP主机。';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误: 数据不可接受。';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = '未知编码:';
|
||||
$PHPMAILER_LANG['execute'] = '不能执行: ';
|
||||
$PHPMAILER_LANG['file_access'] = '不能访问文件:';
|
||||
$PHPMAILER_LANG['file_open'] = '文件错误:不能打开文件:';
|
||||
$PHPMAILER_LANG['from_failed'] = '下面的发送地址邮件发送失败了: ';
|
||||
$PHPMAILER_LANG['instantiate'] = '不能实现mail方法。';
|
||||
//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' 您所选择的发送邮件的方法并不支持。';
|
||||
$PHPMAILER_LANG['provide_address'] = '您必须提供至少一个 收信人的email地址。';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误: 下面的 收件人失败了: ';
|
||||
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||
?>
|
||||
25
feedback/phpmailer/language/phpmailer.lang-cz.php
Normal file
25
feedback/phpmailer/language/phpmailer.lang-cz.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer language file: refer to English translation for definitive list
|
||||
* Czech Version
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Chyba autentikace.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Nelze navázat spojení se SMTP serverem.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Data nebyla pøijata';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = 'Neznámé kódování: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Nelze provést: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Soubor nenalezen: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'File Error: Nelze otevøít soubor pro ètení: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Následující adresa From je nesprávná: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Nelze vytvoøit instanci emailové funkce.';
|
||||
//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailový klient není podporován.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Musíte zadat alespoò jednu emailovou adresu pøíjemce.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Adresy pøíjemcù nejsou správné ';
|
||||
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||
?>
|
||||
25
feedback/phpmailer/language/phpmailer.lang-de.php
Normal file
25
feedback/phpmailer/language/phpmailer.lang-de.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer language file: refer to English translation for definitive list
|
||||
* German Version
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP Fehler: Authentifizierung fehlgeschlagen.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP Fehler: Konnte keine Verbindung zum SMTP-Host herstellen.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Fehler: Daten werden nicht akzeptiert.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'E-Mail Inhalt ist leer.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Unbekanntes Encoding-Format: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Konnte folgenden Befehl nicht ausführen: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Zugriff auf folgende Datei fehlgeschlagen: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Datei Fehler: konnte folgende Datei nicht öffnen: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Die folgende Absenderadresse ist nicht korrekt: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Mail Funktion konnte nicht initialisiert werden.';
|
||||
$PHPMAILER_LANG['invalid_email'] = 'E-Mail wird nicht gesendet, die Adresse ist ungültig.';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wird nicht unterstützt.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Bitte geben Sie mindestens eine Empfänger E-Mailadresse an.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Fehler: Die folgenden Empfänger sind nicht korrekt: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Fehler beim Signieren: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Verbindung zu SMTP Server fehlgeschlagen.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Fehler vom SMTP Server: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Kann Variable nicht setzen oder zurücksetzen: ';
|
||||
?>
|
||||
26
feedback/phpmailer/language/phpmailer.lang-dk.php
Normal file
26
feedback/phpmailer/language/phpmailer.lang-dk.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer language file: refer to English translation for definitive list
|
||||
* Danish Version
|
||||
* Author: Mikael Stokkebro <info@stokkebro.dk>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Kunne ikke logge på.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP fejl: Kunne ikke tilslutte SMTP serveren.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data kunne ikke accepteres.';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = 'Ukendt encode-format: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Kunne ikke køre: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Ingen adgang til fil: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Fil fejl: Kunne ikke åbne filen: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Følgende afsenderadresse er forkert: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Kunne ikke initialisere email funktionen.';
|
||||
//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer understøttes ikke.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Du skal indtaste mindst en modtagers emailadresse.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP fejl: Følgende modtagere er forkerte: ';
|
||||
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||
?>
|
||||
26
feedback/phpmailer/language/phpmailer.lang-es.php
Normal file
26
feedback/phpmailer/language/phpmailer.lang-es.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer language file: refer to English translation for definitive list
|
||||
* Spanish version
|
||||
* Versión en español
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Error SMTP: No se pudo autentificar.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Error SMTP: No puedo conectar al servidor SMTP.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Datos no aceptados.';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = 'Codificación desconocida: ';
|
||||
$PHPMAILER_LANG['execute'] = 'No puedo ejecutar: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'No puedo acceder al archivo: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Error de Archivo: No puede abrir el archivo: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'La(s) siguiente(s) direcciones de remitente fallaron: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'No pude crear una instancia de la función Mail.';
|
||||
//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no está soportado.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Debe proveer al menos una dirección de email como destinatario.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Los siguientes destinatarios fallaron: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Error al firmar: ';
|
||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||
?>
|
||||
26
feedback/phpmailer/language/phpmailer.lang-et.php
Normal file
26
feedback/phpmailer/language/phpmailer.lang-et.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer language file: refer to English translation for definitive list
|
||||
* Estonian Version
|
||||
* By Indrek Päri
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP Viga: Autoriseerimise viga.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP Viga: Ei õnnestunud luua ühendust SMTP serveriga.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Viga: Vigased andmed.';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = 'Tundmatu Unknown kodeering: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Tegevus ebaõnnestus: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Pole piisavalt õiguseid järgneva faili avamiseks: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Faili Viga: Faili avamine ebaõnnestus: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Järgnev saatja e-posti aadress on vigane: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'mail funktiooni käivitamine ebaõnnestus.';
|
||||
//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Te peate määrama vähemalt ühe saaja e-posti aadressi.';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' maileri tugi puudub.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Viga: Järgnevate saajate e-posti aadressid on vigased: ';
|
||||
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||
?>
|
||||
27
feedback/phpmailer/language/phpmailer.lang-fi.php
Normal file
27
feedback/phpmailer/language/phpmailer.lang-fi.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer language file: refer to English translation for definitive list
|
||||
* Finnish Version
|
||||
* By Jyry Kuukanen
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP-virhe: käyttäjätunnistus epäonnistui.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP-virhe: yhteys palvelimeen ei onnistu.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-virhe: data on virheellinen.';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = 'Tuntematon koodaustyyppi: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Suoritus epäonnistui: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Seuraavaan tiedostoon ei ole oikeuksia: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Tiedostovirhe: Ei voida avata tiedostoa: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Seuraava lähettäjän osoite on virheellinen: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'mail-funktion luonti epäonnistui.';
|
||||
//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = 'postivälitintyyppiä ei tueta.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Aseta vähintään yksi vastaanottajan sähköpostiosoite.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-virhe: seuraava vastaanottaja osoite on virheellinen.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Tuntematon koodaustyyppi: ';
|
||||
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||
?>
|
||||
27
feedback/phpmailer/language/phpmailer.lang-fo.php
Normal file
27
feedback/phpmailer/language/phpmailer.lang-fo.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer language file: refer to English translation for definitive list
|
||||
* Faroese Version [language of the Faroe Islands, a Danish dominion]
|
||||
* This file created: 11-06-2004
|
||||
* Supplied by Dávur Sørensen [www.profo-webdesign.dk]
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP feilur: Kundi ikki góðkenna.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP feilur: Kundi ikki knýta samband við SMTP vert.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP feilur: Data ikki góðkent.';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = 'Ókend encoding: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Kundi ikki útføra: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Kundi ikki tilganga fílu: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Fílu feilur: Kundi ikki opna fílu: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'fylgjandi Frá/From adressa miseydnaðist: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Kuni ikki instantiera mail funktión.';
|
||||
//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' er ikki supporterað.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Tú skal uppgeva minst móttakara-emailadressu(r).';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Feilur: Fylgjandi móttakarar miseydnaðust: ';
|
||||
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||
?>
|
||||
25
feedback/phpmailer/language/phpmailer.lang-fr.php
Normal file
25
feedback/phpmailer/language/phpmailer.lang-fr.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer language file: refer to English translation for definitive list
|
||||
* French Version
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Erreur SMTP : Echec de l\'authentification.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Erreur SMTP : Impossible de se connecter au serveur SMTP.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Erreur SMTP : Données incorrects.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Corps de message vide';
|
||||
$PHPMAILER_LANG['encoding'] = 'Encodage inconnu : ';
|
||||
$PHPMAILER_LANG['execute'] = 'Impossible de lancer l\'exécution : ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Impossible d\'accéder au fichier : ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Erreur Fichier : ouverture impossible : ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'L\'adresse d\'expéditeur suivante a échouée : ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Impossible d\'instancier la fonction mail.';
|
||||
//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' client de messagerie non supporté.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Vous devez fournir au moins une adresse de destinataire.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Erreur SMTP : Les destinataires suivants sont en erreur : ';
|
||||
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||
?>
|
||||
25
feedback/phpmailer/language/phpmailer.lang-hu.php
Normal file
25
feedback/phpmailer/language/phpmailer.lang-hu.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer language file: refer to English translation for definitive list
|
||||
* Hungarian Version
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP Hiba: Sikertelen autentikáció.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP Hiba: Nem tudtam csatlakozni az SMTP host-hoz.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Hiba: Nem elfogadható adat.';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = 'Ismeretlen kódolás: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Nem tudtam végrehajtani: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Nem sikerült elérni a következõ fájlt: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Fájl Hiba: Nem sikerült megnyitni a következõ fájlt: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Az alábbi Feladó cím hibás: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Nem sikerült példányosítani a mail funkciót.';
|
||||
//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Meg kell adnod legalább egy címzett email címet.';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' levelezõ nem támogatott.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Hiba: Az alábbi címzettek hibásak: ';
|
||||
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||
?>
|
||||
27
feedback/phpmailer/language/phpmailer.lang-it.php
Normal file
27
feedback/phpmailer/language/phpmailer.lang-it.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer language file: refer to English translation for definitive list
|
||||
* Italian version
|
||||
* @package PHPMailer
|
||||
* @author Ilias Bartolini <brain79@inwind.it>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Impossibile autenticarsi.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Impossibile connettersi all\'host SMTP.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Data non accettati dal server.';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = 'Encoding set dei caratteri sconosciuto: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Impossibile eseguire l\'operazione: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Impossibile accedere al file: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'File Error: Impossibile aprire il file: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'I seguenti indirizzi mittenti hanno generato errore: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Impossibile istanziare la funzione mail';
|
||||
//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Deve essere fornito almeno un indirizzo ricevente';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = 'Mailer non supportato';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: I seguenti indirizzi destinatari hanno generato errore: ';
|
||||
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||
?>
|
||||
26
feedback/phpmailer/language/phpmailer.lang-ja.php
Normal file
26
feedback/phpmailer/language/phpmailer.lang-ja.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer language file: refer to English translation for definitive list
|
||||
* Japanese Version
|
||||
* By Mitsuhiro Yoshida - http://mitstek.com/
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = '不明なエンコーディング: ';
|
||||
$PHPMAILER_LANG['execute'] = '実行できませんでした: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: ';
|
||||
$PHPMAILER_LANG['from_failed'] = '次のFromアドレスに間違いがあります: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。';
|
||||
//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: ';
|
||||
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||
?>
|
||||
25
feedback/phpmailer/language/phpmailer.lang-nl.php
Normal file
25
feedback/phpmailer/language/phpmailer.lang-nl.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer language file: refer to English translation for definitive list
|
||||
* Dutch Version
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP Fout: authenticatie mislukt.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP Fout: Kon niet verbinden met SMTP host.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Fout: Data niet geaccepteerd.';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = 'Onbekende codering: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Kon niet uitvoeren: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Kreeg geen toegang tot bestand: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Bestandsfout: Kon bestand niet openen: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'De volgende afzender adressen zijn mislukt: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Kon mail functie niet initialiseren.';
|
||||
//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Er moet tenmiste één ontvanger emailadres opgegeven worden.';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wordt niet ondersteund.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Fout: De volgende ontvangers zijn mislukt: ';
|
||||
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||
?>
|
||||
25
feedback/phpmailer/language/phpmailer.lang-no.php
Normal file
25
feedback/phpmailer/language/phpmailer.lang-no.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer language file: refer to English translation for definitive list
|
||||
* Norwegian Version
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP Feil: Kunne ikke authentisere.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP Feil: Kunne ikke koble til SMTP host.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Feil: Data ble ikke akseptert.';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = 'Ukjent encoding: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Kunne ikke utføre: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Kunne ikke få tilgang til filen: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Fil feil: Kunne ikke åpne filen: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Følgende Fra feilet: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Kunne ikke instantiate mail funksjonen.';
|
||||
//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Du må ha med minst en mottager adresse.';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer er ikke supportert.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Feil: Følgende mottagere feilet: ';
|
||||
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||
?>
|
||||
25
feedback/phpmailer/language/phpmailer.lang-pl.php
Normal file
25
feedback/phpmailer/language/phpmailer.lang-pl.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer language file: refer to English translation for definitive list
|
||||
* Polish Version
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Błąd SMTP: Nie można przeprowadzić autentykacji.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Błąd SMTP: Nie można połączyć się z wybranym hostem.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Błąd SMTP: Dane nie zostały przyjęte.';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = 'Nieznany sposób kodowania znaków: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Nie można uruchomić: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Brak dostępu do pliku: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Nie można otworzyć pliku: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Następujący adres Nadawcy jest jest nieprawidłowy: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Nie można wywołać funkcji mail(). Sprawdź konfigurację serwera.';
|
||||
//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Należy podać prawidłowy adres email Odbiorcy.';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = 'Wybrana metoda wysyłki wiadomości nie jest obsługiwana.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Błąd SMTP: Następujący odbiorcy są nieprawidłowi: ';
|
||||
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||
?>
|
||||
27
feedback/phpmailer/language/phpmailer.lang-ro.php
Normal file
27
feedback/phpmailer/language/phpmailer.lang-ro.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer language file: refer to English translation for definitive list
|
||||
* Romanian Version
|
||||
* @package PHPMailer
|
||||
* @author Catalin Constantin <catalin@dazoot.ro>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Eroare SMTP: Nu a functionat autentificarea.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Eroare SMTP: Nu m-am putut conecta la adresa SMTP.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Eroare SMTP: Continutul mailului nu a fost acceptat.';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = 'Encodare necunoscuta: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Nu pot executa: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Nu pot accesa fisierul: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Eroare de fisier: Nu pot deschide fisierul: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Urmatoarele adrese From au dat eroare: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Nu am putut instantia functia mail.';
|
||||
//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nu este suportat.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Trebuie sa adaugati cel putin un recipient (adresa de mail).';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Eroare SMTP: Urmatoarele adrese de mail au dat eroare: ';
|
||||
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||
?>
|
||||
25
feedback/phpmailer/language/phpmailer.lang-ru.php
Normal file
25
feedback/phpmailer/language/phpmailer.lang-ru.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer language file: refer to English translation for definitive list
|
||||
* Russian Version by Alexey Chumakov <alex@chumakov.ru>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Ошибка SMTP: ошибка авторизации.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Ошибка SMTP: не удается подключиться к серверу SMTP.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Ошибка SMTP: данные не приняты.';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = 'Неизвестный вид кодировки: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Невозможно выполнить команду: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Нет доступа к файлу: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Файловая ошибка: не удается открыть файл: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Неверный адрес отправителя: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Невозможно запустить функцию mail.';
|
||||
//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Пожалуйста, введите хотя бы один адрес e-mail получателя.';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' - почтовый сервер не поддерживается.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Ошибка SMTP: отправка по следующим адресам получателей не удалась: ';
|
||||
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||
?>
|
||||
26
feedback/phpmailer/language/phpmailer.lang-se.php
Normal file
26
feedback/phpmailer/language/phpmailer.lang-se.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer language file: refer to English translation for definitive list
|
||||
* Swedish Version
|
||||
* Author: Johan Linnér <johan@linner.biz>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP fel: Kunde inte autentisera.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP fel: Kunde inte ansluta till SMTP-server.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fel: Data accepterades inte.';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = 'Okänt encode-format: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Kunde inte köra: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Ingen åtkomst till fil: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Fil fel: Kunde inte öppna fil: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Följande avsändaradress är felaktig: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Kunde inte initiera e-postfunktion.';
|
||||
//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Du måste ange minst en mottagares e-postadress.';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer stöds inte.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP fel: Följande mottagare är felaktig: ';
|
||||
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||
?>
|
||||
27
feedback/phpmailer/language/phpmailer.lang-tr.php
Normal file
27
feedback/phpmailer/language/phpmailer.lang-tr.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer language file: refer to English translation for definitive list
|
||||
* Turkish version
|
||||
* Türkçe Versiyonu
|
||||
* ÝZYAZILIM - Elçin Özel - Can Yýlmaz - Mehmet Benlioðlu
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP Hatasý: Doðrulanamýyor.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP Hatasý: SMTP hosta baðlanýlamýyor.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Hatasý: Veri kabul edilmedi.';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = 'Bilinmeyen þifreleme: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Çalýþtýrýlamýyor: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Dosyaya eriþilemiyor: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Dosya Hatasý: Dosya açýlamýyor: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Baþarýsýz olan gönderici adresi: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Örnek mail fonksiyonu yaratýlamadý.';
|
||||
//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['provide_address'] = 'En az bir tane mail adresi belirtmek zorundasýnýz alýcýnýn email adresi.';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailler desteklenmemektedir.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Hatasý: alýcýlara ulaþmadý: ';
|
||||
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||
?>
|
||||
26
feedback/phpmailer/language/phpmailer.lang-zh.php
Normal file
26
feedback/phpmailer/language/phpmailer.lang-zh.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer language file: refer to English translation for definitive list
|
||||
* Traditional Chinese Version
|
||||
* @author liqwei <liqwei@liqwei.com>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP 錯誤:登錄失敗。';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP 錯誤:無法連接到 SMTP 主機。';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 錯誤:數據不被接受。';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = '未知編碼: ';
|
||||
$PHPMAILER_LANG['file_access'] = '無法訪問文件:';
|
||||
$PHPMAILER_LANG['file_open'] = '文件錯誤:無法打開文件:';
|
||||
$PHPMAILER_LANG['from_failed'] = '發送地址錯誤:';
|
||||
$PHPMAILER_LANG['execute'] = '無法執行:';
|
||||
$PHPMAILER_LANG['instantiate'] = '未知函數調用。';
|
||||
//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['provide_address'] = '必須提供至少一個收件人地址。';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = '發信客戶端不被支持。';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP 錯誤:收件人地址錯誤:';
|
||||
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||
?>
|
||||
26
feedback/phpmailer/language/phpmailer.lang-zh_cn.php
Normal file
26
feedback/phpmailer/language/phpmailer.lang-zh_cn.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer language file: refer to English translation for definitive list
|
||||
* Simplified Chinese Version
|
||||
* @author liqwei <liqwei@liqwei.com>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。';
|
||||
//$P$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = '未知编码: ';
|
||||
$PHPMAILER_LANG['execute'] = '无法执行:';
|
||||
$PHPMAILER_LANG['file_access'] = '无法访问文件:';
|
||||
$PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:';
|
||||
$PHPMAILER_LANG['from_failed'] = '发送地址错误:';
|
||||
$PHPMAILER_LANG['instantiate'] = '未知函数调用。';
|
||||
//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。';
|
||||
$PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:';
|
||||
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||
?>
|
||||
10
feedback/remove.php
Normal file
10
feedback/remove.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?
|
||||
session_start();
|
||||
chdir('..');
|
||||
require_once('api/Simpla.php');
|
||||
$simpla = new Simpla();
|
||||
if(empty($_SESSION['admin'])) exit('3');
|
||||
|
||||
$id = isset($_POST['id']) ? (int)$_POST['id'] : 0;
|
||||
|
||||
$simpla->db->query("DELETE FROM `__feedback` WHERE `id`='$id' OR `parent_id`='$id'");
|
||||
11
feedback/remove_image.php
Normal file
11
feedback/remove_image.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
include($DOCUMENT_ROOT."/php/cookie.php");
|
||||
include($DOCUMENT_ROOT."/php/default.php");
|
||||
connect();
|
||||
|
||||
if($admin != 'admin') die;
|
||||
|
||||
//$res = mysql_query("SELECT * FROM `feedback_images` WHERE `id`='".(int)$_POST['id']."'");
|
||||
//$row = mysql_fetch_assoc($res);
|
||||
|
||||
mysql_query("DELETE FROM `feedback_images` WHERE `id`='".(int)$_POST['id']."'");
|
||||
75
feedback/reply.php
Normal file
75
feedback/reply.php
Normal file
@@ -0,0 +1,75 @@
|
||||
<?
|
||||
include($_SERVER["DOCUMENT_ROOT"]."/php/cookie.php");
|
||||
include($_SERVER["DOCUMENT_ROOT"]."/php/default.php");
|
||||
connect();
|
||||
?>
|
||||
<?
|
||||
if (!isset($page_id)){$page_id=37;}
|
||||
//get_meta($page_id);
|
||||
?>
|
||||
<? $page_name="feedback";?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html><head>
|
||||
<title><? if ($meta_title<>"") {?><?=$meta_title?><? } else {?>Ñòåëëàæè<? } ?></title>
|
||||
<META NAME="description" CONTENT="<? if ($meta_descr<>"") {?><?=$meta_descr?><? } else {?>Ñòåëëàæè<? } ?>">
|
||||
<META NAME="keywords" CONTENT="<? if ($meta_key<>"") {?><?=$meta_key?><? } else {?>Ñòåëëàæè<? } ?>">
|
||||
<? include($_SERVER["DOCUMENT_ROOT"]."/php/top_head.php"); ?>
|
||||
<script type="text/javascript" src="/feedback/js/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="/feedback/js/uploader.js"></script>
|
||||
</head>
|
||||
<? include($_SERVER["DOCUMENT_ROOT"]."/top.php"); ?>
|
||||
<div class="sidebar <?=$colClass?>-3">
|
||||
<? include($_SERVER["DOCUMENT_ROOT"]."/inc.right.php"); ?>
|
||||
</div>
|
||||
<div class="inner-content <?=$colClass?>-9">
|
||||
<?
|
||||
// COLUM CENTR START ++++++++++++++
|
||||
//
|
||||
?>
|
||||
<? //page_out($page_id);?>
|
||||
<?
|
||||
include($_SERVER['DOCUMENT_ROOT']. '/feedback/Img.php');
|
||||
//
|
||||
// COLUM CENTR END -----------------------
|
||||
$res = mysql_query("SELECT * FROM `feedback` WHERE `id`='".(int)$_GET['id']."'");
|
||||
$row = mysql_fetch_assoc($res);
|
||||
?>
|
||||
<h2>Îòâåò íà îòçûâ</h2>
|
||||
<i><?=$row['name']?></i><br><?=$row['text']?>
|
||||
<form id="f_form2" style="margin-top: 20px;">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Êîììåíòàðèé*</label>
|
||||
<textarea class="form-control" name="text"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="well">
|
||||
<div id="f_images2"></div>
|
||||
<div class="clearfix"></div>
|
||||
<span class="btn btn-success fileinput-btn" ><i class="fa fa-plus"> Äîáàâèòü ôîòî</i>
|
||||
<input type="file" multiple name="img"></span>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-danger f-error" id="f_text_error2" style="display: none;">ââåäèòå òåêñò êîììåíòàðèÿ</div>
|
||||
|
||||
<button type="submit" class="btn btn-default" id="f_submit_btn2"><i class="fa fa-check"></i> Îòïðàâèòü</button>
|
||||
<p class="help-block">*Îáÿçàòåëüíîå ïîëå</p>
|
||||
<input type="hidden" name="parent_id" value="<?=$row['id']?>">
|
||||
<input type="hidden" name="name" value="Îòâåò">
|
||||
<input type="hidden" name="email" value="">
|
||||
<input type="hidden" name="url" value="save_reply">
|
||||
</form>
|
||||
|
||||
<?
|
||||
// COLUM RIGHT START ++++++++++++++++++++
|
||||
//
|
||||
?>
|
||||
|
||||
<?
|
||||
if($admin == 'admin') include $_SERVER['DOCUMENT_ROOT'].'/feedback/feedback_admin.js.php';
|
||||
//
|
||||
// COLUM RIGHT END ------------------------
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?include ($DOCUMENT_ROOT."/bottom.php");?>
|
||||
58
feedback/save.php
Normal file
58
feedback/save.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
chdir('..');
|
||||
require_once('api/Simpla.php');
|
||||
$simpla = new Simpla();
|
||||
$simpla->db->connect();
|
||||
|
||||
$subject = 'Новый отзыв с ' . $_SERVER['HTTP_HOST'] . ' ' . date('d-m-Y H:i');
|
||||
|
||||
$msg = '<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Новый отзыв с ' . $_SERVER['HTTP_HOST'] . ' ' . date('d-m-Y H:i') . '</title>
|
||||
</head>
|
||||
<body>
|
||||
Имя: ' . $_POST['name'] . '<br>
|
||||
Email: ' . $_POST['email'] . '<br>
|
||||
Комментарий: ' . $_POST['text'] . '<br>
|
||||
</body></html>';
|
||||
|
||||
|
||||
require_once ($_SERVER['DOCUMENT_ROOT'] . '/feedback/phpmailer/class.phpmailer.php');
|
||||
$mail = new PHPMailer();
|
||||
|
||||
|
||||
$mail->AddAddress('info@atomicgarage.ru');
|
||||
$mail->AddAddress('dasha@eto-design.ru');
|
||||
|
||||
//$mail->AddAddress('proviruz@mail.ru');
|
||||
|
||||
$mail->Subject = $subject;
|
||||
$mail->SetFrom('admin@atomicgarage.ru');
|
||||
$mail->MsgHTML($msg);
|
||||
|
||||
$mail->Send();
|
||||
|
||||
foreach($_POST as $k=>$v) $_POST[$k] = mysql_real_escape_string( $v );
|
||||
|
||||
$simpla->db->query("INSERT INTO `__feedback` SET `name`='".$_POST['name']."',`email`='".$_POST['email']."',`text`='".$_POST['text']."', `date`=NOW(), `active`=0, `parent_id`=0 ");
|
||||
echo mysql_insert_id();
|
||||
die;
|
||||
/*
|
||||
|
||||
$imgs = array();
|
||||
if($_POST['images'] > 0){
|
||||
$files = scandir($_SERVER['DOCUMENT_ROOT'] . '/feedback/images');
|
||||
foreach($files as $file){
|
||||
if(strpos($file, $_POST['uid']) === false) continue;
|
||||
$imgs[] = $file;
|
||||
$mail->AddAttachment($_SERVER['DOCUMENT_ROOT'] . '/feedback/images/'.$file);
|
||||
}
|
||||
}
|
||||
|
||||
$mail->Send();
|
||||
|
||||
//print_r($imgs);
|
||||
|
||||
foreach($imgs as $img) @unlink( $_SERVER['DOCUMENT_ROOT'] . '/feedback/images/'.$img );
|
||||
*/
|
||||
14
feedback/save_reply.php
Normal file
14
feedback/save_reply.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
session_start();
|
||||
chdir('..');
|
||||
require_once('api/Simpla.php');
|
||||
$simpla = new Simpla();
|
||||
if(empty($_SESSION['admin'])) exit('3');
|
||||
|
||||
$simpla->db->connect();
|
||||
|
||||
foreach($_POST as $k=>$v) $_POST[$k] = mysql_real_escape_string( $v);
|
||||
|
||||
$simpla->db->query("INSERT INTO `__feedback` SET `name`='".$_POST['name']."',`email`='',`text`='".$_POST['text']."',date=NOW(), `parent_id`='".(int)$_POST['parent_id']."' ");
|
||||
|
||||
//echo mysql_insert_id();
|
||||
1287
feedback/simple_image.php
Normal file
1287
feedback/simple_image.php
Normal file
File diff suppressed because it is too large
Load Diff
43
feedback/uploader.php
Normal file
43
feedback/uploader.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
chdir('..');
|
||||
require_once('api/Simpla.php');
|
||||
$simpla = new Simpla();
|
||||
$simpla->db->connect();
|
||||
require_once $_SERVER['DOCUMENT_ROOT'].'/feedback/simple_image.php';
|
||||
|
||||
//print_r($_FILES);
|
||||
//print_r($_POST);
|
||||
|
||||
$mtype = exif_imagetype($_FILES['img']['tmp_name']);
|
||||
if($mtype && $mtype > 3) die;
|
||||
|
||||
$ext = substr(strrchr($_FILES['img']['name'], '.'), 1);
|
||||
|
||||
$size = getimagesize($_FILES['img']['tmp_name']);
|
||||
|
||||
$name = generateName() . '.' . $ext;
|
||||
|
||||
$path = $_SERVER['DOCUMENT_ROOT'].'/feedback/images/'.$name;
|
||||
|
||||
if($size[0] > 1024 || $size[1] > 1024){
|
||||
|
||||
$img = new SimpleImage($_FILES['img']['tmp_name']);
|
||||
$img->best_fit(1024, 1024)->save( $path );
|
||||
|
||||
}else{
|
||||
move_uploaded_file($_FILES['img']['tmp_name'], $path);
|
||||
}
|
||||
|
||||
$simpla->db->query("INSERT INTO `__feedback_images` SET `feedback_id`='".(int)$_POST['id']."', `name`='$name' ");
|
||||
|
||||
|
||||
function generateName($length = 32){
|
||||
$chars = 'abdefhiknrstyzABDEFGHKNQRSTYZ23456789';
|
||||
$numChars = strlen($chars);
|
||||
$string = '';
|
||||
for ($i = 0; $i < $length; $i++) {
|
||||
$string .= substr($chars, rand(1, $numChars) - 1, 1);
|
||||
}
|
||||
return md5($string.uniqid());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user