-
Notifications
You must be signed in to change notification settings - Fork 8
/
contact_share_settings_bkp.php
161 lines (153 loc) · 6.85 KB
/
contact_share_settings_bkp.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
<?php
/**COPYRIGHTS**/
// Copyright 2008 - 2010 all rights reserved, SQLFusion LLC, info@sqlfusion.com
/**COPYRIGHTS**/
$pageTitle = 'Ofuz :: Share Notes and Files';
$Author = 'SQLFusion LLC';
$Keywords = 'Keywords for search engine';
$Description = 'Description for search engine';
$background_color = 'white';
include_once('config.php');
include_once('includes/ofuz_check_access.script.inc.php');
include_once('includes/header.inc.php');
//$do_notes = new ContactNotes($GLOBALS['conx']);
$do_contact = new Contact($GLOBALS['conx']);
//$do_company = new Company($GLOBALS['conx']);
//$do_task = new Task($GLOBALS['conx']);
//$do_task_category = new TaskCategory($GLOBALS['conx']);
//$do_contact_task = new Contact();
if (is_object($_SESSION["eDetail_contact"])) {
$idcontact = $_SESSION["eDetail_contact"]->getparam("idcontact");
} elseif (isset($_GET['id'])) {
$idcontact = $_GET['id'];
} elseif($do_contact->idcontact){
$idcontact = $do_contact->idcontact;
} elseif(is_object($_SESSION['ContactEditSave'])) {
$idcontact = $_SESSION['ContactEditSave']->idcontact;
}
$do_contact->getContactDetails($idcontact);
if (!is_object($_SESSION['do_sharenotes'])) {
$do_contact_notes = new ContactNotes();
$do_contact_notes->sessionPersistent("do_sharenotes", "index.php", 36000);
}
//echo $_SESSION['do_sharenotes'];
?>
<?php $thistab = 'Welcome'; include_once('ofuz_navtabs.php'); ?>
<div class="content">
<script type="text/javascript">
//<![CDATA[
var openform;
function fnEditTask(task) {
if ($("#e"+openform).length > 0) fnCancelEdit(openform);
openform = task;
$.ajax({
type: "GET",
<?php
$e_editForm = new Event("Task->eventAjaxEditTaskForm");
$e_editForm->setEventControler("ajax_evctl.php");
$e_editForm->setSecure(false);
?>
url: "<?php echo $e_editForm->getUrl(); ?>",
data: "id="+task,
success: function(html){
$("#t"+task).hide(0);
$("#e"+task)[0].innerHTML = html;
$("#e"+task).show(0);
}
});
};
function fnCancelEdit(task) {
$("#e"+task).hide(0);
$("#e"+task)[0].innerHTML = "";
$("#t"+task).show(0);
};
function fnTaskComplete(task) {
$.ajax({
type: "GET",
<?php
$e_editForm = new Event("Task->eventAjaxTaskComplete");
$e_editForm->setEventControler("ajax_evctl.php");
$e_editForm->setSecure(false);
?>
url: "<?php echo $e_editForm->getUrl(); ?>",
data: "id="+task,
success: function(){
$("#t"+task).css("text-decoration", "line-through");
$("#t"+task).fadeOut("slow", function() {
$("#e"+task).remove();
$("#b"+task).remove();
});
}
});
};
$(document).ready(function() {
$("div[id^=notetext]").hover(function(){$("div[id^=trashcan]",this).show("fast");},function(){$("div[id^=trashcan]",this).hide("fast");});
});
//]]>
</script>
<div class="content">
<table class="main">
<tr>
<td class="main_left">
<!--<div class="col_pad_25">
<div class="sidebox1a"></div>
</div>-->
</td>
<td class="main_right">
<div class="mainheader">
<div class="pad20">
<span class="headline14">Share files and Notes</span>
</div>
</div>
<div class="contentfull">
Description comes here.......
<div class="dottedline"></div>
<?php
//checks if already Notes Shared (Url link is generated)
$portal_code = $_SESSION['do_sharenotes']->checkIfNotesShared($idcontact);
//generating an Event to create an unique URL link to Share Notes & Files
$e_generate_url = new Event("do_sharenotes->generateUrlToShareNotes");
$e_generate_url->addParam("idcontact",$idcontact);
$e_generate_url->addParam("goto", $_SERVER['PHP_SELF']);
//generating an Event to create an new unique URL link to Share Notes & Files
$e_generate_new_url = new Event("do_sharenotes->generateNewUrlToShareNotes");
$e_generate_new_url->addParam("idcontact", $idcontact);
$e_generate_new_url->addParam("goto", $_SERVER['PHP_SELF']);
//generating an Event to stop sharing the Notes & Files
$e_stop_sharing_notes = new Event("do_sharenotes->stopSharingNotes");
$e_stop_sharing_notes->addParam("idcontact", $idcontact);
$e_stop_sharing_notes->addParam("goto", $_SERVER['PHP_SELF']);
if($portal_code){
?>
<div class="section">
<div>You have already shared Notes with <?php echo "<b>".$do_contact->firstname." ".$do_contact->lastname."</b>"; ?></div>
<div id="share_file_notes_url"> <b>contact portal</b> :
<?php echo "<a href='http://dev2.sqlfusion.com/ofuz3/contact_portal.php?pc=".$portal_code."'>http://dev2.sqlfusion.com/ofuz3/contact_portal.php?pc=".$portal_code."</a>"; ?>
</div>
<div id="share_file_notes_generate">
<?php echo $e_generate_url->getLink("resend access to my contact"); ?> : <?php echo $e_generate_new_url->getLink("Generate a new access"); ?> : <?php echo $e_stop_sharing_notes->getLink("Stop sharing"); ?>
</div>
</div>
<?php
} else{
?>
<div class="section">
<?php
/*$e_generateUrl = new Event("do_sharenotes->generateUrlToShareNotes");
$e_generateUrl->addParam("idcontact",$idcontact);
$e_generateUrl->addParam("goto", $_SERVER['PHP_SELF']);*/
?>
<div id="sharenotes" class="text8">
<?php echo $e_generate_url->getLink("Share Notes & Files with ")."<b>".$do_contact->firstname." ".$do_contact->lastname."</b>"; ?>
</div>
</div>
<?php } ?>
<div id="share_file_notes_msg"><?php if($_GET['msg']){ echo htmlentities($_GET['msg']);} ?></div>
<div class="bottompad40"></div>
</div>
</td>
</tr>
</table>
</div>
</body>
</html>