forked from bopoda/fl-ru-damp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtpl.prj-main-info.php
312 lines (274 loc) · 23.2 KB
/
tpl.prj-main-info.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
<?
/**
* Øàáëîí êàòðî÷êè ïðîåêòà
*/
$projectObject = new_projects::initData($project);
?>
<div class="b-layout b-layout_overflow_hidden b-layout_margbot_10">
<?php
$cfile = new cfile($project["logo_id"]);
if ( $cfile->id ) {
if ( trim($project["link"]) ) {
?>
<a target="_blank" rel="nofollow" href="<?=$project["link"]?>" class="b-post__link">
<img alt="" src="<?= WDCPREFIX."/".$cfile->path."/".$cfile->name ?>" class="b-post__pic b-post__pic_float_right b-post__pic_clear_right b-post__pic_margleft_10">
</a>
<?
} else {
?>
<img alt="" src="<?= WDCPREFIX."/".$cfile->path."/".$cfile->name ?>" class="b-post__pic b-post__pic_float_right b-post__pic_clear_right b-post__pic_margleft_10">
<?
}
}
?>
<? if ($project['prefer_sbr'] === 't' && $project['kind'] == 7) {
// ýòîò øàáëîí èñïîëüçóåòñÿ äëÿ ïðåäïðîñìîòðà ïðîåêòà/êîíêóðñà ïðè ïóáëèêàöèè, ïîýòîìó ïðîâåðÿåì êîíêóðñ èëè ïðîåêò
?>
<div class="b-layout__txt_padbot_20 b-layout__txt"><?= ($project['kind'] == 7) ? 'Âûïëàòà âîçíàãðàæäåíèÿ ÷åðåç' : 'Ïðåäïî÷èòàþ îïëàòó ðàáîòû ÷åðåç' ?> <a href="/promo/bezopasnaya-sdelka/" target="_blank" class="b-layout__link">Áåçîïàñíóþ Ñäåëêó</a> <?= view_sbr_shield('', 'b-icon_top_2') ?></div>
<? } ?>
<?php $can_change_prj = hasPermissions("projects"); ?>
<script type="text/javascript">
function updateFavorites(elm, pid) {
var req = new Request({
url: '/projects/index.php?p=changePrjFavState&pid='+pid,
onSuccess: function(data) {
if (data == 2) {
$(elm).removeClass('b-icon__star_yellow');
$(elm).set('title', 'Äîáàâèòü â Èçáðàííîå');
} else if (data == 1) {
$(elm).addClass('b-icon__star_yellow');
$(elm).set('title', 'Óáðàòü èç Èçáðàííîãî');
}
}
}).post('action=changePrjFavState&u_token_key=<?=$_SESSION['user_token'];?>');
}
</script>
<?php if ($project['name']) {
$sBox1 = '';
if (intval($project['sbr_id'])) $sBox1 .= "<a href=\"/".sbr::NEW_TEMPLATE_SBR."/".($project['sbr_emp_id']==$uid||$project['sbr_frl_id']==$uid ? "?id={$project['sbr_id']}" : '')."\" title=\"Áåçîïàñíàÿ Ñäåëêà\"><img src=\"/images/shield_sm.gif\" alt=\"Áåçîïàñíàÿ Ñäåëêà\" class=\"sbr_p\" /></a>";
if ($project['ico_closed'] == "t") $sBox1 .= "<img src=\"/images/ico_closed.gif\" alt=\"Ïðîåêò çàêðûò\" class=\"sbr_p\"/>";
$sTitle = $project['moderator_status'] === '0' && $project['kind'] != 4 && $project['is_pro'] != 't' ? $stop_words->replace($project['name']) : $project['name'];
?>
<?
} ?>
<div id="projectp<?=$project['id']?>" class="b-layout__txt b-layout__txt_padbot_20">
<?php $sDescr = $project['moderator_status'] === '0' && $project['kind'] != 4 && $project['is_pro'] != 't' ? $stop_words->replace($project['descr']) : $project['descr']; ?>
<?=reformat($sDescr, 50, 0, 0, 1);?>
</div>
<?
if ($project['attach']) {
$str = viewattachLeft( $project['login'], $project['attach'], "upload", $file, 1000, 600, 307200, $project['attach'], 0, 0, 1 );
print("<tr><td> </td><td><br>".$str."<br></td></tr>");
} elseif ( isset($project_attach) && is_array($project_attach) ) { $project_attach = array_reverse($project_attach);
?>
<div class="b-layout b-layout_padbot_15">
<?php
$nn = 1;
foreach ( $project_attach as $attach )
{
$str = viewattachLeft( NULL, $attach["name"], $attach['path'], $file, 0, 0, 0, 0, 0, 0, $nn );
echo '<div class = "b-layout__txt b-layout__txt_padbot_5">', $str, '</div>';
$nn++;
}
?>
</div>
<?php } //elseif ?>
<? if(video_validate($project['videolnk'])) { ?>
<?=show_video($project['id'], video_validate($project['videolnk']) );?>
<? } ?>
<?php if($project['kind'] != 9): ?>
<div class="b-layout__txt b-layout__txt_fontsize_11 b-layout__txt_bold">Ðàçäåëû:</div>
<div class="b-layout__txt b-layout__txt_fontsize_11 <?php if (!($project['ico_payed']=='t' || $project['is_upped'] == 't'||$project['kind'] == 4)) {?>b-layout__txt_padbot_20<?php } ?>"><?=$isPreview ? $project['spec_txt'] : projects::_getSpecsStr($project_specs, ' / ', ', ', true);?></div>
<?php if ($project['ico_payed']=='t' || $project['is_upped'] == 't'||$project['kind'] == 4){?>
<div class="b-layout__txt b-layout__txt_fontsize_11 b-layout__txt_padbot_20">
<?php if ($project['ico_payed']=='t' || $project['is_upped'] == 't'){?>Ïëàòíûé ïðîåêò <?php if ($project['kind'] == 4) { ?>— â<?php } ?><?php } //if?><?php
if ($project['kind'] == 4) { ?><?php if (!($project['ico_payed']=='t' || $project['is_upped'] == 't')){?>Â<?php } //if?>àêàíñèÿ <?= (($project['country'])?" (".$project['country_name'].(($project['city'])?", ".$project['city_name']:"").")":"") ?><?php } //if?>
</div>
<?php } //if?>
<?php endif; ?>
<div class="b-layout__txt b-layout__txt_padbot_30">
<div class="b-layout__txt b-layout__txt_bold b-layout__txt_fontsize_11">Îïóáëèêîâàí:</div>
<div class="b-layout__txt b-layout__txt_fontsize_11">
<?= dateFormat("d.m.Y | H:i", $project['create_date']) ?>
<?= (($project['post_date'] !== $project['create_date']) ? dateFormat("[ïîäíÿò: d.m.Y | H:i]", $project['post_date']) : "") ?>
<?= (($project['edit_date']) ? dateFormat("[ïîñëåäíèå èçìåíåíèÿ: d.m.Y | H:i]", $project['edit_date']) : "") ?>
</div>
<?php if($project['kind'] != 9): ?>
<?php
if (($uid && ($project["user_id"] == $uid) && ($project['is_blocked'] != 't')) || hasPermissions('projects')) {
?>
<?php if ($project["closed"] == "f") { ?>
<div class="b-layout__txt b-layout__txt_fontsize_11">
 ñïèñêå ïðîåêòîâ <? /* "<?=GetKind($project["kind"])?>" */ ?> <a id="pos_link_<?= $project['id'] ?>" class="b-layout__link" href="#" onclick="xajax_getStatProject(<?= $project['id'] ?>, '<?= $project['payed_to'] ?>', '<?= $project['now'] ?>', '<?= $project['payed'] ?>', '<?= $project['post_date'] ?>', '<?= $project['kind'] ?>', '<?= $project['comm_count'] ?>', '<?= $project['offers_count'] ?>'); return false;">Ïîäðîáíåå…</a>
<span id="prj_pos_<?= $project['id'] ?>" class="b-layout__txt b-layout__txt_fontsize_11"></span>
</div>
<?php }//if?>
<?php }//if ?>
<?php endif; ?>
</div>
</div>
<?php
if (($uid && ($project["user_id"] == $uid) && ($project['is_blocked'] != 't')) || hasPermissions('projects')) {
?>
<?php
if($projectObject->isNotPayedVacancy() && !$projectObject->isClosed() && !(hasPermissions('projects') && $project['login']!=$_SESSION["login"])):
?>
<div class="b-fon b-fon_clear_both b-fon_margbot_20">
<div class="b-fon__body b-fon__body_padtop_10 b-fon__body_pad_10 b-fon__body_padleft_30 b-fon__body_fontsize_13 b-fon__body_bg_ffebbf">
<span class="b-icon b-icon_sbr_oattent b-icon_margleft_-25"></span>
Âàø ïðîåêò ïåðåíåñåí â ðàçäåë Âàêàíñèè. <br/>
Ïîæàëóéñòà, îïëàòèòå åãî ðàçìåùåíèå, ÷òîáû âèäåòü îòêëèêè ôðèëàíñåðîâ è èìåòü âîçìîæíîñòü âûáðàòü Èñïîëíèòåëÿ.
</div>
</div>
<?php
endif;
?>
<div class="b-buttons b-buttons_padbot_30">
<?php if($project['kind'] != 9 && $project['closed'] != "t" && ($project["user_id"] == $uid)): ?>
<?php if($projectObject->isNotPayedVacancy()): ?>
<a class="b-button b-button_flat b-button_flat_green __project_close_hide" href="/public/?step=1&public=<?= $project['id'] ?>&popup=1">
Îïëàòèòü ðàçìåùåíèå çà <?=$projectObject->getProjectInOfficePrice($projectObject->isOwnerPro())?> ðóá.
</a>
<?php else: ?>
<a class="b-button b-button_flat b-button_flat_green __project_close_hide" href="/public/?step=1&public=<?= $project['id'] ?>">
Ïîëó÷èòü áîëüøå ïðåäëîæåíèé
</a>
<?php endif; ?>
   
<?php endif; ?>
<span class="b-layout__txt">
<?php if (hasPermissions('projects') && $project['login']!=$_SESSION["login"]) { ?>
<?php
if($projectObject->isNotPayedVacancy()):
?>
<span class="b-txt b-txt_bold b-txt_color_de2c2c b-txt_padright_20">Âàêàíñèÿ åùå íå îïëà÷åíà</span>
<?php
endif;
?>
<script type="text/javascript">
var PROJECT_BANNED_PID = 'p<?= $project['id']?>';
var PROJECT_BANNED_URI = '<?=$GLOBALS['host']?>/projects/?pid=<?=$project['id']?>';
var PROJECT_BANNED_NAME = "<?=htmlspecialchars($project['name'])?>";
</script>
<?php if ( $project['warn']<3 && !$project['is_banned'] && !$project['ban_where'] ) { ?>
<span class='warnlink-<?= $project['user_id']?>'><a class='b-layout__link b-layout__link_dot_c10600' href='javascript: void(0);' onclick='banned.warnUser(<?= $project['user_id']?>, 0, "projects", "p<?= $project['id']?>", 0); return false;'>Ñäåëàòü ïðåäóïðåæäåíèå (<span class='warncount-<?= $project['user_id']?>'><?= ($project['warn'] ? $project['warn'] : 0);?></span>)</a></span>  
<?php } else /*if (!$project['is_banned'])*/ {
$sBanTitle = (!$project['is_banned'] && !$project['ban_where']) ? 'Çàáàíèòü!' : 'Ðàçáàíèòü';
?>
<span class='warnlink-<?= $project['user_id']?>'><a class='b-layout__link b-layout__link_dot_c10600' href="javascript:void(0);" onclick="banned.userBan(<?=$project['user_id']?>, 'p<?= $project['id']?>',0)"><?=$sBanTitle?></a></span>  
<?php }// elseif ?>
<span id="project-button-<?=$project['id']?>"><a class='b-layout__link b-layout__link_dot_c10600' href="javascript:;" onclick="banned.<?=($project['is_blocked']? 'unblockedProject': 'blockedProject')?>(<?=$project['id']?>)"><?=($project['is_blocked']? 'Ðàçáëîêèðîâàòü': 'Çàáëîêèðîâàòü')?></a></span>  
<?php
if ($projectObject->isAllowMovedToVacancy()):
?>
<a onclick="return confirm('Ñäåëàòü âàêàíñèåé?');" class='b-layout__link b-layout__link_dot_c10600' href="/projects/makevacancy/?id=<?=$project['id']?>">Ñäåëàòü âàêàíñèåé</a>  
<?php
endif;
?>
<a class='b-layout__link' href="/public/?step=1&public=<?= $project['id']?>&red=<?= rawurlencode($_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING']);?>" onClick="popupQEditPrjShow(<?=$project['id']?>, event); return false;">Ðåäàêòèðîâàòü</a>  
<?php } else if ($uid && ($project["user_id"] == $uid) && ($project['is_blocked'] != 't')) { //if?>
<?php if($project['kind'] != 9): ?>
<?php if($project["closed"] == 't') {?>
<a class='b-layout__link __project_close_hide' href="/projects/index.php?action=prj_close&pid=<?=$project["id"]?>">Ïóáëèêîâàòü åùå ðàç</a>  
<?php } else { //if ?>
<a class='b-layout__link __project_close_hide' href="/projects/index.php?action=prj_close&pid=<?=$project["id"]?>">Ñíÿòü ñ ïóáëèêàöèè</a>  
<?php } //else?>
<?php endif; ?>
<?php if(!$projectObject->isNotPayedVacancy()): ?>
<a class='b-layout__link __project_close_hide' href="/public/?step=1&public=<?=$project["id"]?>&red=<?=rawurlencode("/users/" . $project["login"] . "/setup/projects/")?>">
Ðåäàêòèðîâàòü
</a>
<?php endif; ?>
<?php } ?>
</span>
</div>
<?php } ?>
<?php if (!(hasPermissions('projects') && $project['login']!=$_SESSION["login"])) { ?>
<?php if((is_emp()&&($project["user_id"] != $uid))||(($project['exec_id'] && $exec_info)&&(!get_uid(false)))) {?>
<div class="b-buttons b-buttons_padbot_30">
<a class="b-button b-button_flat b-button_flat_green" href="<?=$answer_button_href?>"><?=$answer_button_text?></a>   
<span class="b-layout__txt b-layout__txt_valign_middle">
<a class='b-layout__link' href="<?php if ($project['kind'] == 4) { ?>/projects/?kind=4<?php } else { ?>/projects/<?php } ?>">Ïîñìîòðåòü äðóãèå <?php if ($project['kind'] == 4) { ?>âàêàíñèè<?php } else { ?>ïðîåêòû<?php } ?></a>
</span>
</div>
<?php }//if ?>
<?php if ($obj_offer->IsPrjOfferExists($project['id'], get_uid(false))){ ?>
<div class="b-buttons b-buttons_padbot_30">
<?php if($project['kind'] != 9): ?>
<div class="b-layout__txt b-layout__txt_padtop_10 b-layout__txt_float_right i-shadow"><?php
$templates = array(
uploader::getTemplate('uploader', 'project_abuse/'),
uploader::getTemplate('uploader.file', 'project_abuse/'),
uploader::getTemplate('uploader.popup', 'project_abuse/'),
);
uploader::init(array(
'abuse_uploader' => array(
'umask' => uploader::umask('prj_abuse'),
'validation' => array('allowedExtensions' => array('jpg', 'gif', 'png', 'jpeg'), 'restrictedExtensions' => array(), 'sizeLimit' => tmp_project::MAX_FILE_SIZE),
'text' => array('uploadButton' => iconv('cp1251', 'utf8', 'Ïðèêðåïèòü ôàéëû'))
)
), $templates);
$complain = true;
$obj_project->IsHaveComplain($project['id'],get_uid(), $complain);
$is_project_complain_sent = $obj_project->isComplainSent($project['id']);
require_once($_SERVER['DOCUMENT_ROOT'] . "/classes/projects_complains.php");
$complainTypes = projects_complains::getTypes();
?><? include($_SERVER['DOCUMENT_ROOT'] . "/projects/tpl.abuse.php");
?>
<span class="b-layout__txt_color_c10600">Ïîæàëîâàòüñÿ íà ïðîåêò:
<a class="b-layout__link b-layout__link_dot_c10600 abuse-employer-project-link" href="javascript:void(0)">Ðàáîòîäàòåëþ</a>
/ <a class="b-layout__link b-layout__link_dot_c10600 abuse-moderator-project-link" href="javascript:void(0)">Ìîäåðàòîðó</a>
</span>
  <img class="b-layout__pic b-layout__pic_absolute b-layout__txt_hide" id="project_abuse_success" style="top:-8px; left:400px" src="/images/thanks.png" width="80" height="36">
</div>
<?php endif; ?>
<a class='b-layout__link' href="<?php if ($project['kind'] == 4) { ?>/projects/?kind=4<?php } else { ?>/projects/<?php } ?>">Ïîñìîòðåòü äðóãèå <?php if ($project['kind'] == 4) { ?>âàêàíñèè<?php } else { ?>ïðîåêòû<?php } ?></a>
</div>
<?php } else { ?>
<?php $sTitle = $project['moderator_status'] === '0' && $project['kind'] != 4 && $project['is_pro'] != 't' ? $stop_words->replace($project['name'], 'plain', false) : $project['name']; ?>
<?php if ( !is_emp()&&((!($project['exec_id'] && $exec_info)))) { ?>
<div class="b-buttons b-buttons_padbot_30">
<?php if(get_uid(false) && ($project['kind'] != 9)): ?>
<div class="b-layout__txt b-layout__txt_padtop_10 b-layout__txt_float_right i-shadow"><?php
$templates = array(
uploader::getTemplate('uploader', 'project_abuse/'),
uploader::getTemplate('uploader.file', 'project_abuse/'),
uploader::getTemplate('uploader.popup', 'project_abuse/'),
);
uploader::init(array(
'abuse_uploader' => array(
'umask' => uploader::umask('prj_abuse'),
'validation' => array('allowedExtensions' => array('jpg', 'gif', 'png', 'jpeg'), 'restrictedExtensions' => array(), 'sizeLimit' => tmp_project::MAX_FILE_SIZE),
'text' => array('uploadButton' => iconv('cp1251', 'utf8', 'Ïðèêðåïèòü ôàéëû'))
)
), $templates);
$complain = true;
$obj_project->IsHaveComplain($project['id'],get_uid(), $complain);
$is_project_complain_sent = $obj_project->isComplainSent($project['id']);
require_once($_SERVER['DOCUMENT_ROOT'] . "/classes/projects_complains.php");
$complainTypes = projects_complains::getTypes();
?><? include($_SERVER['DOCUMENT_ROOT'] . "/projects/tpl.abuse.php");
?>
<span class="b-layout__txt_color_c10600">Ïîæàëîâàòüñÿ íà ïðîåêò:
<a class="b-layout__link b-layout__link_dot_c10600 abuse-employer-project-link" href="javascript:void(0)">Ðàáîòîäàòåëþ</a>
/ <a class="b-layout__link b-layout__link_dot_c10600 abuse-moderator-project-link" href="javascript:void(0)">Ìîäåðàòîðó</a>
</span>
  <img class="b-layout__pic b-layout__pic_absolute b-layout__txt_hide" id="project_abuse_success" style="top:-8px; left:400px" src="/images/thanks.png" width="80" height="36">
</div>
<?php endif; ?>
<?php if($project['pro_only'] == 't' && !$is_pro || $project['verify_only'] == 't' && !$is_verify || (@$answers->offers < 1 && !$is_pro)) {?>
<a data-popup="project_answer_popup" data-url="<?=$answer_button_href?>" class="b-button b-button_flat b-button_flat_green" href="<?=$answer_button_href?>">
Îòâåòèòü íà <?php if ($project['kind'] == 4) { ?>âàêàíñèþ<?php } else { ?>ïðîåêò<?php } ?>
</a>   
<?php if(get_uid(false) > 0) echo projects_helper::renderAnswerPopup(array('project' => $project,'is_pro' => $is_pro,'is_verify' => $is_verify)); ?>
<?php } ?>
<span class="b-layout__txt b-layout__txt_valign_middle">
<?php if(!get_uid(false)) {?>
<a class='b-layout__link' href="/public/?step=1&kind=<?=$project['kind']?>"><?=$answer_button_text?></a>  
<?php }//if ?>
<a class='b-layout__link' href="<?php if ($project['kind'] == 4) { ?>/projects/?kind=4<?php } else { ?>/projects/<?php } ?>">Ïîñìîòðåòü äðóãèå <?php if ($project['kind'] == 4) { ?>âàêàíñèè<?php } else { ?>ïðîåêòû<?php } ?></a>
</span>
</div>
<?php }//if?>
<?php } ?>
<?php } ?>