Subversion Repositories Applications.reseau

Rev

Rev 12 | Rev 19 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12 Rev 15
Line 128... Line 128...
128
		}
128
		}
129
	}
129
	}
Line 130... Line 130...
130
 
130
 
131
	// ajoute une entrée au log
131
	// ajoute une entrée au log
132
	protected function log() {
132
	protected function log() {
133
		$contenu = '';
133
		$contenu = ''.
134
		$contenu .= date("Y-m-d h:i:s") . "\n";
134
			date("Y-m-d h:i:s") . "\n".
135
		$contenu .= "Pour: " . $this->emailDestination . "\n";
135
			"Pour: " . $this->emailDestination . "\n".
136
		$contenu .= "Page: " . $this->pageSource . "\n";
136
			"Page: " . $this->pageSource . "\n".
137
		$contenu .= "User agent: " . $_SERVER['HTTP_USER_AGENT'] . "\n";
137
			"User agent: " . $_SERVER['HTTP_USER_AGENT'] . "\n".
138
		$contenu .= "Contributeur: " . $this->coordonnees . "\n";
138
			"Contributeur: " . $this->coordonnees . "\n".
139
		$contenu .= "Gravité: " . $this->gravite . "\n";
139
			"Gravité: " . $this->gravite . "\n".
140
		$contenu .= "Navigateur: " . $this->navigateur . "\n";
140
			"Navigateur: " . $this->navigateur . "\n".
141
		$contenu .= "Système: " . $this->systeme . "\n";
141
			"Système: " . $this->systeme . "\n".
142
		$contenu .= "Description:\n  " . str_replace("\n", "\n  ", $this->description);
142
			"Description:\n  " . str_replace("\n", "\n  ", $this->description).
Line 143... Line 143...
143
		$contenu .= "\n\n-----------------------------------------------------------------------\n\n";
143
			"\n\n-----------------------------------------------------------------------\n\n";
144
 
144
 
Line 145... Line 145...
145
		file_put_contents($this->cheminLog, $contenu, FILE_APPEND);
145
		file_put_contents($this->cheminLog, $contenu, FILE_APPEND);
146
	}
146
	}
147
 
147
 
148
	// envoie un email
148
	// envoie un email
149
	protected function email() {
149
	protected function email() {
150
		$contenu = '';
150
		$contenu = ''.
151
		$contenu .= date("Y-m-d h:i:s") . "\n";
151
			date("Y-m-d h:i:s") . "\n".
152
		$contenu .= "Pour: " . $this->emailDestination . "\n";
152
			"Pour: " . $this->emailDestination . "\n".
153
		$contenu .= "Page: " . $this->pageSource . "\n";
153
			"Page: " . $this->pageSource . "\n".
154
		$contenu .= "User agent: " . $_SERVER['HTTP_USER_AGENT'] . "\n";
154
			"User agent: " . $_SERVER['HTTP_USER_AGENT'] . "\n".
155
		$contenu .= "Contributeur: " . $this->coordonnees . "\n";
155
			"Contributeur: " . $this->coordonnees . "\n".
156
		$contenu .= "Gravité: " . $this->gravite . "\n";
156
			"Gravité: " . $this->gravite . "\n".
Line 157... Line 157...
157
		$contenu .= "Navigateur: " . $this->navigateur . "\n";
157
			"Navigateur: " . $this->navigateur . "\n".
158
		$contenu .= "Système: " . $this->systeme . "\n";
158
			"Système: " . $this->systeme . "\n".
Line 159... Line 159...
159
		$contenu .= "Description:\n  " . str_replace("\n", "\n  ", $this->description);
159
			"Description:\n  " . str_replace("\n", "\n  ", $this->description);
160
 
160
 
Line 161... Line 161...
161
		$entetes = 'Content-Type: text/plain; charset="utf-8" ';
161
		$entetes = 'Content-Type: text/plain; charset="utf-8" '.
162
		$entetes .= 'Content-Transfer-Encoding: 8bit';
162
			'Content-Transfer-Encoding: 8bit';
163
 
163
 
164
		$sujet = substr($this->description, 0, 25) .
164
		$sujet = substr($this->description, 0, 25).'... '.