本文整理汇总了PHP中Adherent::storeDoc方法的典型用法代码示例。如果您正苦于以下问题:PHP Adherent::storeDoc方法的具体用法?PHP Adherent::storeDoc怎么用?PHP Adherent::storeDoc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Adherent
的用法示例。
在下文中一共展示了Adherent::storeDoc方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$Adherents = array();
$AdherentsAValider = array();
$MemberUpToDate = array();
$AdherentsResilies = array();
$AdherentType = array();
$result = $staticmember->getView('tag', array("group" => true));
if (count($result->rows)) {
foreach ($result->rows as $aRow) {
$AdherentType[$aRow->key] = $aRow->value;
}
}
$now = dol_now();
$doc->_id = "_temp_view";
$doc->map = "function(doc) {\n var now = Math.round(+new Date()/1000);\n var status = 0;\n\n if(doc.class && doc.class==\"Adherent\"){\n if(doc.last_subscription_date_end && doc.Status == 1) {\n if(doc.last_subscription_date_end < now)\n status = \"expired\";\n else\n status = \"actived\";\n }\n else\n status= doc.Status;\n\n if(doc.Tag.length > 0) {\n for(var idx in doc.Tag) {\n emit([doc.Tag[idx],status], 1);\n }\n }\n\n }\n}";
$doc->reduce = "function(keys, values) {\n return sum(values)\n}";
$result = $staticmember->storeDoc($doc);
if (count($result->rows)) {
foreach ($result->rows as $aRow) {
$Adherents[$aRow->key[0]][$aRow->key[1]] = $aRow->value;
}
}
foreach ($AdherentType as $key => $adhtype) {
foreach ($staticmember->fk_extrafields->fields->Status->values as $idx => $row) {
if ($Adherents[$key][$idx]) {
$somme[$idx] += $Adherents[$key][$idx];
$total += $Adherents[$key][$idx];
}
}
}
print '<tr><td width="30%" class="notopnoleft" valign="top">';
/*